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

Is it really possible to test the apps? How to become whitelisted? #214

Closed
gitbrueck opened this issue Jun 2, 2020 · 29 comments
Closed
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation mirrored-to-jira This item is also tracked internally in JIRA

Comments

@gitbrueck
Copy link

gitbrueck commented Jun 2, 2020

Known Issue: "The Exposure Notification API is gonna block you from successfully testing the Application unless you are whitelisted inside GMS."


Internal Tracking ID: EXPOSUREAPP-2963

@marcmuschko marcmuschko self-assigned this Jun 2, 2020
@marcmuschko
Copy link

Dear @gitbrueck,

thank you for reaching out!
Unfortunately this is not something we are able to help you with at the moment, as the authority of whitelisting Google accounts is not within the Android development realm. The general issue of testing the app end to end including the Exposure Notification API should be resolved in near future, as this topic is currently in clarification.
I will leave the issue open until it is resolved, the mentioned known issue will be removed from the list as well.

Best,
Marc

@tallinn1960
Copy link

Is the exception "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}" an indication that one is not "whitelisted"?

@mh-
Copy link

mh- commented Jun 5, 2020

@tallinn1960 Yes, that's the error message you get in this case.
If you want to try out whether your Android device is capable of the service (i.e. if the correct Google Play Services are installed), you could try e.g. the officially published app from Italy. Once such an app is officially published, it doesn't require whitelisting anymore.

@wolkenschieber
Copy link

To increase visibility to search engines, here is the corresponding stack trace:

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(39501), resolution=null, message=null}
        at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(com.google.android.gms:play-services-base@@17.2.1:4)
        at com.google.android.gms.common.api.internal.ApiExceptionMapper.getException(com.google.android.gms:play-services-base@@17.2.1:2)
        at com.google.android.gms.common.api.internal.zah.zaa(com.google.android.gms:play-services-base@@17.2.1:18)
        at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zaa(com.google.android.gms:play-services-base@@17.2.1:204)
        at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zac(com.google.android.gms:play-services-base@@17.2.1:210)
        at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zaa(com.google.android.gms:play-services-base@@17.2.1:108)
        at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.onConnectionFailed(com.google.android.gms:play-services-base@@17.2.1:75)
        at com.google.android.gms.common.internal.zaf.onConnectionFailed(com.google.android.gms:play-services-base@@17.2.1:2)
W/System.err:     at com.google.android.gms.common.internal.BaseGmsClient$zzf.zza(com.google.android.gms:play-services-basement@@17.2.1:6)
        at com.google.android.gms.common.internal.BaseGmsClient$zza.zza(com.google.android.gms:play-services-basement@@17.2.1:25)
        at com.google.android.gms.common.internal.BaseGmsClient$zzc.zzo(com.google.android.gms:play-services-basement@@17.2.1:11)
        at com.google.android.gms.common.internal.BaseGmsClient$zzb.handleMessage(com.google.android.gms:play-services-basement@@17.2.1:49)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at com.google.android.gms.internal.common.zzi.dispatchMessage(com.google.android.gms:play-services-basement@@17.2.1:8)
        at android.os.Looper.loop(Looper.java:154)
        at android.os.HandlerThread.run(HandlerThread.java:61)
E/ErrorReportReceiver: [EXPOSURENOTIFICATION]InternalExposureNotificationPermissionHelper 17: API: Nearby.EXPOSURE_NOTIFICATION_API is not available on this device. Connection failed with: ConnectionResult{statusCode=UNKNOWN_ERROR_CODE(39501), resolution=null, message=null}

@gitbrueck
Copy link
Author

I installed Immuni officially published from Italy and it worked fine on my device.
Then I rebuild it from source and installed this.
Now I get a message box:
"Google Play Services isn't ready yet
Google Play Services is up to date but cannot enable
exposure notification yet.
Please try again later.

Error code: 39507
GOT IT"

It is not possible to test the sources without being whitelisted.

@corneliusroemer
Copy link
Contributor

corneliusroemer commented Jun 8, 2020

@mh-

@tallinn1960 Yes, that's the error message you get in this case.
If you want to try out whether your Android device is capable of the service (i.e. if the correct Google Play Services are installed), you could try e.g. the officially published app from Italy. Once such an app is officially published, it doesn't require whitelisting anymore.

Can you somehow accelerate the whitelisting, so that the app can be tested before being "officially" published. Surely, it's very counterproductive to not allow testers to test the app before it goes public - that's a recipe for failure.

@corneliusroemer
Copy link
Contributor

corneliusroemer commented Jun 8, 2020

I figured out a limited workaround, that allows you to at least have a peek at what happens after the onboarding process: Use an AVD (Android Virtual Device). It worked with my virtual Nexus 5X API 29. I could do the onboarding flow. I got app-internal warnings, that the Bluetooth API wasn't working, but that was all.

But don't install an updated version of Google Play Services - once I did that, the app also started crashing. So the workaround seems to be based on somehow having an outdated Play Services version.

Has someone figured out whether the function calls that cause the crash can be disabled? Then at least one can have a look at UI and content that's on there so far.

@mh-
Copy link

mh- commented Jun 8, 2020

@corneliusroemer After uninstalling a previous build from my Android device, I could build a new version of the app that doesn't crash. (The crash on my device was related to database encryption, so I figured it's easiest to just delete the old database.) Of course, the app still doesn't connect to GMS API, because I'm not white-listed and I don't have the RKI/SAP signing keys.
But when it can't connect to the API, it doesn't crash, it just displays a message.

@corneliusroemer
Copy link
Contributor

@corneliusroemer After uninstalling a previous build from my Android device, I could build a new version of the app that doesn't crash. (The crash on my device was related to database encryption, so I figured it's easiest to just delete the old database.) Of course, the app still doesn't connect to GMS API, because I'm not white-listed and I don't have the RKI/SAP signing keys.
But when it can't connect to the API, it doesn't crash, it just displays a message.

@mh- Cool! What did you change to make it not crash? I'm failing to get it to not crash.

@marcmuschko Since you said that the whitelisting problem should be resolved in the near future 6 days have passed. It's now being announced that the app will go live next week. When can we expect the whitelisting issue to be resolved? Saying "not within the Android development realm" isn't good. Please escalate with whomever can do something about this. Otherwise much of the PR is just hot air.

@mh-
Copy link

mh- commented Jun 8, 2020

@mh- Cool! What did you change to make it not crash? I'm failing to get it to not crash.

Uninstall on device. git pull. Build. Install again. No crash anymore.

@SebastianWolf-SAP SebastianWolf-SAP transferred this issue from corona-warn-app/cwa-app-android Jun 9, 2020
@SebastianWolf-SAP SebastianWolf-SAP changed the title Is it really possible to test the app? How to become whitelisted inside GMS? Is it really possible to test the apps? How to become whitelisted? Jun 9, 2020
@SebastianWolf-SAP
Copy link
Member

Dear colleagues,

as this is a rather generic topic and affects both worlds (iOS and Android), we moved that over to the documentation repository. Please understand that we don't have any updates at this point in time about the enabling of external developers/testers etc. We will update the issue once we have any updates.

If you would like to ease the mocking of the Exposure Notification API for Android (similar to the efforts which have been done on the iOS side), the team will certainly accept contributions. But please use separate issues/pull requests for that and limit discussions here to the original question.

Thanks for your understanding.

Mit freundlichen Grüßen/Best regards,
SW
Corona Warn-App Open Source Team

@SebastianWolf-SAP SebastianWolf-SAP pinned this issue Jun 9, 2020
@kraleva
Copy link

kraleva commented Jun 10, 2020

Ich kriege das selbe Error, nur mit dem Unterschied, dass es statusCode=UNKNOWN_ERROR_CODE(39503) ausgibt (Wäre das das gleiche Error?). Ich hab trotzdem es geschafft mit Error-Message Popups es zu starten als Workoaround. Hier könnt ihr auch ein Video mit dem Ansichten finden, wenn ihr das Projekt nicht starten könnt.

@Fabian42
Copy link

Obligatory update: The app is now officially available, so you can test it.

@mynchau
Copy link

mynchau commented Jun 16, 2020

And since the app is officially available, I'm closing this issue. Thanks everyone for your ongoing contribution!
Best regards
MC
Your Corona Warn-App Open Source Team

@mynchau mynchau closed this as completed Jun 16, 2020
@corneliusroemer
Copy link
Contributor

corneliusroemer commented Jun 16, 2020

This is not how it works

The app version 1.0 is released. There are lots of reasons why there may still need to be a need to test the app.

It's maybe not top priority, but the issue is not done with.

@SebastianWolf-SAP could you please let @mynchau know about the discussion we've had re no closing issues until they are properly resolved to the satisfaction of the community?

@SebastianWolf-SAP
Copy link
Member

Dear @corneliusroemer,

please treat everybody with politeness and courtesy. I has been a long day for everybody and you can notify @mynchau yourself. I really need to remind you of our code of conduct and we really want to avoid sending out warnings or similar things.

And of course, we will keep this issue open until we have a solution for proper dev/testing.

Mit freundlichen Grüßen/Best regards,
SW
Corona Warn-App Open Source Team

@corneliusroemer
Copy link
Contributor

@SebastianWolf-SAP Ah here you mentioned the code of conduct for the first time.

What in particular is wrong about my comment? The first version was a bit harsh, I'm sorry for that. But the current version?

It's sometimss frustrating that there seems to be not much appreciation for the work put into these issues when they're closed just like that. We'd had that discussion, but then it happened again

@francwalter
Copy link

francwalter commented Nov 21, 2020

I hope this is the right spot to ask:

Is it possible to test the app in e.g. the Android Studio's AVD or Genymotion (Android Emulator)?

I compiled the actual source from github in my PC (with Windows 10, 64-Bit) in Android Studio (actual version 4.1.1) successfully (no errors with Gradle, a apk was created), then I copied the apk to Genymotion (v3.1.2) into a virtual Android 10 and tried to install it. Install ran but was not successful (App not installed).

Before searching what was wrong, I thought now, maybe this app is not ment to use just as test or to compile by myself and use it normally.
So here I ask: can I test a self compiled version on a virtual device or even on my phone (productively)?

Thanks for an answer.
Frank

@cwa-bot cwa-bot bot moved this from Initial to ToDo in [CM] cwa-documentation Nov 21, 2020
@ndegendogo
Copy link

ndegendogo commented Nov 21, 2020

On iOS a special entitlement (certificate) is required to be able to use the ENF API. For this reason the cwa development team has mocked this API, to allow also community members / the public to compile and run the cwa code. (And of course this mock will never send or receive the BLE beacons).

Not sure if Google / Android has similar restrictions ...

@ndegendogo
Copy link

Disclaimer: I don't know anything about Android development.

Genymotion (v3.1.2) into a virtual Android 10

Question: does this environment contain a (current) Google Play services?
Because the Google Exposure Notification Service (ENS) is part of this Google Play.

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Nov 21, 2020

@francwalter

can I test a self compiled version on a virtual device or even on my phone (productively)?

In short the answer is no, unfortunately.

Let's start with what does work 😄 :

  • CWA Android 1.6.1 from Google Play Store running on Android Studio's Pixel 3a emulator configured with Play Store and API 30 (Android 11).
    The only limitation I found is that there are zero keys recorded when viewed through the Google UI.

Now for what doesn't work. In fact in the following two configurations you can start the app, but after onboarding it gives errors and cannot be used in any meaningful way:

  • CWA Android built from github, with same emulator environment as above i.e. Android 11.
    This gives error 17/39507. See https://github.com/corona-warn-app/cwa-app-android/blob/main/README.md "The Exposure Notification API is going to block you from successfully testing the Application unless you are whitelisted inside GMS; ..."
  • CWA Android 1.6.1 downloaded from apkmirror.com and installed on Android Studio's Pixel 3a emulator with Play Store and API 29 (Android 10).
    This gives error 17/39501. There is no Bluetooth hardware emulation on this emulator.

Finally, in this configuration with this method of installation, the installation is blocked:

  • CWA Android 1.6.1 from Google Play Store installed on Android Studio's Pixel 3a emulator with Play Store and API 29 (Android 10).
    The Play Store blocks it with the message "Your device isn't compatible with this version", presumably again because the Android 10 emulator doesn't have fully emulated Bluetooth capabilities.

Genymotion may have a better Bluetooth environment for Android 10. I don't have any experience with it, I'm afraid.

However the fundamental problem is that Google has restricted the API use as described in the Exposure Notifications Implementation Guide:

"Prerequisites

To integrate the Exposure Notifications API into your app, you need the following:

Usage is also governed by the Google COVID-19 Exposure Notifications Service Additional Terms.

There are quite a few people in the community who would willingly test beta- or pre-releases. This has not been possible so far unfortunately. There was an update on Nov 20, 2020 in corona-warn-app/cwa-wishlist#153 (comment) from the Open Source Team which said that it still isn't possible.

@mh-
Copy link

mh- commented Nov 21, 2020

@kbobrowski shows how GMS can be tricked into working even with your own app here: https://github.com/kbobrowski/en-i13n (requires root)

@MikeMcC399
Copy link
Contributor

@mh-

@kbobrowski shows how GMS can be tricked into working even with your own app here: https://github.com/kbobrowski/en-i13n (requires root)

The instructions in https://github.com/kbobrowski/en-i13n/blob/master/README.md were too complicated for me and I didn't want to have to root a device to try out the app. I'm happy if this is a solution for some people. I was just looking for something much simpler.

@dsarkar
Copy link
Member

dsarkar commented Nov 22, 2020

Dear community,

We will approach the developers about CWA beta testing by the community. Any further development will be published here.

Best wishes,
DS


Corona-Warn-App Open Source Team

@yauauau
Copy link

yauauau commented Jul 14, 2021

Hi5185693630

@cwa-bot cwa-bot bot moved this from Mirrored to Jira to ToDo in [CM] cwa-documentation Jul 14, 2021
@ndegendogo
Copy link

@yauauau - I don't quite understand your last comment / link?

@heinezen heinezen moved this from ToDo to Mirrored to Jira in [CM] cwa-documentation Jul 15, 2021
@svengabr
Copy link
Member

I have just checked the linked Jira issue.

Jira Ticket is flagged as:
Resolution: Wont Fix
Status: Obsolete

Developer comment:

App cannot be tested or deployed by community without whitelisting.

Google is only whitelisting Public Health Authorities

@cwa-bot cwa-bot bot moved this from Mirrored to Jira to Done in [CM] cwa-documentation Jun 14, 2022
@MikeMcC399
Copy link
Contributor

@svengabr

I suggest that you also unpin this issue, which currently shows at the top when viewing the issue list
https://github.com/corona-warn-app/cwa-documentation/issues.

@cwa-bot cwa-bot bot moved this from Done to ToDo in [CM] cwa-documentation Jun 14, 2022
@brianebeling brianebeling unpinned this issue Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working documentation Improvements or additions to documentation mirrored-to-jira This item is also tracked internally in JIRA
Development

No branches or pull requests