nearby: Failed to start discovery with Google Play services 23.34.14
Project
Nearby Connections
Language
Kotlin
OS Platform
Android (com.google.android.gms:play-services-nearby:18.7.0)
What happened?
With Google Play services 23.34.14 I get attached error every time I call startDiscovery. It doesn’t matter which strategy I choose. With older version of Google Play services everything works as expected. Tested e.g. on 22.06.18.
Issue can be reproduced on different phones (OnePlus 6 - Android 11, Samsung S20 FE - Android 12, Samsung A21s - Android 11).
What did you expect to happen?
Nearby Connections should start discovery successfully on the latest version of Google Play services
How can we reproduce it (as minimally and precisely as possible)?
- Call startDiscovery method on a phone with Google Play services 23.34.14 installed
How often does this bug happen?
Every time
Relevant log output
Failed to start discovery.
com.google.android.gms.common.api.ApiException: 17: API: Nearby.CONNECTIONS_API is not available on this device. Connection failed with: ConnectionResult{statusCode=INTERNAL_ERROR, resolution=null, message=null}
at com.google.android.gms.common.api.internal.zad.zad(com.google.android.gms:play-services-base@@18.0.1:1)
at com.google.android.gms.common.api.internal.zabq.zaE(com.google.android.gms:play-services-base@@18.0.1:7)
at com.google.android.gms.common.api.internal.zabq.zaD(com.google.android.gms:play-services-base@@18.0.1:2)
at com.google.android.gms.common.api.internal.zabq.zar(com.google.android.gms:play-services-base@@18.0.1:24)
at com.google.android.gms.common.api.internal.zabq.onConnectionFailed(com.google.android.gms:play-services-base@@18.0.1:1)
at com.google.android.gms.common.internal.zai.onConnectionFailed(com.google.android.gms:play-services-base@@18.0.1:1)
at com.google.android.gms.common.internal.zzf.zzb(com.google.android.gms:play-services-basement@@18.1.0:2)
at com.google.android.gms.common.internal.zza.zza(com.google.android.gms:play-services-basement@@18.1.0:3)
at com.google.android.gms.common.internal.zzc.zze(com.google.android.gms:play-services-basement@@18.1.0:3)
at com.google.android.gms.common.internal.zzb.handleMessage(com.google.android.gms:play-services-basement@@18.1.0:31)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
Anything else we need to know?
startAdvertising method works as expected
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Reactions: 24
- Comments: 30
We found & fixed the issue, but we need to push an update to Google Play services and that’ll take some time. If you use an older version of the SDK, does it work?
@Xlythe an approximate ETA on new Google Play Services update, would be really apprecated - days… or weeks?
@Xlythe can you take a look?
Here are the details (first bullet is the instructions to be immediately allow listed while we roll out the fix):
@huynhj02 I did it by going to Settings -> Apps -> Google Play services. Then tap on the three dots in the top right corner and choose “Uninstall updates”
If your development is blocked by this issue, you can join our play service beta: https://play.google.com/apps/testing/com.google.android.gms We are rolling out a fix in the beta version.
Works for me now
Hope it gets fixed soon because it breaks functionality