Cannot read property 'registerCallbacks' of undefined
See original GitHub issueHello,
I am using NativeScript with Angular and Typescript. When I load the component which implements LocalNotifications.addOnMessageReceivedCallback
or attempt to schedule a notification, I get a console error:
ERROR TypeError: Cannot read property ‘registerCallbacks’ of undefined NovenaScheduleComponent_Host.ngfactory.js? [sm]:1
My component: novena-schedule.component.ts
My template: novena-schedule.component.html
My whole project is here
Any help would be greatly appreciated. I am fairly new to all this so any I would be grateful for any requests for clarification, logs, etc.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:16 (3 by maintainers)
Top Results From Across the Web
Cannot read property of undefined when calling method as a ...
the problem is when I access my method using callback from table component (Child) I got undefined. but when I try to move...
Read more >Getting "Cannot read property '0' of undefined" exception ...
I am having the exception “Cannot read property '0' of undefined” while using Custom Database Create Action Script.
Read more >Creator 2.x - Cocos中文社区
请问哪位大佬知道是啥问题?微信小游戏报错VM20:202 gameThirdScriptError Cannot read property '_owner' of undefined;at setTimeout callback f…
Read more >Class: AWS.Request — AWS SDK for JavaScript
For example, the following service method returns the request object as "request", which can be used to register callbacks: // request is an...
Read more >Cannot read property 'mode' of undefined | 微信开放社区 - 腾讯
registerCallback.t ... Cannot read property 'mode' of undefined;at api onAppEnterBackground callback function. TypeError: Cannot read ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran into a similar issue with a fresh install in a previously established project. I’m using a local build. Running
tns platform clean
followed bytns build android
resolved the problem.Maybe just update the docs to note that a platform clean is necessary to get it working.
That’s required for every plugin that uses native libs. Not sure what the best approach would be. Perhaps an automatic clean after adding the plugin would help.