DfuService has leaked IntentReceiver
See original GitHub issueUsing the Android DFU Library 1.0.0, I receive the following error when the DFU successfully finishes:
09-05 13:19:43.407 29695-29695/no.nordicsemi.android.nrftoolbox E/ActivityThread: Service no.nordicsemi.android.nrftoolbox.dfu.DfuService has leaked IntentReceiver no.nordicsemi.android.dfu.BaseDfuImpl$1@96850a2 that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Service no.nordicsemi.android.nrftoolbox.dfu.DfuService has leaked IntentReceiver no.nordicsemi.android.dfu.BaseDfuImpl$1@96850a2 that was originally registered here. Are you missing a call to unregisterReceiver()?
at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:918)
at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:719)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1172)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1152)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1146)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:554)
at no.nordicsemi.android.dfu.BaseDfuImpl.<init>(BaseDfuImpl.java:218)
at no.nordicsemi.android.dfu.BaseCustomDfuImpl.<init>(BaseCustomDfuImpl.java:225)
at no.nordicsemi.android.dfu.LegacyDfuImpl.<init>(LegacyDfuImpl.java:127)
at no.nordicsemi.android.dfu.DfuServiceProvider.getDfuImpl(DfuServiceProvider.java:37)
at no.nordicsemi.android.dfu.DfuBaseService.onHandleIntent(DfuBaseService.java:963)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
This error occurs with the nRF Toolbox and also with my own application that uses the Android DFU Library. The tests have been ran with a Nexus 5X on Android 6.0.1.
Should something be done with the DFU library? Or with the apps using it?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
java - Service has leaked IntentReceiver that was originally ...
I'm using a foreground Android Service to request a resource with Retrofit, via REST API, as a timer every 60 seconds. Such service...
Read more >Intent.createChooser() can cause a BroadcastReceiver leak ...
createChooser(), it will leak a BroadcastReceiver if there's only possible option. ... ChooserActivity has leaked IntentReceiver com.android.internal.app.
Read more >unregisterReceiver error - MongoDB
MainActivity has leaked IntentReceiver io.realm.internal.network.NetworkStateReceiver@805ae25 that was originally registered here.
Read more >MainActivity has leaked IntentReceiver - MSDN - Microsoft
I have a problem taking pictures with Android via Dependency, my Dependency is the ... MainActivity has leaked IntentReceiver android.view.
Read more >Android – Broadcast Receiver in IntentService (Service has ...
The IntentService is supposed to compare Lists whenever onReceive is called. I always get the. "Service has leaked IntentReceiver".
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi, I’ve just released 1.0.1 with this bug fixed. Closing issue.
Thanks for checking this out. I will use the 0.6.3 version for now.