jpush / jpush-react-native

JPush's officially supported React Native plugin (Android & iOS). 极光推送官方支持的 React Native 插件(Android & iOS)。
http://docs.jiguang.cn
MIT License
1.35k stars 340 forks source link

最新版本android ios无法移除监听 #859

Closed HeMa321 closed 2 years ago

HeMa321 commented 2 years ago

你的运行环境

期望效果

消息正常推送一次,退出登录的时候可以正常移除监听

实际效果

image

tagAliasListener:{"sequence":6,"alias":"7ebedb8c5275497b9203045e338d034e","code":0} 2021-11-11 17:58:28.260925+0800 NcSystemApp[19322:4195426] [javascript] tagAliasListener:{"sequence":6,"alias":"7ebedb8c5275497b9203045e338d034e","code":0} 2021-11-11 17:58:28.261677+0800 NcSystemApp[19322:4195426] [javascript] tagAliasListener:{"sequence":6,"alias":"7ebedb8c5275497b9203045e338d034e","code":0} 2021-11-11 17:58:28.290421+0800 NcSystemApp[19322:4195426] [javascript] tagAliasListener:{"sequence":1,"tags":["hb1NtTKh","hb1YNEWZ","fCabQOYH","8QeNynOn","fiHtcq7x","f6Skpr3h","hQTSXHFZ"],"code":0} 2021-11-11 17:58:28.290468+0800 NcSystemApp[19322:4195426] [javascript] tagAliasListener:{"sequence":1,"tags":["hb1NtTKh","hb1YNEWZ","fCabQOYH","8QeNynOn","fiHtcq7x","f6Skpr3h","hQTSXHFZ"],"code":0} 2021-11-11 17:58:28.290511+0800 NcSystemApp[19322:4195426] [javascript] tagAliasListener:{"sequence":1,"tags":["hb1NtTKh","hb1YNEWZ","fCabQOYH","8QeNynOn","fiHtcq7x","f6Skpr3h","hQTSXHFZ"],"code":0}

2021-11-11 17:59:17.262323+0800 NcSystemApp[19322:4195426] [javascript] tagAliasListener:{"sequence":7,"code":0} 2021-11-11 17:59:17.262323+0800 NcSystemApp[19322:4195426] [javascript] tagAliasListener:{"sequence":7,"code":0} 2021-11-11 17:59:17.262344+0800 NcSystemApp[19322:4195426] [javascript] tagAliasListener:{"sequence":7,"code":0} 2021-11-11 17:59:17.295466+0800 NcSystemApp[19322:4195426] [javascript] tagAliasListener:{"sequence":4,"code":0} 2021-11-11 17:59:17.295493+0800 NcSystemApp[19322:4195426] [javascript] tagAliasListener:{"sequence":4,"code":0} 2021-11-11 17:59:17.295512+0800 NcSystemApp[19322:4195426] [javascript] tagAliasListener:{"sequence":4,"code":0}

image

2021-11-12 09:27:54.470014+0800 NcSystemApp[20172:4353786] [javascript] removeListener=====before= 2021-11-12 09:27:54.470413+0800 NcSystemApp[20172:4353786] [javascript] 'removeListener=====before?=', undefined

重现步骤

  1. 多次退出/登录 监听方法随次数增多 调用JPush.removeListener();无法移除监听

Debug logs

包括 Android 或 iOS 的日志: