question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DfuService has leaked IntentReceiver

See original GitHub issue

Using 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:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
philips77commented, Sep 15, 2016

Hi, I’ve just released 1.0.1 with this bug fixed. Closing issue.

0reactions
Alkisumcommented, Sep 6, 2016

Thanks for checking this out. I will use the 0.6.3 version for now.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found