corona-warn-app / cwa-documentation

Project overview, general documentation, and white papers. The CWA development ends on May 31, 2023. You still can warn other users until April 30, 2023. More information:
https://coronawarn.app/en/faq/#ramp_down
Apache License 2.0
3.28k stars 344 forks source link

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

Closed gitbrueck closed 2 years ago

gitbrueck commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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- commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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- commented 4 years ago

@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 commented 4 years ago

@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- commented 4 years ago

@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 commented 4 years ago

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

kraleva commented 4 years ago

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 commented 4 years ago

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

mynchau commented 4 years ago

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

corneliusroemer commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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

kbobrowski commented 4 years ago

Anyone can become whitelisted using following project: https://github.com/kbobrowski/en-i13n

The reason for this project is that it's extremely inefficient to try to debug deployed app which is downloaded from the Play Store, as we cannot simply add some more logging / modify code and see what is going on, especially if the issues arise from interaction with EN framework. This is especially visible in Android issues: https://github.com/corona-warn-app/cwa-app-android/issues/774, https://github.com/corona-warn-app/cwa-app-android/issues/737. Using mentioned project anyone can just fork the app code, deploy using e.g. Android Studio and have it working with EN framework.

Extension for (jailbroken) iOS should be possible, depending on the mechanism used to parse signatures of allowed apps. Perhaps only small modification would be needed.

francwalter commented 3 years ago

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

ndegendogo commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@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 😄 :

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:

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

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 https://github.com/corona-warn-app/cwa-wishlist/issues/153#issuecomment-731183577 from the Open Source Team which said that it still isn't possible.

mh- commented 3 years ago

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

MikeMcC399 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

Hi[5185693630]()

ndegendogo commented 3 years ago

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

svengabr commented 2 years ago

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

MikeMcC399 commented 2 years ago

@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.