question

adm-ms avatar image
adm-ms asked

PrivateADMRegistrationService has leaked ServiceConnection

Hi, My application is working fine, but I just keep getting the following error message. I even got it in the sample application. Should we be concerned about this? 07-18 11:27:59.473: ERROR/ActivityThread(6974): Service com.amazon.device.messaging.PrivateADMRegistrationService has leaked ServiceConnection com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$CredentialManagerServiceConnection@41723be0 that was originally bound here android.app.ServiceConnectionLeaked: Service com.amazon.device.messaging.PrivateADMRegistrationService has leaked ServiceConnection com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$CredentialManagerServiceConnection@41723be0 that was originally bound here at android.app.LoadedApk$ServiceDispatcher. (LoadedApk.java:1024) at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:918) at android.app.ContextImpl.bindService(ContextImpl.java:1156) at android.content.ContextWrapper.bindService(ContextWrapper.java:387) at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager.synBindService(AmazonCredentialManager.java:409) at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager.access$2(AmazonCredentialManager.java:375) at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$BindAndDoTask.doInBackground(AmazonCredentialManager.java:527) at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$BindAndDoTask.doInBackground(AmazonCredentialManager.java:1) at com.amazon.identity.auth.device.authorization.api.AbstractCredentialManagerAsyncTask.doInBackground(AbstractCredentialManagerAsyncTask.java:1) at android.os.AsyncTask$2.call(AsyncTask.java:264) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) at java.lang.Thread.run(Thread.java:856) Thanks
amazon device messaging
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bipin@Amazon avatar image
Bipin@Amazon answered
Hi, Thanks for bringing this issue to our notice. We have forwarded the issue to the concerned team. There is nothing the application should be worried about. We will update once the issue is finalized.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Games2win avatar image
Games2win answered
Is there any update to this thread? I can confirm that this error only seems to appear if a application is running when it receives a ADM message. No notification is then displayed to the user. If the applicaiton is not running, ADMs work fine. 08-28 05:08:20.252: E/ActivityThread(12238): Service com.amazon.device.messaging.PrivateADMRegistrationService has leaked ServiceConnection com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$CredentialManagerServiceConnection@41735380 that was originally bound here 08-28 05:08:20.252: E/ActivityThread(12238): android.app.ServiceConnectionLeaked: Service com.amazon.device.messaging.PrivateADMRegistrationService has leaked ServiceConnection com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$CredentialManagerServiceConnection@41735380 that was originally bound here 08-28 05:08:20.252: E/ActivityThread(12238): at android.app.LoadedApk$ServiceDispatcher. (LoadedApk.java:980) 08-28 05:08:20.252: E/ActivityThread(12238): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:874) 08-28 05:08:20.252: E/ActivityThread(12238): at android.app.ContextImpl.bindService(ContextImpl.java:1404) 08-28 05:08:20.252: E/ActivityThread(12238): at android.content.ContextWrapper.bindService(ContextWrapper.java:387) 08-28 05:08:20.252: E/ActivityThread(12238): at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager.synBindService(AmazonCredentialManager.java:409) 08-28 05:08:20.252: E/ActivityThread(12238): at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager.access$2(AmazonCredentialManager.java:375) 08-28 05:08:20.252: E/ActivityThread(12238): at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$BindAndDoTask.doInBackground(AmazonCredentialManager.java:527) 08-28 05:08:20.252: E/ActivityThread(12238): at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$BindAndDoTask.doInBackground(AmazonCredentialManager.java:1) 08-28 05:08:20.252: E/ActivityThread(12238): at com.amazon.identity.auth.device.authorization.api.AbstractCredentialManagerAsyncTask.doInBackground(AbstractCredentialManagerAsyncTask.java:1) 08-28 05:08:20.252: E/ActivityThread(12238): at android.os.AsyncTask$2.call(AsyncTask.java:264) 08-28 05:08:20.252: E/ActivityThread(12238): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) 08-28 05:08:20.252: E/ActivityThread(12238): at java.util.concurrent.FutureTask.run(FutureTask.java:137) 08-28 05:08:20.252: E/ActivityThread(12238): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) 08-28 05:08:20.252: E/ActivityThread(12238): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 08-28 05:08:20.252: E/ActivityThread(12238): at java.lang.Thread.run(Thread.java:856)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Games2win, Good to see your post again. We got the confirmation from the concerned team that this exception/message can be ignored and it wont affect to the app in any way. So when you receive the message in the app while its running, do you see any problem other than the stack trace in the logcat? What notification you are unable to see that time? Please clarify!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

nyt-junior-dev avatar image
nyt-junior-dev answered
Hi I have this error too. However it seems like I never get a registration ID from ADM. Do you think this is the source of my problem?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

adm-support avatar image
adm-support answered
Hi guys, I am a developer on the ADM team. I assure you this exception is completely innocuous and not the cause of the issue you are facing. Have you verified that your manifest is authored correctly? You can use the ADMManifest.checkManifestAuthoredProperly() method to verify your manifest as detailed here: https://developer.amazon.com/public/apis/engage/device-messaging/tech-docs/04-integrating-your-app-with-adm
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Joseph joshua avatar image
Joseph joshua answered
Same problem we are also facing. Unable to get registration id for kindle fire emulator. I have followed the same steps what you have mentioned in Integrating app with ADM. And i have the api_key in the assets folder. Please help me to fix this exception. Exception : [ADM][Register]Could not find application ID for package com.packagename Did you forget to embed it?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Keshav, I would suggest you to run the sample app that is shipped with ADM sdk. I have checked that the sample in Kindle Emulator and I am getting the registration Id back from SDK. Apps-SDK.zip --> Android\DeviceMessaging\samples\ADMMessenger Create or select a security profile in your Developer Portal account, add an API Key with the same package name and the MD5 finger print of the certificate you are using to sign your app, replace the API key in assets/api_key.txt file. Build and run the app in Kindle emulator (emulator must be registered with your Amazon account). You should be able to receive the registration ID. If this does not work, please let me know.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.