revtel / react-native-nfc-manager

React Native NFC module for Android & iOS
MIT License
1.35k stars 317 forks source link

MainActivity has leaked IntentReceiver community.revteltech.nfc.NfcManager$2@63920d1 that was originally registered here. Are you missing a call to unregisterReceiver()? #621

Closed abdullah-mylobby closed 1 year ago

abdullah-mylobby commented 1 year ago

I am experiencing this crash

Activity com.mylobby.co.MainActivity has leaked IntentReceiver community.revteltech.nfc.NfcManager$2@63920d1 that was originally registered here. Are you missing a call to unregisterReceiver()?
                                                                                                    android.app.IntentReceiverLeaked: Activity com.mylobby.co.MainActivity has leaked IntentReceiver community.revteltech.nfc.NfcManager$2@63920d1 that was originally registered here. Are you missing a call to unregisterReceiver()?
                                                                                                        at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:1159)
                                                                                                        at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:946)
                                                                                                        at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1306)
                                                                                                        at android.app.ContextImpl.registerReceiver(ContextImpl.java:1286)
                                                                                                        at android.app.ContextImpl.registerReceiver(ContextImpl.java:1280)
                                                                                                        at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:586)
                                                                                                        at community.revteltech.nfc.NfcManager.start(NfcManager.java:816)
                                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                                        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
                                                                                                        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
                                                                                                        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
                                                                                                        at android.os.Handler.handleCallback(Handler.java:755)
                                                                                                        at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                                        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
                                                                                                        at android.os.Looper.loop(Looper.java:154)
                                                                                                        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)

Previously it was working fine. But now it crashes. My react native version is react 16.13.1, react-native: 0.63.2

What is the issue

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 5 days with no activity.