Skip to content

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

@pkt-dev

Description

@pkt-dev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions