Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemSetting.java Receiver not registered: com.ninty.system.setting.SystemSetting$4@f8b3066 #125

Open
pkt-dev opened this issue Dec 18, 2020 · 0 comments

Comments

@pkt-dev
Copy link

pkt-dev commented Dec 18, 2020

Causing app foreground service to crash, partial stack:

Caused by: java.lang.IllegalArgumentException: Receiver not registered: com.ninty.system.setting.SystemSetting$4@f8b3066
at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1430)
at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1564)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:664)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:664)
at com.ninty.system.setting.SystemSetting.onHostDestroy(SystemSetting.java:558)
at com.facebook.react.bridge.ReactContext.onHostDestroy(ReactContext.java:254)

Looks like there might be a typo here:

        if (locationModeBR != null) {
            mContext.unregisterReceiver(locationModeBR);
            locationBR = null;
        }

Also was going to put trycatch around the unregisters. Here is the pr -> #124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant