Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SecurityException: Not allowed to bind to service #2062

Closed
brunoescalona-zz opened this issue Oct 14, 2020 · 56 comments
Closed

SecurityException: Not allowed to bind to service #2062

brunoescalona-zz opened this issue Oct 14, 2020 · 56 comments
Assignees

Comments

@brunoescalona-zz
Copy link

[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)
@google-oss-bot
Copy link
Contributor

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

@ciarand
Copy link
Contributor

ciarand commented Oct 15, 2020

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.

@brunoescalona-zz
Copy link
Author

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

@cbeyls
Copy link

cbeyls commented Nov 3, 2020

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

@IljaGnezdilov
Copy link

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

@awenger
Copy link

awenger commented Nov 30, 2020

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.

@awenger
Copy link

awenger commented Dec 16, 2020

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.

@mateensheikh
Copy link

Hi, we are also facing the same issue.
Devices: 100% QMobile
OS: 100% Android 10

@brunoescalona-zz
Copy link
Author

Hi! @ciarand could you push a bit this issue? Is one of our main crashes right now.

@iskugor
Copy link

iskugor commented Jan 4, 2021

I also noticed this crash on Cat S42 devices.

@houssemzaier
Copy link

houssemzaier commented Jan 13, 2021

Hello,
We have the same problem in our app FranceTvSport
It crashes on Wiko View4 , Wiko View4 Lite and Cat S42 and It is clear that your bug is still not fixed yet.
Can you please fix it or just respond to us.
Many thanks !!

@mshahabrauf
Copy link

Hi, We are also facing the same issue on QMobile.
image

@brunoescalona-zz
Copy link
Author

Is there any update on that issue?

@qtehfw
Copy link

qtehfw commented Feb 4, 2021

Same

Screen Shot 2021-02-04 at 1 50 44 PM

Update (March 11): Still only happening on the same device, and still 100% occurring in background state.

@Albul
Copy link

Albul commented Feb 17, 2021

Same for me, crashed on Wiko View4

@tallior
Copy link

tallior commented Feb 21, 2021

Same issue here. any workaround steps maybe? please update.

@Ruco
Copy link

Ruco commented Feb 24, 2021

Same issue seen on a HUAWEI ART-L29 running Android 9.

@iliaskomp
Copy link

Same crash on CAT S42 / Android 10 devices.

@goralm128
Copy link

Same crash on Cat S42, Android 10 device

@19snow93
Copy link

19snow93 commented Mar 9, 2021

Same crash on 100% TINNO SUGAR T20,,SUGAR T30, Android 10 device

@SaikCaskey
Copy link

Wow, I am also seeing this happen to our single CAT S42 Android 10 user in our production app 😮

@amanarora12
Copy link

Getting the same crash on LG W31, W11 and LM-K610IM as well. Any update on this issue?

@khushwaqt
Copy link

Same issue.

image

@alim1496
Copy link

alim1496 commented Apr 6, 2021

getting 100% crash on Symphony android 10 devices

@sebastianharder
Copy link

sebastianharder commented Apr 6, 2021

Crashes on Cat S42 and Wiko View4, both Android 10.

@asiljan
Copy link

asiljan commented Apr 6, 2021

Can confirm crashes on Cat S42 too
Screenshot 2021-04-06 at 13 55 54

@hussein-yassine
Copy link

I'm seeing the same crash on WIKO View4 Lite, any updates?

@mattylase
Copy link

Not to pile on, but I'm also still seeing this crash - Wiko View4 Lite and Cat S42 devices.

@whoislxy
Copy link

whoislxy commented Jun 8, 2021

I have this problem, how to solve it?

@JorisNext
Copy link

Same here, Wiko and Cat Android 10.
Could we get an update on the issue @ciarand?
Thank you

@prashant9934
Copy link

Have the same issue with the specific device -
batteryLevel : 42%
brand : lge
charging : false
cpuAbi :
[
"arm64-v8a",
"armeabi-v7a",
"armeabi"
]
dpi : 280
emulator : false
freeDisk : 102.3 GB
freeMemory : 529.9 MB
id : 73aefaa2-3c29-416a-9466-9e933be2993c
jailbroken : false
locale : en_US
locationStatus : allowed
manufacturer : LGE
model : W41 (LM-K610IM)
networkAccess : cellular
orientation : portrait
osName : android
osVersion : 10
runtimeVersions : {
"androidApiLevel": "29",
"osBuild": "QP1A.190711.020 release-keys"
}
screenDensity : 1.75
screenResolution : 1442x720
time : 2021-06-17T18:45:19.884Z
totalMemory : 536.9 MB

@kapilsukhyani
Copy link

Facing the same issue on Wiko, sad to see there have been no activity or suggestion on this issue

@Jerome-Liger
Copy link

Same here (with View4 and View4 Lite)
It makes more than 10 month this is impacting a lot of us... any update please ?

We need answers to our customers... WE ALL ENCOUNTER PRODUCTION CRITICAL CRASHES !!!

Thanks

@Jerome-Liger
Copy link

(at least a workaround, or a manner to catch a managedException will be appreciated...)

@agonist
Copy link

agonist commented Jul 26, 2021

Same here on Wiko View4 and View4 Lite. Android 10.

@eloisance
Copy link

eloisance commented Jul 26, 2021

Same here.

Did anyone knows how to reproduce, we have a WIKO View4 Lite Android 10 here but can't manage to reproduce it.

Screenshot 2021-07-26 at 09 41 09

@mrana247
Copy link

mrana247 commented Aug 9, 2021

Screenshot 2021-08-09 at 11-42-43

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.zzb(com.google.android.gms:play-services-basement@@17.6.0:11)
at com.google.android.gms.common.stats.ConnectionTracker.bindService(com.google.android.gms:play-services-basement@@17.6.0:2)
at com.google.android.gms.cloudmessaging.zzf.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:17)
at com.google.android.gms.cloudmessaging.zze.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:18)
at com.google.android.gms.cloudmessaging.zze.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:12)
at com.google.android.gms.cloudmessaging.CloudMessagingReceiver.zzb(com.google.android.gms:play-services-cloud-messaging@@16.0.0:43)
at com.google.android.gms.cloudmessaging.CloudMessagingReceiver.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:59)
at com.google.android.gms.cloudmessaging.zzd.run(:10)
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(com.google.android.gms:play-services-basement@@17.6.0:2)
at java.lang.Thread.run(Thread.java:919)

@dummy-amit
Copy link

image

facing for LG devices. Any luck with solution so far?

@LogeshM-rupeek
Copy link

We are facing the same issue in LG W31 model. Any solution or workaround will be appreciated. Thanks

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(com.google.android.gms:play-services-basement@@17.5.0:32)
at com.google.android.gms.common.stats.ConnectionTracker.zza(com.google.android.gms:play-services-basement@@17.5.0:10)
at com.google.android.gms.common.stats.ConnectionTracker.bindService(com.google.android.gms:play-services-basement@@17.5.0:41)
at com.google.android.gms.cloudmessaging.zzf.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:17)
at com.google.android.gms.cloudmessaging.zze.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:18)
at com.google.android.gms.cloudmessaging.zze.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:12)
at com.google.android.gms.cloudmessaging.CloudMessagingReceiver.zzb(com.google.android.gms:play-services-cloud-messaging@@16.0.0:43)
at com.google.android.gms.cloudmessaging.CloudMessagingReceiver.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:59)
at com.google.android.gms.cloudmessaging.zzd.run(:10)
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(com.google.android.gms:play-services-basement@@17.5.0:6)
at java.lang.Thread.run(Thread.java:919)

@ciarand
Copy link
Contributor

ciarand commented Sep 9, 2021

I'm no longer working at Google, but when I left this was on the team's radar. I think maybe @gsakakihara may be able to provide an update on the status of b/168922691

@ciarand ciarand removed their assignment Sep 9, 2021
@androideveloper
Copy link

We see a huge spike of this crash from yesterday (Android 10, 96% Wiko devices). Any updates here?

@gsakakihara
Copy link
Contributor

We've added a workaround that should stop it from crashing in version 17.0.0 of the play-services-cloud-messaging library. The next release of the FCM SDK should update to use that version of the library, including the workaround. You could try to add that version of the dependency directly, but I believe since the new version of the library contains a breaking change, you may run into incompatibilities with the current version of the FCM SDK and it may not build.

@gsakakihara gsakakihara self-assigned this Sep 27, 2021
@MichalStranik
Copy link

@gsakakihara Could you be so kind and clarify which version contains fix?

@yinyangwu
Copy link

image

@NStreet8579
Copy link

NStreet8579 commented Oct 18, 2021

Hi @gsakakihara, we are still facing the same issue for LG Devices, W41 & W31 using library 'com.google.firebase:firebase-messaging:20.1.0'

@gsakakihara
Copy link
Contributor

It hasn't been released yet, but the change should be included in the next release of the library, which is targeted in the next few weeks, barring any issues.

@firemaples
Copy link

@gsakakihara Do you mean the version com.google.firebase:firebase-messaging:23.0.0 that contains the workaround?

@gsakakihara
Copy link
Contributor

Yes, version 23.0.0 should include the workaround.

@androideveloper
Copy link

Was there any update on this starting from Nov 13? We see a huge drop in number of crashes here, even without the latest library update (firebase-messaging:23.0.0).

@gsakakihara
Copy link
Contributor

No, there isn't anything that I know of that could be changed remotely from our side that would cause the number of crashes to drop.

@androideveloper
Copy link

Weird. Now it's back again. Let's see if the latest version fixes it..
Screenshot 2021-11-19 at 15 48 01

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests