Uncaught TypeError: Cannot read property 'get' of null

11 posts, 0 answers
  1. Benjamin
    Benjamin avatar
    21 posts
    Member since:
    Apr 2015

    Posted 24 Aug 2015 Link to this post

    Hi,

    I'm building a SPA with Angular JS and Kendo UI Widgets. On page load i got the following error in the console, but I don't really know where it comes from (but everything seems to work without problems):

     

    Uncaught TypeError: Cannot read property 'get' of null

    makeWidgetInfo @ VM4882:94
    (anonymous function) @ VM4882:507

     

    Does anyone have an idea how to fix this?

     Thanks!

  2. Plamen Lazarov
    Admin
    Plamen Lazarov avatar
    135 posts

    Posted 26 Aug 2015 Link to this post

    Hi Benjamin,

    The provided information is not sufficient enough in order to determine what exactly goes wrong. We would need a runnable repro demo or a Dojo project where the issue is present - in this way we can investigate it locally and pinpoint the reason for the described error.   
    Regards,
    Plamen Lazarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Gal
    Gal avatar
    48 posts
    Member since:
    Apr 2009

    Posted 30 Aug 2015 in reply to Plamen Lazarov Link to this post

    Hi Any additional information regarding this error ? 

     

  5. Gal
    Gal avatar
    48 posts
    Member since:
    Apr 2009

    Posted 30 Aug 2015 Link to this post

    This is whare I'm getting the error and it's while navigating to a view. 
  6. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 01 Sep 2015 Link to this post

    Hello Gal,

     

    we haven't received the necessary details to reproduce the problem on our side. From what I see in your screenshot, you override some of the framework internals, like Widget instantiation. I can't be certain if this is the problem, though. 

     

    I may suggest that you isolate your problem (make sure that you strip any unnecessary parts, including the aforementioned overrides) and send it to us. 

     

    Regards,
    Petyo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  7. Benjamin
    Benjamin avatar
    21 posts
    Member since:
    Apr 2015

    Posted 28 Oct 2015 Link to this post

    Hi,

     I think i got the reason the for the error. Most of our Widgets are bound to an ASP.Net WepApi OData Feed. When I receive null values from the API this error appears. 

     

     

  8. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 30 Oct 2015 Link to this post

    Hi Benjamin,

    indeed, an error of such kind may occur if you bind to nested properties of null values. Is this the case?

    Regards,
    Petyo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  9. Marius
    Marius avatar
    6 posts
    Member since:
    Mar 2016

    Posted 16 Mar Link to this post

    Hi,

    I am having getting the same Error (Uncaught TypeError: Cannot read property 'get' of null -> makeWidgetInfo), but i cannot reliably reproduce it. It seems to appear at Random on different Subpages of my Application, but not on every page load and when i reload the afflicted Page it disappears. The Problem is that when the Error occurs the Grid doesnt show the Data (even though the Data is correctly loaded when I look in the Browser DevTools) .

    I use the AngularJS Directive to control the Grid and Remote Data Binding. For Routing I use angular-ui-router.

    Here is my Grid Remote Data Config (CoffeeScript):

    transport:
            read: (options) =>
              $.ajax(
                data: getParams()
                url: collectionUrl
                type: 'get'
                headers:
                  Authorization: sessionStorage.getItem('authData')
                dataType: 'json'
                success: (response) =>
                  for result, i in response
                    result.Edit = '<button class="btn btn-link" ng-click="editItem(\'' + result._ItemId + '\')"><div class="glyphicon glyphicon-arrow-right"></div></button>'
                  options.success(response)
                  for column in $scope.grid.columns
                    $scope.grid.autoFitColumn(column)
                  $scope.grid.pager.bind("change", onPageChange)
                error: (response, textStatus, errorThrown) =>
                  options.error(response, textStatus, errorThrown)
                  errorService.pushHttpError('GetCollection', textStatus, response, "")
              )

  10. Marius
    Marius avatar
    6 posts
    Member since:
    Mar 2016

    Posted 16 Mar in reply to Marius Link to this post

    Edit: Ok now im not even sure if the Error and the Data not being shown in the Grid are completely related, since I sometimes also seem to get the Error on Page Change / Load to a Page with the Grid, but the Data is shown most of the Time.

    Also the Error is inconsistently listed multiple Times (mostly 2x) in the Console sometimes.

  11. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 18 Mar Link to this post

    Hello,

    this does not seem to be related to the thread in question. I may suggest that you open a new support thread, along with a runnable example. Notice that we are not familiar with CoffeeScript specifics, so please transpile your case to plain javascript in order to rule out the possibility of a CoffeeScript specific error. Thank you in advance. 

    Regards,
    Petyo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  12. Marius
    Marius avatar
    6 posts
    Member since:
    Mar 2016

    Posted 22 Mar in reply to Petyo Link to this post

    Hi,

    yeah sorry I thought it may be related but it doesnt seem so. I kinda maybe resolved my Problem somehow by now, so I guess you could delete my Posts in this Thread, because they are unrelated, if you want to.

    Regards,

    Marius

Back to Top
Kendo UI is VS 2017 Ready