Cannot read properties of null (reading 'elementRef') at a.ngOnInit

I'm having the same issue with the RichTextEditor component after updating to version 19.4.40:

This is the error I see:

Cannot read properties of null (reading 'elementRef') TypeError: Cannot read properties of null (reading 'elementRef')

    at ComponentBase.push../node_modules/@syncfusion/ej2-angular-richtexteditor/node_modules/@syncfusion/ej2-angular-base/src/component-base.js.ComponentBase.ngOnInit


Extra info:

version "19.4.40"

  resolved "https://registry.yarnpkg.com/@syncfusion/ej2-angular-richtexteditor/-/ej2-angular-richtexteditor-19.4.40.tgz#2cc51c8634e53c9ef10c7b17736a09ad96f086fb"

  integrity sha512-sY5dFG8/oE0Ej59UmPsvGVl1gEr6GuI4zaL9VFOoAX6q6nHjNmSm8kjZfQ0LrZJroTG9+ZxbwttgTwLACfwxMw==

  dependencies:

    "@syncfusion/ej2-angular-base" "~19.4.40"

    "@syncfusion/ej2-base" "~19.4.38"

    "@syncfusion/ej2-richtexteditor" "19.4.40"


5 Replies

AO Adolfo Oestereich January 3, 2022 07:47 PM UTC

I recently updated to last version of the syncfusion components but i have an issue with the textbox component.

I'm getting the error :

ERROR TypeError: Cannot read properties of null (reading 'elementRef')


I tried to create a new and simple textbox to test if the error will occur again, and it did.



After that i tried to add a @ViewChild with static true but still getting the error.


The only wierd thing is that this error only occur on the textbox component, i've tested others components and they work correctly.


maybe u can help me with that?


Also, i tested this in ej2-angular-inputs version 19.4.38, and tried to return to 19.3.57 to see if still get the error and still getting it.


Obs:

I'm using angular 12 and node 15.

Package Json :




PM Ponmani Murugaiyan Syncfusion Team January 4, 2022 09:46 AM UTC

Hi Ezequiel, 

Greetings from Syncfusion support. 

Query1: TypeError: Cannot read properties of null (reading 'elementRef') 
 
We have considered the reported issue as a defect. We will include this fix with weekly patch release which is scheduled on January 11, 2022. You can track the status of this bug using the below feedback portal link.  

Query2: Also getting error in stackblitz when using the example from. 
 
We will correct the sample and refresh in our end. For your convenience, we have resolved the error and attached sample in the below link. Please check it.  

To know more about the available properties and feature in our EJ2 TextBox component, please check with online documentation in the below link.  

Regards, 
Ponmani M


AO Adolfo Oestereich January 10, 2022 12:22 PM UTC

Now, after update to the new realease 19.4.41 i get a new error when trying to use a form control. 






SP Sureshkumar P Syncfusion Team January 11, 2022 01:38 PM UTC

Adolfo, 
 
Thanks for your update, we have validated your reported issue from our end with 19.4.41 version but the reported issue was not replicate from our end. we suggest you delete the node-modules folder and clear the NuGet cache then install the new latest package to resolve the issue. 
Still, you have facing same issue, then please replicate the issue in the attached sample and share the sample to us. These will help us to provide exact solution as earlier as possible. 
Regards, 
Sureshkumar P 


Loader.
Up arrow icon