This is a migrated thread and some comments may be shown as answers.

Uncaught TypeError: Cannot read property 'get' of null

10 Answers 3613 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 24 Aug 2015, 09:54 AM

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!

10 Answers, 1 is accepted

Sort by
0
Plamen Lazarov
Telerik team
answered on 26 Aug 2015, 08:54 AM

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!
 
0
Gal
Top achievements
Rank 2
answered on 30 Aug 2015, 05:42 PM

Hi Any additional information regarding this error ? 

 

0
Gal
Top achievements
Rank 2
answered on 30 Aug 2015, 05:47 PM
This is whare I'm getting the error and it's while navigating to a view. 
0
Petyo
Telerik team
answered on 01 Sep 2015, 08:06 AM

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!
 
0
Simon
Top achievements
Rank 1
answered on 28 Oct 2015, 08:26 AM

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. 

 

 

0
Petyo
Telerik team
answered on 30 Oct 2015, 07:22 AM
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!
 
0
Marius
Top achievements
Rank 1
answered on 16 Mar 2016, 08:58 AM

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, "")
          )

0
Marius
Top achievements
Rank 1
answered on 16 Mar 2016, 09:26 AM

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.

0
Petyo
Telerik team
answered on 18 Mar 2016, 08:01 AM
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!
 
0
Marius
Top achievements
Rank 1
answered on 22 Mar 2016, 08:26 AM

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

Roldan
Top achievements
Rank 1
commented on 21 Jan 2022, 06:26 PM | edited

Hello, I am currently working on a react project using Data Grids and I am getting the same error when I scroll down the page(not the data grid). I have 2 accordion displaying them and only happens when I open and scroll on the 2nd accordion. The error results to broken page if I continue scrolling. The error only happens if I open the 2nd accordion and then scroll.

I have searched solutions over the net and most of the answer is that it happens when a data returns a null value. The error only occurs when I scroll but the data is displayed correctly. I am using states to assign the data from my API and I am using that state as the data prop for my data grid. I don't think the state data is updated to null when I scroll since I am not using the prop onScroll in my data Grid.

Neli
Telerik team
commented on 25 Jan 2022, 11:20 AM

Hi Roland,

I am afraid that the provided information is not sufficient to suggest what is the cause of the observed issue. Could you please confirm if you are using Kendo UI for jQuery widgets in a React application or you are using the Kendo React components? 

- https://www.telerik.com/kendo-react-ui/

Could you please share more details on the exact configuration on your side? 

Looking forward to your reply.

Regards,

Neli

 

Tags
General Discussions
Asked by
Simon
Top achievements
Rank 1
Answers by
Plamen Lazarov
Telerik team
Gal
Top achievements
Rank 2
Petyo
Telerik team
Simon
Top achievements
Rank 1
Marius
Top achievements
Rank 1
Share this question
or