NativeScript / NativeScript/plugins
[@nativescript/local-notifications] App crash when addOnMessageClearedCallback
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 206
- Forks
- 123
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 1
Description
The app crashed when setting a callback for the user clearing the notification.
Error: Unable to start receiver com.telerik.localnotifications.NotificationClearedReceiver: com.tns.NativeScriptException: Cannot find object id for instance=com.tns.gen.com.telerik.localnotifications.LocalNotificationsPluginListener@ce7d97
System.err: com.tns.NativeScriptException: Error: Cannot convert object to Ljava/lang/Throwable; at index 0
System.err: at com.tns.Runtime.passExceptionToJsNative(Native Method)
System.err: at com.tns.Runtime.passUncaughtExceptionToJs(Runtime.java:84)
System.err: at com.tns.NativeScriptUncaughtExceptionHandler.uncaughtException(NativeScriptUncaughtExceptionHandler.java:34)
System.err: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1073)
System.err: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
System.err: at java.lang.Thread.dispatchUncaughtException(Thread.java:2203)
NativeScript: 7.3.0
Device: Samsung A52 Android 11
@nativescript/local-notifications: "^5.1.0"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the crash when setting addOnMessageClearedCallback on Android with NativeScript 7.3.0, then inspect the notification-cleared callback path in @nativescript/local-notifications. Done means clearing a notification invokes the callback without the NativeScriptException or app crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100