Hello, I have an error and I do not know where else to look for the source, nor how to narrow down the error. Therefore, it is very likely that (unfortunately) information is missing, since I did not want to post thousands of lines of code. Please ask for the missing information. It could well be a beginner bug, as I switched from a monolithic sequential programming language to PHP and Vue or Angular only a few months ago.
But back to the topic. When I save a form an error occurs as a result.
The following two errors show up in the console:
Error 1:
Error: Uncaught (in promise): TypeError: Cannot use 'in' operator to search for '__eventList' in null TypeError: Cannot use 'in' operator to search for '__eventList' in null
at EventHandler.addOrGetEventData (http://localhost:4200/vendor.js:12789:23)
at EventHandler.remove (http://localhost:4200/vendor.js:12853:36)
at Scroll.addStickyListener (http://localhost:4200/default-src_app_shared_custom-syncfusion_module_ts.js:66632:70)
at Scroll.destroy (http://localhost:4200/default-src_app_shared_custom-syncfusion_module_ts.js:66848:12)
at GridComponent.destroyDependentModules (http://localhost:4200/default-src_app_shared_custom-syncfusion_module_ts.js:68406:23)
at GridComponent.destroy (http://localhost:4200/default-src_app_shared_custom-syncfusion_module_ts.js:68375:10)
at QuestionAnswersComponent.ngOnDestroy (http://localhost:4200/src_app_modules_survey-editor_survey-editor_module_ts.js:140:62)
at executeOnDestroys (http://localhost:4200/vendor.js:107319:20)
at cleanUpView (http://localhost:4200/vendor.js:107202:5)
at destroyViewTree (http://localhost:4200/vendor.js:106980:11)
at resolvePromise (http://localhost:4200/polyfills.js:9121:19)
at resolvePromise (http://localhost:4200/polyfills.js:9068:9)
at http://localhost:4200/polyfills.js:9195:9
at _ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:8142:171)
at Object.onInvokeTask (http://localhost:4200/vendor.js:129021:25)
at _ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:8142:54)
at Zone.runTask (http://localhost:4200/polyfills.js:7903:37)
at drainMicroTaskQueue (http://localhost:4200/polyfills.js:8351:23)
at ZoneTask.invokeTask [as invoke] (http://localhost:4200/polyfills.js:8237:11)
at invokeTask (http://localhost:4200/polyfills.js:9661:12)
Error 2:
ERROR TypeError: Cannot use 'in' operator to search for '__eventList' in null
at EventHandler.addOrGetEventData (ej2-base.es2015.js:4413:13)
at EventHandler.remove (ej2-base.es2015.js:4468:40)
at Scroll.addStickyListener (ej2-grids.es2015.js:12690:13)
at Scroll.destroy (ej2-grids.es2015.js:12870:18)
at GridComponent.destroyDependentModules (ej2-grids.es2015.js:14250:27)
at GridComponent.destroy (ej2-grids.es2015.js:14225:14)
at component-base.js:162:35
at timer (zone.js:2405:41)
at _ZoneDelegate.invokeTask (zone.js:406:31)
at Object.onInvokeTask (core.mjs:26275:33)
I thought the error was coming from the QuestionAnswersComponent.ngOnDestroy, but even when i comment out the content the error appears. At the moment the code there is:
ngOnDestroy() {
if (this.grid?.destroy) {
this.grid?.destroy();
}
}During the step-by-step debugging, however, it became clear that the error only occurs after this method. I was able to narrow this down to at least after the router event: ResolveEnd with a router tracing (for lack of knowledge of a better way). the next event throws is a NavigationError with the following error:
"TypeError: Cannot use 'in' operator to search for '__eventList' in null
at EventHandler.addOrGetEventData (http://localhost:4200/vendor.js:12789:23)
at EventHandler.remove (http://localhost:4200/vendor.js:12853:36)
at Scroll.addStickyListener (http://localhost:4200/default-src_app_shared_custom-syncfusion_module_ts.js:66632:70)
at Scroll.destroy (http://localhost:4200/default-src_app_shared_custom-syncfusion_module_ts.js:66848:12)
at GridComponent.destroyDependentModules (http://localhost:4200/default-src_app_shared_custom-syncfusion_module_ts.js:68406:23)
at GridComponent.destroy (http://localhost:4200/default-src_app_shared_custom-syncfusion_module_ts.js:68375:10)
at QuestionAnswersComponent.ngOnDestroy (http://localhost:4200/src_app_modules_survey-editor_survey-editor_module_ts.js:141:64)
at executeOnDestroys (http://localhost:4200/vendor.js:107319:20)
at cleanUpView (http://localhost:4200/vendor.js:107202:5)
at destroyViewTree (http://localhost:4200/vendor.js:106980:11)"
I would be very happy about support.
Hi Sebastian,
Greetings from Syncfusion support.
Before proceeding with the solution, we would like to share the following details.
Regards,
Joseph I.