AntennaPod does not start after upgrade to 2.0.2 (F-Droid)

Created on 21 Oct 2020  路  16Comments  路  Source: AntennaPod/AntennaPod

Checklist

  • [x ] I have used the search function to see if someone else has already submitted the same bug report.
  • [x ] I will describe the problem with as much detail as possible.
  • [ ] If the bug only to occurs with a certain podcast, I will include the URL of that podcast.

System info

App version: 2.0.2

App source: F-Droid

Android version: 11

Device model: Pixel 4

Bug description

Steps to reproduce:

  1. Tap app icon to launch app from homescreen or app drawer

Expected behaviour: app should start up

Current behaviour: Splash screen is shown, but disappears without opening the app. Sometimes there is a system notification saying, the app stopped working.
Downgrade to previous version doesn't work (error notification)

First occurred: after update to latest f-droid build on October 20th

Environment:

Stacktrace/Logcat: Cannot open app, so cannot export log

[if available]
possible bug

Most helpful comment

Phew, so we did not push a broken update to F-Droid. That's good to hear.

@hrodnand @Slinger Thanks both of you for helping with debugging!

All 16 comments

That sounds bad. AntennaPod should create a crash report file on the external storage (Android/data/de.danoeh.antennapod/files/crash-report.log). Does that file exist on your device? If so, could you please share the content?

Thanks. Found it.

Here is the content:

Crash info

Time: 21-10-2020 09:38:56
AntennaPod version: 2.0.2

StackTrace

java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/~~og4OeJtP9ZJ30lxzHMjTSw==/de.danoeh.antennapod-u7KXPYAPxDiTGGwPA4IWOQ==/lib/arm64/libconscrypt_jni.so" has bad ELF magic: 00000000
    at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
    at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
    at java.lang.System.loadLibrary(System.java:1664)
    at org.conscrypt.NativeCryptoJni.init(SourceFile:28)
    at org.conscrypt.NativeCrypto.<clinit>(SourceFile:63)
    at org.conscrypt.NativeCrypto.checkAvailability(SourceFile:80)
    at org.conscrypt.Conscrypt.checkAvailability(SourceFile:115)
    at org.conscrypt.Conscrypt.newProvider(SourceFile:129)
    at de.danoeh.antennapod.core.ClientConfig.installSslProvider(SourceFile:59)
    at de.danoeh.antennapod.core.ClientConfig.initialize(SourceFile:49)
    at de.danoeh.antennapod.PodcastApp.onCreate(SourceFile:58)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
    at android.app.ActivityThread.access$1300(ActivityThread.java:237)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:223)
    at android.app.ActivityThread.main(ActivityThread.java:7656)
    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)

Thanks, that helps a lot. Did you, by any chance, use version 2.0.1 before upgrading to 2.0.2? Did the app start with 2.0.1? I think that the behavior of the two versions should be the same, but just in case.

Do you use the original system that is shipped with your device or do you use a custom ROM?

CC @Slinger

Oh this is bad.

So... it looks like your phone has an arm64 cpu and it correctly tries to open the arm64 version of the conscrypt library. But [...] has bad ELF magic: 00000000 is very strange. I suspect either the file is missing or can't be opened (either permissions or some protection mechanism). Or maybe it's a symlink, pointing wrong or getting opened instead of the file it points at?

The good news is I can run the same version (from f-droid) on arm64 android 10 (MIUI 11), so I suspect there's something specific with android 11 that's causing this. It's a very new version of android. It probably ships with a more recent version of conscrypt and maybe it adds some new restrictions on what files apps can access.

If it's OK, I could build an apk with the latest version of Conscrypt and built against API 30. Those would be the easiest (and most obvious) things to try first. I've already uploaded the changes here, but I don't think I'll have time to build and test it today.

Happy to help.

Yes, version 2.0.1 still worked on my device.

Also checked, if there was an Android system update in between, but the latest security update is from October 5th.

I use the original system. Vanilla Google Android so to say.

CC @Slinger

Thanks, that helps a lot. Did you, by any chance, use version 2.0.1 before upgrading to 2.0.2? Did the app start with 2.0.1? I think that the behavior of the two versions should be the same, but just in case.

Do you use the original system that is shipped with your device or do you use a custom ROM?

CC @Slinger

Yes, version 2.0.1 still worked on my device.

That's strange. 2.0.1 and 2.0.2 use exactly the same code in the location that crashes.

I just re-created the updates again with a different name (so you can install them alongside the existing AntennaPod app). Could you please try installing these two apps and check if they start?

If you uninstall the duplicate apps after testing, make sure that you uninstall the "Debug" version, not the main app.

Thanks, I checked both provided versions.

Both versions open and work fine!

Seems to be related to the f-droid build maybe.

That's strange. 2.0.1 and 2.0.2 use exactly the same code in the location that crashes.

Unless I'm mistaken, 2.0.2 is the first release that bundles conscrypt. And the error specifically mention "libconscrypt_jni.so". Strange that the debug builds are working.

I don't want to put more burden on you, but would you be able to make release (_not debug_) builds of this and this? The first only differs from the official master by a name change (so can be installed in parallel with the official build) and in the second I cherry-pick:ed your api 30 commit and increased the conscrypt version.

I suspect the first will crash (just like the f-droid version, and unlike the debug build you posted). And if we're lucky... the second maybe works?...

(edit: I understand it's a strange request, but long story short: I dual boot to a second debian install for antennapod/android development and right now I'm stuck with work on my main system and can't reboot. And I'm probably stuck like this for the rest of today.)

Both versions open and work fine!

Thanks for testing @hrodnand! That is pretty surprising.

Sorry for asking you for a favor again. Could you please try these apps? (be careful when removing - they now have the same icon as the original app. Only the name is different)


Unless I'm mistaken, 2.0.2 is the first release that bundles conscrypt.

Conscrypt is bundled in both 2.0.1 and 2.0.2. In case you are wondering about the commit history on GitHub: the one that is tagged for F-Droid is the conscrypt merge commit. You can also verify that by downloading the apk files from F-Droid and looking at their native library folder.

@Slinger I found something interesting. The md5 sums of the native libraries do not match my builds. Does F-Droid rebuild those binaries? At least there does not seem to be a difference between their 2.0.1 and 2.0.2

  • Official conscrypt dependency AAR (https://mvnrepository.com/artifact/org.conscrypt/conscrypt-android/2.4.0)
c06c5b196acaaf8047343edbbdba677f  arm64-v8a/libconscrypt_jni.so
b82781095320ec2095aa7d6eb1362602  armeabi-v7a/libconscrypt_jni.so
25ea492b8cf1fadc225a7e92e0ef701b  x86/libconscrypt_jni.so
9a21379619429511ec835b6214760291  x86_64/libconscrypt_jni.so
  • my 2.0.2
c06c5b196acaaf8047343edbbdba677f  arm64-v8a/libconscrypt_jni.so
b82781095320ec2095aa7d6eb1362602  armeabi-v7a/libconscrypt_jni.so
25ea492b8cf1fadc225a7e92e0ef701b  x86/libconscrypt_jni.so
9a21379619429511ec835b6214760291  x86_64/libconscrypt_jni.so
  • fdroid 2.0.1
f357ddbaf1b2f269b160e39cba2c00f0  arm64-v8a/libconscrypt_jni.so
c25cda2c5aa9643cba6e2f7cd5d882f5  armeabi-v7a/libconscrypt_jni.so
8e1d090c183b0250740c346a23e90613  x86/libconscrypt_jni.so
da2cef1c60b938b2d9858b4c590d68fe  x86_64/libconscrypt_jni.so
  • fdroid 2.0.2
f357ddbaf1b2f269b160e39cba2c00f0  arm64-v8a/libconscrypt_jni.so
c25cda2c5aa9643cba6e2f7cd5d882f5  armeabi-v7a/libconscrypt_jni.so
8e1d090c183b0250740c346a23e90613  x86/libconscrypt_jni.so
da2cef1c60b938b2d9858b4c590d68fe  x86_64/libconscrypt_jni.so
  • Slinger/master_CryptoBundle (release)
    => This version works!

  • Slinger/android11_fixes (release)

  • 2.0.2 rebuild (release)

Both other versions are downloaded, installation seems to happen, but afterwards I get a "App was not installed" message.

I guess it conflicts with the installed original, doesn't it?
I can delete the f-droid version and try again later, but I need to hook up the phone to a pc first, as I cannot access my app data from the phone in Android 11 to save it...

I guess it conflicts with the installed original, doesn't it?

Sorry. I did not test them after exporting. They were supposed to be separate apps but I forgot to update one place. Anyway, the fact that the first version already works makes it unnecessary to try the other versions. The working first version is basically the same as the non-working fdroid version.

Maybe the apk from fdroid somehow got corrupted while installing or while downloading. Could you please try downloading the apk from fdroid again (using a web browser, so we are sure that nothing is cached)? It should then install on top of your existing AntennaPod install. https://f-droid.org/repo/de.danoeh.antennapod_2000295.apk

Indeed, it works now!

Download with browser, install apk, app opens again and works as expected.

Checked just for reference: Downgrade to 2.0.1 with f-droid does not work.

I tried to reproduce the issue by deleting the current version and starting install and upgrades from the last 1.x.x version and separately from the 2.0.1 version.
...all with the originally downloaded f-droid apks from cache.

Also here everything works.
I cannot reproduce it.

Sorry. Apparently it was something with the installation. Really have no idea.

Thanks for your great response and support though!!!

@Slinger I found something interesting. The md5 sums of the native libraries do not match my builds. Does F-Droid rebuild those binaries? At least there does not seem to be a difference between their 2.0.1 and 2.0.2

Ideally all software from F-Droid is built from source, including the libraries used. I wasn't sure that would be the case but it looks like it also includes conscrypt. Also I don't think an ELF ever has a magic of pure zeroes, so it seems the data got corrupt. :relieved:

Thanks @hrodnand for all the testing. It must have taken quite some time to go through all those versions! I'm still surprised something could go wrong during installation, but at least things are working now.

Phew, so we did not push a broken update to F-Droid. That's good to hear.

@hrodnand @Slinger Thanks both of you for helping with debugging!

Phew, so we did not push a broken update to F-Droid. That's good to hear.

Not going to lie, when I saw the error message mentioning conscrypt I was terrified. I normally don't divert time on other things when I got work to do, but this could have been bad. :relieved:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mamehacker picture mamehacker  路  3Comments

maxxo picture maxxo  路  4Comments

Rotzbua picture Rotzbua  路  4Comments

thom-github picture thom-github  路  3Comments

yosefmizrahi picture yosefmizrahi  路  3Comments