Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Error when communicating with Google API(17): Nearby.EXPOSURE_NOTIFICATION_API is not available on this device #508

Closed
schildbach opened this issue Jun 16, 2020 · 53 comments
Labels
bug Something isn't working Google API issue Issues regarding Google API calls, for e.g. error 17

Comments

@schildbach
Copy link

Describe the bug

I get the following error after the first welcome screens:

Cause: 3
Something went wrong.
Error when communicating with Google API(17)

The exception trace has the message:

Nearby.EXPOSURE_NOTIFICATION_API is not available on this device

This is on a Pixel 2, all up to date. Bluetooth is enabled.

@schildbach schildbach added the bug Something isn't working label Jun 16, 2020
@corneliusroemer
Copy link

Very strange, this shouldn't happen in your case being all up to date with Google stock phone. Are you sure there's nothing out of the ordinary?

I had hoped they had fixed the crash at least by now. One could have hoped for a better diagnostic error description.

@Timo1993
Copy link

Same error on Xiaomi devices (in a beta version of the app). Are you going to support Custom ROMs as MIUI and other OS? The current version does not show this error (although it should still be present).

@corneliusroemer
Copy link

Same error on Xiaomi devices (in a beta version of the app). Are you going to support Custom ROMs as MIUI and other OS? The current version does not show this error (although it should still be present).

@Timo1993, they won't care about beta versions. Have you tried the release version from the app store?

@Timo1993
Copy link

There is no error. But I cannot believe that the API is available on Xiaomi devices. I guess that the message is suppressed. The hotline told me that it is not compatible. So there is no error, but it seems to be not compatible.

@negin-z
Copy link

negin-z commented Jun 16, 2020

Same error on Huawei p30 (EMUI 10.0.1, Android 10)

@Ole28
Copy link

Ole28 commented Jun 16, 2020

Same error on Xiaomi Redmi 5 plus. (MIUI Global 11.0.2, Android 8.1)
Only when I compile it myself. Playstore version works just fine I guess.

@schildbach
Copy link
Author

Very strange, this shouldn't happen in your case being all up to date with Google stock phone. Are you sure there's nothing out of the ordinary?

Not sure if that's relevant: I built and installed version 1.0.2 from source, signing with my debug key.

@uschindler
Copy link

@schildbach This error message happens also when at the time that app was started, the Google Play Services were not yet uptodate. See #513 for a possible issue.

In short: If you got the message to update Google Play Services after starting the app, then triggered the update and after installation switched back to CWA, the error 17 is coming. The stack trace on "details" shows old version of play services.

A restart of phone or the CWA app helps.

@uschindler
Copy link

uschindler commented Jun 16, 2020

Hi,

The exception trace has the message:

Nearby.EXPOSURE_NOTIFICATION_API is not available on this device

This is on a Pixel 2, all up to date. Bluetooth is enabled.

What play services version does the exception trace shows behind the @ sign?

@Aerysch
Copy link

Aerysch commented Jun 16, 2020

image
We deployed the app today company wide and got the message on multiple device models.
Attached is on from a Moto G7 Power.

@schildbach
Copy link
Author

What play services version does the exception trace shows behind the @ sign?

17.3.0. I don't think there was GPS update while trying the app. In any case, the error persists.

@uschindler
Copy link

uschindler commented Jun 16, 2020

That's obvious: 17.3.0 is old. at least 18.xxxx required.

Did you phone ask you for an update? I had an old one with 17.3, too (was switched off for 5 months). After start of app, the play services asked for an update, which I did. But the error was then coming back.

Issue is that app wasn't restarted after play services update. I would make sure that play services are up to date: https://play.google.com/store/apps/details?id=com.google.android.gms

Then for safety restart the phone (or at least kill the CoronaWarnApp and restart it).

I opened issue #513

@ThomasKramps
Copy link

Got the same error on a CAT S41.
Updating GoogePlay-Services helped.

@Ole28
Copy link

Ole28 commented Jun 16, 2020

I have play services version "20.21.15" and it shows me the same "17.3.0" version in the error code.
I don't know why it does this.

@Junimondschein
Copy link

Gleicher Fehler auf Huawei Mate 20x (EMUI 10.0.0.200 Android 10)

@freemin7
Copy link

Hatte das gleiche Problem beim Blackberry KEYONE. Da endete der Android support ebenfalls mit Version 8.1.
Nach etwas warten (hatte den Google Play Service erst frisch installiert) hat es dann geklappt.

@Junimondschein
Copy link

Junimondschein commented Jun 16, 2020 via email

@BerndGitH
Copy link

Same issue (after restart too) at Samsung Galaxy J5 Model SM-J510FN
Android 7.1.1

@irgendeinenrico
Copy link

irgendeinenrico commented Jun 16, 2020

https://youtu.be/_aYHUGoq_l8

Huawei P40 Pro, mit nach-installierten Google Play Diensten [Google Play Services Beta v20.18.17 (120400-311416286)]

Bzw, eine HMS(Huawei Mobile Services)-Version wäre gut

Edit:

Okay, I think I just found a fix (at least for me).

  • check in your Settings, if your Region and Language are set to German(y) before you install the App.
  • if you updated the Google Play Services after you changed you Region/Language, then repeat setting the Region/Language to German(y)
    I forgot to mention that if the App works after all of this, you can set your language back

@nilsalex
Copy link

Not sure if that's relevant: I built and installed version 1.0.2 from source, signing with my debug key.

A self-signed version cannot have access to the API, as this requires whitelisting.

@schildbach
Copy link
Author

A self-signed version cannot have access to the API, as this requires whitelisting.

So how can I whitelist my signature?

@nilsalex
Copy link

I'm afraid there's no way: corona-warn-app/cwa-documentation#214

@schildbach
Copy link
Author

I'm afraid there's no way: corona-warn-app/cwa-documentation#214

Then if I can't install from source, what's the source good for? Even a code review is worthless because I can't be sure what's in the binary unless I build it myself.

@nilsalex
Copy link

The intention is, of course, that only approved applications from health authorities can access the contact tracing data. I encountered this problem as well when I wanted to test earlier versions. But protecting the collected and emitted keys from other apps is crucial, isn't it?

There have been discussions about reproducible builds on github, if you like to have a look.

@schildbach
Copy link
Author

The intention is, of course, that only approved applications from health authorities can access the contact tracing data. I encountered this problem as well when I wanted to test earlier versions. But protecting the collected and emitted keys from other apps is crucial, isn't it?

Well, usually access to sensitive data is guarded by a grantable/deniable permission.

In this case however, the separation into different processes (and thus an interface between the two) would not even be necessary. If this app would collect the data itself it could consume it itself. No interface to more apps necessary.

There have been discussions about reproducible builds on github, if you like to have a look.

I'll have a look.

@jbauerrfid
Copy link

I found this issue as well on a Google Pixel 3. Retested with the app installed from Android Studio to grab the stack trace. The output is here:

2020-06-16 15:06:30.761 13539-13539/de.rki.coronawarnapp W/System.err: com.google.android.gms.common.api.ApiException: 17: API: Nearby.EXPOSURE_NOTIFICATION_API is not available on this device. Connection failed with: ConnectionResult{statusCode=UNKNOWN_ERROR_CODE(39507), resolution=null, message=null}
2020-06-16 15:06:30.761 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(com.google.android.gms:play-services-base@@17.3.0:4)
2020-06-16 15:06:30.761 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.api.internal.ApiExceptionMapper.getException(com.google.android.gms:play-services-base@@17.3.0:2)
2020-06-16 15:06:30.761 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.api.internal.zah.zaa(com.google.android.gms:play-services-base@@17.3.0:18)
2020-06-16 15:06:30.761 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zaa(com.google.android.gms:play-services-base@@17.3.0:211)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zaa(com.google.android.gms:play-services-base@@17.3.0:217)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zaa(com.google.android.gms:play-services-base@@17.3.0:115)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.onConnectionFailed(com.google.android.gms:play-services-base@@17.3.0:79)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.internal.zag.onConnectionFailed(com.google.android.gms:play-services-base@@17.3.0:2)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.internal.BaseGmsClient$zzf.zza(com.google.android.gms:play-services-basement@@17.3.0:6)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.internal.BaseGmsClient$zza.zza(com.google.android.gms:play-services-basement@@17.3.0:25)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.internal.BaseGmsClient$zzc.zzc(com.google.android.gms:play-services-basement@@17.3.0:11)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.common.internal.BaseGmsClient$zzb.handleMessage(com.google.android.gms:play-services-basement@@17.3.0:49)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:107)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at com.google.android.gms.internal.common.zzi.dispatchMessage(com.google.android.gms:play-services-basement@@17.3.0:8)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at android.os.Looper.loop(Looper.java:214)
2020-06-16 15:06:30.762 13539-13539/de.rki.coronawarnapp W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:67)

@ChuangSheep
Copy link

ChuangSheep commented Jun 16, 2020

I have faced the same issue on Mi 9. My app was downloaded from Google app store so I am not so sure why it is not working

CAUSE: 3
Some thing went wrong
---
Cause:
k0.b.a.a.c.k.b:17:API:Nearby.EXPOSURE_NOTIFICATION_API is not avaliabe on this device.
Connection failed with: a{statusCode=UNKNOWN_ERROR_CODE(39501,resolution=null,message=null)} at ......
......
at .... (@@17.3.0:**)
at android.os.Looper.loop(Looper.java:201)
at android.osHandlerThread.run(HandlerThread.java:65)

@mxmxchere
Copy link

I have the same Issue as well. I have a Google Pixel 3XL with the latest Android.

My Play Services Version is 20.18.17. However the Stockversion of Play Services is 17.7.86. I dont have a logged in Googleaccount on this phone and the Playstore app is deactivated. I downloaded the current Google Play Services through the Aurora-Store.

@jbauerrfid
Copy link

I found a similar issue in the Git repo of Google's reference app. Perhaps this is a problem in the Google library play-services-nearby-18.0.2-eap.aar imported through the lib folder.
See also: google/exposure-notifications-android#8

@heike-hh
Copy link

same problem > moto G5s (Android 8.1.0)
ebenso : "Fehler bei Zugriff auf Google Play-Dienste
Please complete action required by Carrier Services"

  • NFC an
  • Standorte an
  • Play Service Vers. 20.18.17 (Kamera, Speicher an)
  • Carrier Service on (Standort, Kamera an)
  • Restart ja

ScreenCrop-20200616-142247
ScreenCrop-20200616-142330

@Cactus-World
Copy link

Same error here. And from my research it is due to the already mentioned issue with the API not allowing self-compiled versions to access it. Thus I agree that offering the source code to gain trust into the app makes no sense as it cannot be guaranteed that the official version is compiled from this source code. This should absolutely be changed!

@corneliusroemer
Copy link

Friendly note, you can't compile from source code and expect it to work. The Exposure API will not work and you will get exactly this error 3, Cause Google API 17.

It's very important to state whether you installed from Play Store, Sideloaded or Compiled from Source. That makes a huge difference in the importance of the bug.

The reproducible build question is still entirely valid but not directly related to this problem. So you may want to close this issue here as a duplicate of corona-warn-app/cwa-documentation#257

@ChuangSheep
Copy link

Friendly note, you can't compile from source code and expect it to work. The Exposure API will not work and you will get exactly this error 3, Cause Google API 17.

It's very important to state whether you installed from Play Store, Sideloaded or Compiled from Source. That makes a huge difference in the importance of the bug.

The reproducible build question is still entirely valid but not directly related to this problem. So you may want to close this issue here as a duplicate of corona-warn-app/cwa-documentation#257

I have installed it from Google Play , and it does NOT work. Very strange.

@corneliusroemer
Copy link

@ChuangSheep Thanks for clarifying. Can you add as much info as possible:

  • OS version
  • Model
  • Play services version
  • is anything on your phone modified from original shipped state (eg rooted, different OS etc.)
  • are you logged into a Google account?

Then we have some structured info on where there are issues.

Plus, if possible list the things you have tried and that have failed.

PS: I'm not associated with the project, not getting paid or anything. Maybe also try calling the technical support hotline. Not sure this helps bit give it a go.

@cb109
Copy link

cb109 commented Jun 16, 2020

I am also having this problem (UNKNOWN_ERROR_CODE(39503)) on a Huawei P9 Lite, Android 7.0, after being prompted to upgrade the Google Play Services. I updated them to v20.18.17, the CWA still tells me I have 17.3.0 though. No reboot or reinstallation helping so far. CWA was installed from the Play Store. I am logged into my Google account, the phone is not rooted or changed otherwise.

@piratenkatzerrr
Copy link

I am also having this problem (UNKNOWN_ERROR_CODE(39503)) on a Huawei P9 Lite, Android 7.0, after being prompted to upgrade the Google Play Services. I updated them to v20.18.17, the CWA still tells me I have 17.3.0 though. No reboot or reinstallation helping so far. CWA was installed from the Play Store. I am logged into my Google account, the phone is not rooted or changed otherwise.

I had a similar problem regarding Google Play Services v20.18.17 and CWA being stuck on 17.3.0.
Deleting GPServices data and updating to v20.21.17 solved this problem for me.

@cb109
Copy link

cb109 commented Jun 16, 2020

@piratenkatzerrr Thanks! Clearing the cache/data was not enough for me for some reason, although the CWA would again prompt me to update the Google Play Services. I joined its beta program through the app store and that seems to have triggered an update a few minutes later. I can use the CWA now.

@ichderfisch
Copy link

ichderfisch commented Jun 16, 2020

Same issue here on an old phone of mine. CWA thinks I'm on GPServices 17.3

* OS version  
* Model  
* Play services version  
* is anything on your phone modified from original shipped state (eg rooted, different OS etc.)
* are you logged into a Google account?

Android 7.1.1
Sony Xperia Z3 Compact
GPServices 20.18.17
nothing modified
Logged in with my Google Account.

Tried deleting app, restarting phone several times, signing up for Play Services Beta. Nothing has helped yet.

As it's only my second phone it's not to important for me, but you might clearify the error message in an future update of the app, as it seems to be a more common problem.


Edit: GPServices in Beta (still version 20.18.17 maybe a newer build?), clearing cached data, waiting over night, reboot the phone, reinstalled the app. Now it works.

@CSchmidtDD
Copy link

I do have the same issue but I can add a very useful insight that affects not only me, but also another user with an equal setup.

Whenever using/installing the app as a NON-Android Administrator account (Second User on the phone, not Guest-Account!) the BLE-beacon will not activate and throw this error.
When switching to the main account that has access to all the administrative features on the phone, it works abolutely fine.

System and updates all up-to-date.

Huawei P20
EML-L29
Android 9
Build 9.1.0.387
Logged in with google account on NON-ADMIN Account of the phone.

Also with Sony Xperia ZX1 Compact with NON-ADMIN Account -> Same error.

@ChuangSheep
Copy link

@ChuangSheep Thanks for clarifying. Can you add as much info as possible:

  • OS version
  • Model
  • Play services version
  • is anything on your phone modified from original shipped state (eg rooted, different OS etc.)
  • are you logged into a Google account?

Then we have some structured info on where there are issues.

Plus, if possible list the things you have tried and that have failed.

PS: I'm not associated with the project, not getting paid or anything. Maybe also try calling the technical support hotline. Not sure this helps bit give it a go.

As in my previous comment:

I have faced the same issue on Mi 9. My app was downloaded from Google app store so I am not so sure why it is not working

CAUSE: 3
Some thing went wrong
---
Cause:
k0.b.a.a.c.k.b:17:API:Nearby.EXPOSURE_NOTIFICATION_API is not avaliabe on this device.
Connection failed with: a{statusCode=UNKNOWN_ERROR_CODE(39501,resolution=null,message=null)} at ......
......
at .... (@@17.3.0:**)
at android.os.Looper.loop(Looper.java:201)
at android.osHandlerThread.run(HandlerThread.java:65)

More info:
OS: Android 10 (MIUI 11.0.9 stable)
Model: Mi 9 (Xiaomi)

I have updated the framework, service und play store manually but it does not work either.
Play service version: 20.21.17
Play store version: 20.5.19-all [0] [PR] 316024227
Google Framework version: 10(29)

Additional Information: The phone is not rooted, neither changed OS.
I have logged into my google account. I believe it is worth to mention that I have 2 accounts on this phone. I'm not sure if it is because of what @Chrakker has mentioned. However, switch to the other account does not fix my issue.

I do have the same issue but I can add a very useful insight that affects not only me, but also another user with an equal setup.

Whenever using/installing the app as a NON-Android Administrator account (Second User on the phone, not Guest-Account!) the BLE-beacon will not activate and throw this error.
When switching to the main account that has access to all the administrative features on the phone, it works abolutely fine.
[...]
Also with Sony Xperia ZX1 Compact with NON-ADMIN Account -> Same error.

Tried: Reboot, clear data/cache, reinstall app, manually update the google suit (framework, service, store)

@htooisap htooisap added the Google API issue Issues regarding Google API calls, for e.g. error 17 label Jun 17, 2020
@HassenHichri
Copy link

I'm having the same issue with Pixel 2 with Android and Google Play Services up to date and I have 2 users defined. The app will work fine on the Admin user but will throw this error on the other user.

@corneliusroemer
Copy link

@HassenHichri @ChuangSheep @Chrakker
I opened a new issue with a more precise title to separate out different root causes for the (17) error.
https://github.com/corona-warn-app/cwa-app-android/issues/605

@Batlh
Copy link

Batlh commented Jun 18, 2020

Selbe Problem beim Samsung Galaxy Note 8
bekomme folgende Meldung:

URSACHE: 3
Etwas ist schief gelaufen.
Fehler bei Kommunikation mit Google API(17)

Ursache:
k0.b.a.a.c.k.b: 17: API: Nearby.EXPOSURE_NOTIFICATION_API is not available on this device. Connection failed with: a{statusCode=UNKNOWN_ERROR_CODE(39503), resolution=null, message=null}
at k0.b.a.a.c.k.l.f0.b(com.google.android.gms:play-services-base@@17.3.0:4)
at k0.b.a.a.c.k.l.e$a.e(com.google.android.gms:play-services-base@@17.3.0:8)
at k0.b.a.a.c.k.l.e$a.d(com.google.android.gms:play-services-base@@17.3.0:50)
at k0.b.a.a.c.k.l.e$a.j(com.google.android.gms:play-services-base@@17.3.0:1)
at k0.b.a.a.c.l.b$k.c(com.google.android.gms:play-services-basement@@17.3.0:4)
at k0.b.a.a.c.l.b$f.a(com.google.android.gms:play-services-basement@@17.3.0:7)
at k0.b.a.a.c.l.b$g.handleMessage(com.google.android.gms:play-services-basement@@17.3.0:52)
at android.os.Handler.dispatchMessage(Handler.java:106)
at k0.b.a.a.e.b.d.dispatchMessage(com.google.android.gms:play-services-basement@@17.3.0:1)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:65)

Android 9 aktueller Android Patch vom Juni 2020

@Ceremony64
Copy link

I have managed to get it working on my rooted Pocophone F1 (running custom Android 10 rom with NikGapps):
I had the latest Google Play Services installed, yet ran into the "Nearby.EXPOSURE_NOTIFICATION_API is not available on this device." issue.

To fix it, I did the following:

  1. Uninstall Corona Warn App
  2. Stop "Google Play" and "Google Play Services" and clear data and cache for both
  3. Reboot
  4. Open Google Play and reinstall Corona Warn App

I hope this helps anyone else having the same issue :-)


Ich habe es auf meinen gerooteten Pocophone F1 (mit Android 10 custom rom und NikGapps) zum laufen gebracht:
Hatte die neusten Google Play Services installiert, aber trotzdem den Fehler "Nearby.EXPOSURE_NOTIFICATION_API is not available on this device." erhalten.

Behoben habe ich es wie folgt:

  1. Corona Warn App deinstallieren
  2. "Google Play" und "Google Play Services" beenden und deren Daten und Cache leeren
  3. Neu hochfahren
  4. Über Google Play die Corona Warn App wieder installieren

Ich hoffe es hilft auch anderen :-)

@traut21
Copy link

traut21 commented Jun 19, 2020

@HassenHichri @ChuangSheep @Chrakker
I opened a new issue with a more precise title to separate out different root causes for the (17) error.
#605

But shouldn't this merged with #499 - and have some useful topic name to differ those different kind of API-17-Problems?

@uschindler
Copy link

Cache löschen und Neu starten würde schon mehrfach erfolgreich benutzt. Daten löschen ist teilweise sinnvoll, aber wäre zu vermeiden, sonst muss man mehrfach 2FactorAuth wiederholen.

@mxmxchere
Copy link

It works now on my phone. I got the GPS version 20.21.17 from apkpure or so (i know really not the way you want to get your stuff). After that i had the german description "Benachrichtigungen zu möglichem Kontakt mit COVID-19-Infirzierte" and the red symbol on the left hand side of it. I was able to click on it an get the list of apps that use the exposure-API. I clicked on the open-button next to the entry "Corona-Warn". After that it worked.

I do not have a google-account on my phone. I installed Corona-Warn through aurora and Play Services through the apkpure APK.

I am unsure whether it was the waiting or opening the Corona-app through the Google-Menu. Anyway it works now, so it is possible to use the App without a Google Account, yeey

@Limag
Copy link

Limag commented Jun 20, 2020

Thank you.
Same here: An unmodified HUAWEI P20 lite from Germany with GooglePlayServices installed from PlayStore updated to 20.18.17 told me NEARBY_Nearby.EXPOSURE_NOTIFICATION_API...
Clearing data helped: Einstellungen->Apps->Google Play Dienste->Speicher ->Speicherplatz verwalten->Alle Daten löschen.
After this, I had success at the third try. So, waiting some minutes could help.

@heregoesmarcel
Copy link

heregoesmarcel commented Jun 21, 2020

Joining the beta program for Google Play Services seems to have finally done the trick.

After following the previous advice of clearing the local cache and -storage for Playstore and Play Services, the app put up a notification, claiming that the installed Play Services version needs to be updated (which has been up to date on the stable branch).

@tkowark
Copy link
Member

tkowark commented Jun 22, 2020

Thank you all for your input. While we cannot solve this issue directly, the team implemented a more descriptive error description in the latest app version that also links to the FAQ which contain more information than could possible fit into a single mobile screen.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Google API issue Issues regarding Google API calls, for e.g. error 17
Projects
None yet
Development

No branches or pull requests