NativeScript / NativeScript/plugins

[@nativescript/local-notifications] App crash when addOnMessageClearedCallback

未关闭
#158 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
206
派生
123
平均合并
2 天 1 小时
30 天内合并 PR
1

描述

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"

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先在 Android 上使用 NativeScript 7.3.0 设置 addOnMessageClearedCallback 时复现崩溃,然后检查 @nativescript/local-notifications 中的通知清除回调路径。完成标准是清除通知时能够调用回调,且不会出现 NativeScriptException 或应用崩溃。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, typescript
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。