android.app.ServiceConnectionLeaked: Activity com.bla.bla.MainActivity has leaked ServiceConnection com.marianhello.react.BackgroundGeolocationModule$1@39337a07 that was originally bound here
Searched on Google with the first line of a JAVA stack trace?
We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.
Recommended solutions based on your search
Samebug tips
It's because the service you bind with activity is not stopped when that activity is destroyed. The service remains in the memory causes this exception. To solve this call
doBindService()
inonCreate()
anddoUnbindService()
inonDestroy()
Solutions on the web
via GitHub by BigPun86
, 1 year agovia Stack Overflow by BigPun86
, 1 year agovia GitHub by vincenzoiacovone
, 1 year agovia evervolv.com by Unknown author, 1 year ago
via google.com by Unknown author, 1 year ago
via GitHub by c3ph3us
, 1 year agoandroid.app.ServiceConnectionLeaked: Activity com.bla.bla.MainActivity has leaked ServiceConnection com.marianhello.react.BackgroundGeolocationModule$1@39337a07 that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.
(LoadedApk.java:1077) at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:971)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1782)
at android.app.ContextImpl.bindService(ContextImpl.java:1765)
at android.content.ContextWrapper.bindService(ContextWrapper.java:539)
at com.marianhello.react.BackgroundGeolocationModule.doBindService(BackgroundGeolocationModule.java:277)
at com.marianhello.react.BackgroundGeolocationModule.startAndBindBackgroundService(BackgroundGeolocationModule.java:242)
at com.marianhello.react.BackgroundGeolocationModule.start(BackgroundGeolocationModule.java:215)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:319)
at com.facebook.react.bridge.NativeModuleRegistry$ModuleDefinition.call(NativeModuleRegistry.java:187)
at com.facebook.react.bridge.NativeModuleRegistry.call(NativeModuleRegistry.java:62)
at com.facebook.react.bridge.CatalystInstanceImpl$NativeModulesReactCallback.call(CatalystInstanceImpl.java:432)
at com.facebook.react.bridge.queue.NativeRunnableDeprecated.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:135)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:193)
at java.lang.Thread.run(Thread.java:818)