Firebase-android-sdk: SecurityException: Not allowed to bind to service

Created on 14 Oct 2020  路  7Comments  路  Source: firebase/firebase-android-sdk

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in __the code in this repository__.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: Android studio 4.0
  • Firebase Component: Messaging (Database, Firestore, Storage, Functions, etc)
  • Component version: 20.2.4

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

I am not able to reproduce the issue, mainly WIKO devices are affected by that one.

image

Relevant Code:

It seems that the Service cannot be bound due to security problems.
I review my manifest permissions and I am including the com.google.android.c2dm.permission.RECEIVE permission, needed for the com.google.android.c2dm.intent.REGISTER intent.

Fatal Exception: java.lang.SecurityException: Not allowed to bind to service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms }
       at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1741)
       at android.app.ContextImpl.bindService(ContextImpl.java:1651)
       at android.content.ContextWrapper.bindService(ContextWrapper.java:705)
       at com.google.android.gms.common.stats.ConnectionTracker.zza$3e27c581(ConnectionTracker.java:41)
       at com.google.android.gms.common.stats.ConnectionTracker.zza(ConnectionTracker.java:10)
       at com.google.android.gms.common.stats.ConnectionTracker.bindService(ConnectionTracker.java:43)
       at com.google.firebase.iid.MessengerIpcClient$Connection.startConnection(MessengerIpcClient.java:25)
       at com.google.firebase.iid.MessengerIpcClient$Connection.enqueueRequest(MessengerIpcClient.java:9)
       at com.google.firebase.iid.MessengerIpcClient.sendRequest(MessengerIpcClient.java:20)
       at com.google.firebase.iid.MessengerIpcClient.sendOneWayRequest(MessengerIpcClient.java:14)
       at com.google.firebase.messaging.FirebaseMessagingService.ackMessage(FirebaseMessagingService.java:102)
       at com.google.firebase.messaging.FirebaseMessagingService.handleMessageIntent(FirebaseMessagingService.java:32)
       at com.google.firebase.messaging.FirebaseMessagingService.handleIntent(FirebaseMessagingService.java:23)
       at com.google.firebase.messaging.EnhancedIntentService.lambda$processIntent$0$EnhancedIntentService(EnhancedIntentService.java:43)
       at com.google.firebase.messaging.EnhancedIntentService$$Lambda$0.run(EnhancedIntentService.java:2000)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at com.google.android.gms.common.util.concurrent.zza.run(zza.java:6)
       at java.lang.Thread.run(Thread.java:919)
messaging

Most helpful comment

Hi @brunoescalona, and thanks for the bug report! We're actively looking into similar reports (internal ref b/168922691) that seem to be affecting that same slice of devices, and this gives us another data point indicating it may be something device-specific. We haven't settled on a solution just yet, but the team has proposed a couple of different ideas and hopefully we'll have something to share here soon.

All 7 comments

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

Hi @brunoescalona, and thanks for the bug report! We're actively looking into similar reports (internal ref b/168922691) that seem to be affecting that same slice of devices, and this gives us another data point indicating it may be something device-specific. We haven't settled on a solution just yet, but the team has proposed a couple of different ideas and hopefully we'll have something to share here soon.

Thanks @ciarand! I will wait for the possible solution.

I noticed the same bug in an application I'm maintaining. So far it only occurred on Wiko View 4 devices running Android 10.

Hello. We have the same error too.
Only three devices prduced this Exception: Wiko View4 Lite, General Mobile GM10, Wiko View4 with Android 10.

Hey @ciarand , are there any updates on this issue? Maybe there is already some plan for a mitigation? Or maybe some way to work around and prevent that crash? This problem is the cause of 50% of all crashes we are seeing within our app.

Hey @ciarand another 2 weeks passed, any updates? Anything that we could do to fix/work around/debug/help solving this issue? We are counting 50k crashes caused by this problem with our latest release.

Was this page helpful?
0 / 5 - 0 ratings