Page MenuHomePhabricator

Android app: Crash on launch
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

I updated Wikipedia to r/2.7.50414-r-2022-07-19 (50414) (F-Droid Build). Now, whenever I start it, it instantly crashes.

Fairphone 3, Android 11 (LineageOS for microG)

What happens?:

Crashes with the following stack trace:

FATAL EXCEPTION: main
Process: org.wikipedia, PID: 9246
java.lang.RuntimeException: Unable to resume activity {org.wikipedia/org.wikipedia.main.MainActivity}: java.lang.RuntimeException: Bad identifier type
 at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4438)
 at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4470)
 at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
 at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
 at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
 at android.os.Handler.dispatchMessage(Handler.java:106)
 at android.os.Looper.loop(Looper.java:223)
 at android.app.ActivityThread.main(ActivityThread.java:7664)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.RuntimeException: Bad identifier type
 at org.wikipedia.analytics.eventplatform.EventPlatformClient$SamplingController.getSamplingId(EventPlatformClient.kt:317)
 at org.wikipedia.analytics.eventplatform.EventPlatformClient$SamplingController.getSamplingValue(EventPlatformClient.kt:303)
 at org.wikipedia.analytics.eventplatform.EventPlatformClient$SamplingController.isInSample(EventPlatformClient.kt:293)
 at org.wikipedia.analytics.eventplatform.EventPlatformClient.submit(EventPlatformClient.kt:62)
 at org.wikipedia.analytics.eventplatform.BreadCrumbLogEvent$Companion.logScreenShown(BreadCrumbLogEvent.kt:46)
 at org.wikipedia.activity.BaseActivity.onResumeFragments(BaseActivity.kt:104)
 at androidx.fragment.app.FragmentActivity.onPostResume(FragmentActivity.java:423)
 at androidx.appcompat.app.AppCompatActivity.onPostResume(AppCompatActivity.java:240)
 at android.app.Activity.performResume(Activity.java:8154)
 at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4428)
 ... 11 more

What should have happened instead?:

No crash

Software version (skip for WMF-hosted wikis like Wikipedia):

org.wikipedia r/2.7.50414-r-2022-07-19 (50414) (F-Droid Build)

Event Timeline

Me too, with Galaxy S22+, Android 12 (OneUI 4.1), same update build, also from F-Droid. I'm not sure how to get the crash report (stack trace) but if the one already posted isn't enough to track down the issue I will try harder.

Just posting to help track down the common element for people getting the crash - we both use F-Droid so it might be that.

I had the same issue with alpha from git yesterday, vut using the latest alpha from today so I guess it is solved now, at least for those using git. The rest would need to wait for f-droid to build.

Dbrant claimed this task.
Dbrant subscribed.

Sorry about that -- there was a backend configuration change that was causing a crash in a specific version of the client, and unfortunately there was a release-candidate tag (/r/...) which was not released to the Play Store, but was picked up by F-Droid. You'll need to wait until F-Droid picks up the latest release tag (r/2.7.50415-r-2022-07-25), or downgrade to the previous version.

Thanks Dbrant. Have you thought about how to prevent this from happening again in the future?

During our Beta release process, we've been creating the git tags for Beta and Production all at once for every Beta release, with the production tag being a "release candidate", even though that tag might not end up making it to the Play Store. But it looks like F-Droid picks up all of our production tags anyway and makes releases from them.

Going forward we'll make sure to create only the Beta tag for each new Beta release, and then only create the Production tag for definite Play Store releases, instead of all release candidates.
I've updated our release documentation to reflect this.