microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
8.6k stars 1.72k forks source link

ch.admin.bag.dp3t Unable to start activity ComponentInfo{ch.admin.bag.dp3t/com.google.android.gms.common.api.GoogleApiActivity} #1258

Open tobru opened 4 years ago

tobru commented 4 years ago

Affected app Name: SwissCovid Package id: ch.admin.bag.dp3t Package version: 1.2.0.12000

Describe the bug

The SwissCovid app stopped to work and shows a message that a more recent Google Play version is needed. I could see the app crash once:

11-07 20:13:56.528 24831 24831 E AndroidRuntime: FATAL EXCEPTION: main
11-07 20:13:56.528 24831 24831 E AndroidRuntime: Process: ch.admin.bag.dp3t, PID: 24831
11-07 20:13:56.528 24831 24831 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{ch.admin.bag.dp3t/com.google.android.gms.common.api.GoogleApiActivity}: android.content.ActivityNotFoundException: No Activity found to handle null
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:107)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:214)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7356)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)
11-07 20:13:56.528 24831 24831 E AndroidRuntime: Caused by: android.content.ActivityNotFoundException: No Activity found to handle null
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2058)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.Activity.startIntentSenderForResultInner(Activity.java:5473)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.Activity.startIntentSenderForResult(Activity.java:5439)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.Activity.startIntentSenderForResult(Activity.java:5406)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at com.google.android.gms.common.api.GoogleApiActivity.onCreate(com.google.android.gms:play-services-base@@17.2.1:12)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:7824)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:7813)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
11-07 20:13:56.528 24831 24831 E AndroidRuntime:    ... 11 more

To Reproduce Steps to reproduce the behavior:

  1. Download SwissCovid app
  2. Try to use it and see the error message

Expected behavior SwissCovid app works again

System Android Version: 10 Custom ROM: LineageOS for microG 17.1

microG microG Core version: v0.2.13.203915 microG Self-Check results: All ticked

Additional context Also created an issue here: https://github.com/DP-3T/dp3t-app-android-ch/issues/249

mar-v-in commented 4 years ago

Please provide exact version of SwissCovid app you're seeing this issue with. Did the issue start to appear after upgrading microG or SwissCovid or just randomly with no visible cause?

tobru commented 4 years ago

Please provide exact version of SwissCovid app you're seeing this issue with.

Sorry for not adding the version number, I added it to the original text.

Did the issue start to appear after upgrading microG or SwissCovid or just randomly with no visible cause?

I'm pretty sure that the issue started to appear after upgrading the SwissCovid app, but I'm not 100% sure about it.

If you see a way to produce more logs or to give you more information just let me know. Thanks a lot.

wombatch commented 4 years ago

For what it is worth I have version 1.1.0,105 with microg 0.2.13.20391 on Android 7 (Lineage 14.1) and it seems to work ok.

mar-v-in commented 4 years ago

@tobru the version play store offers me for download is 1.1.2.11200 which does not have any issues. I manually downloaded 1.2.0.12000 and can reproduce it now. I'll have a look how to fix the issue.

Until then, I'd advise you to downgrade to 1.1.2.11200. Note that, as all relevant data (collected ids, sharing keys) is stored within microG, it should be safe to uninstall SwissCovid if required for downgrade.

tobru commented 4 years ago

@mar-v-in Thank you very much for looking into it, greatly appreciated!

mar-v-in commented 4 years ago

SwissCovid 1.2.0 uses the "ExposureWindow" mode of Google's Exposure Notification API. This is not yet implemented in microG, see #1168. Becoming compatible again is going to be quite some work, but I'll put it rather high on my list.

mar-v-in commented 3 years ago

SwissCovid 1.2.0 should work again as of 4c2ef04. Can you test with the build from https://microg.org/dl/core-en.apk?