ivpn / android-app

Official IVPN Android app
https://www.ivpn.net/apps-android
GNU General Public License v3.0
290 stars 53 forks source link

F-Droid v2.10.5 crashes on start #303

Closed mohammadrafigh closed 6 months ago

mohammadrafigh commented 6 months ago

Bug report

Describe your environment

Describe the problem

After the update to 2.10.5 the app immediately crashes on start. Clearing app data didn't help.

Steps to reproduce:

  1. Install 2.10.5
  2. Open the app

Observed Results:

I don't have access to my laptop right now but if it's needed I can send adb logs.

Expected Results:

The app should start 😄

jurajhilje commented 6 months ago

@mohammadrafigh Hi! Can you please help us with the crash logs? It requires a few steps, as in the new app version the crash logs are disabled by default.

  1. Install a fresh v2.10.4 version (https://github.com/ivpn/android-app/blob/develop/CHANGELOG.md#version-2104---2023-09-18)
  2. To to app settings and manually toggle crash logs to enabled (turn off/on)
  3. Upgrade to app version v2.10.5
  4. If app crashes on launch we should be able to see the crash logs
ka-iy commented 6 months ago

I have the same problem on a Huawei SHT-AL09 running Android 9. The previous version v2.10.4 worked fine. I had to uninstall the crashing v2.10.5 (installed from F-Droid) because the v2.10.4 apk from F-Droid would not install over the borked v2.10.5. Please let me know if you would like logs from my install.

jurajhilje commented 6 months ago

@Kartikeya-IYER Can you please try the steps from my comment above and see if you can reproduce the app crash. We should see the crash log if it does crash on app launch. Thanks!

ka-iy commented 6 months ago

@jurajhilje Sure, I'll be happy to do that. BTW, the logs setting says that users need to explicitly send logs to you. But if the app crashes on startup, obviously the "send logs" is inaccessible. Where on the filesystem does the log reside? And is it accessible to non-root?

Also, is it ok to install the F-Droid versions of the apks, or should I use the versions from the changelog?

jurajhilje commented 6 months ago

I'm also interested if you can reproduce the crash with a fresh app install?

If you are not able to use the app because this issue, you can install the previous v2.10.4 as a temporary workaround: https://github.com/ivpn/android-app/blob/develop/CHANGELOG.md#version-2104---2023-09-18

ka-iy commented 6 months ago

I'm also interested if you can reproduce the crash with a fresh app install?

Yes, happens even with a fresh install of v2.10.5 from F-Droid.

If you are not able to use the app because this issue, you can install the previous v2.10.4 as a temporary workaround: https://github.com/ivpn/android-app/blob/develop/CHANGELOG.md#version-2104---2023-09-18

Yes, already reverted to v2.10.4 from F-Droid. For the test, however, should i specifically use the github apks (in case you have enabled any debug stuff), or will the F-Droid version be ok?

jurajhilje commented 6 months ago

@Kartikeya-IYER For the test, you can use both F-Droid or website .apk, as they have the identical crash reporting logic.

mohammadrafigh commented 6 months ago

Here are the logs from adb:

12-17 19:57:58.345 24409 24409 E AndroidRuntime: FATAL EXCEPTION: main
12-17 19:57:58.345 24409 24409 E AndroidRuntime: Process: net.ivpn.client, PID: 24409
12-17 19:57:58.345 24409 24409 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider io.sentry.android.core.SentryInitProvider: java.lang.IllegalArgumentException: DSN is required. Use empty string to disable SDK.
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.installProvider(ActivityThread.java:8333)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.installContentProviders(ActivityThread.java:7833)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7582)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2400)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:106)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:226)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:313)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:8762)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
12-17 19:57:58.345 24409 24409 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: DSN is required. Use empty string to disable SDK.
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.Sentry.initConfigurations(Sentry.java:192)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.Sentry.init(Sentry.java:162)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.Sentry.init(Sentry.java:110)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:59)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:32)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.android.core.SentryInitProvider.onCreate(SentryInitProvider.java:25)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.content.ContentProvider.attachInfo(ContentProvider.java:2522)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.content.ContentProvider.attachInfo(ContentProvider.java:2492)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.android.core.SentryInitProvider.attachInfo(SentryInitProvider.java:42)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.installProvider(ActivityThread.java:8328)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    ... 11 more
12-17 19:57:58.346 24409 24435 I Sentry  : sentry-debug-meta.properties file was not found.
12-17 19:57:58.348 24409 24435 D Sentry  : SU isn't found on this Device.
12-17 19:57:58.371 24409 24409 I Process : Sending signal. PID: 24409 SIG: 9
ka-iy commented 6 months ago

@Kartikeya-IYER For the test, you can use both F-Droid or website .apk, as they have the identical crash reporting logic.

Ok, thanks for the confirmation. I've enabled logging on v2.10.4, about to install and start v2.10.5

jurajhilje commented 6 months ago

@mohammadrafigh Great, thanks for providing the crash logs!

mohammadrafigh commented 6 months ago

Thanks for making internet better

here are the full logs if it helps more:

--------- beginning of main
12-17 19:57:58.281 24409 24409 I net.ivpn.client: Using CollectorTypeCC GC.
12-17 19:57:58.284 24409 24409 E net.ivpn.client: Not starting debugger since process cannot load the jdwp agent.
12-17 19:57:58.289 24409 24409 D ActivityThread: setConscryptValidator
12-17 19:57:58.289 24409 24409 D ActivityThread: setConscryptValidator - put
12-17 19:57:58.302 24409 24409 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10578; state: ENABLED
12-17 19:57:58.312 24409 24409 I net.ivpn.client: Failed to add image file: Failed to find OatDexFile for DexFile /data/app/~~fY9v7w_0OZ1U7Otsc74esg==/net.ivpn.client-XxI-5Vqj042lvEt39dzF9w==/base.apk (canonical path /data/app/~~fY9v7w_0OZ1U7Otsc74esg==/net.ivpn.client-XxI-5Vqj042lvEt39dzF9w==/base.apk) in OatFile /data/app/~~a689lZWL8btdMkMiMryFEw==/net.ivpn.client-TFX8lK9Ltg198NfLgXXhTw==/oat/arm64/base.odex
12-17 19:57:58.314 24409 24409 D nativeloader: Configuring clns-4 for other apk /data/app/~~a689lZWL8btdMkMiMryFEw==/net.ivpn.client-TFX8lK9Ltg198NfLgXXhTw==/base.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/~~a689lZWL8btdMkMiMryFEw==/net.ivpn.client-TFX8lK9Ltg198NfLgXXhTw==/lib/arm64:/data/app/~~a689lZWL8btdMkMiMryFEw==/net.ivpn.client-TFX8lK9Ltg198NfLgXXhTw==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/net.ivpn.client
12-17 19:57:58.326 24409 24409 V GraphicsEnvironment: ANGLE Developer option for 'net.ivpn.client' set to: 'default'
12-17 19:57:58.326 24409 24409 V GraphicsEnvironment: ANGLE GameManagerService for net.ivpn.client: false
12-17 19:57:58.326 24409 24409 V GraphicsEnvironment: Updatable production driver is not supported on the device.
12-17 19:57:58.329 24409 24409 D NetworkSecurityConfig: No Network Security Config specified, using platform default
12-17 19:57:58.330 24409 24409 D NetworkSecurityConfig: No Network Security Config specified, using platform default
12-17 19:57:58.331 24409 24409 I MultiDex: VM with version 2.1.0 has multidex support
12-17 19:57:58.331 24409 24409 I MultiDex: Installing application
12-17 19:57:58.331 24409 24409 I MultiDex: VM has multidex support, MultiDex support library is disabled.
12-17 19:57:58.332 24409 24409 I Sentry  : Retrieving auto-init from AndroidManifest.xml
12-17 19:57:58.345 24409 24409 D AndroidRuntime: Shutting down VM
--------- beginning of crash
12-17 19:57:58.345 24409 24409 E AndroidRuntime: FATAL EXCEPTION: main
12-17 19:57:58.345 24409 24409 E AndroidRuntime: Process: net.ivpn.client, PID: 24409
12-17 19:57:58.345 24409 24409 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider io.sentry.android.core.SentryInitProvider: java.lang.IllegalArgumentException: DSN is required. Use empty string to disable SDK.
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.installProvider(ActivityThread.java:8333)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.installContentProviders(ActivityThread.java:7833)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7582)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2400)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:106)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:226)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:313)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:8762)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
12-17 19:57:58.345 24409 24409 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: DSN is required. Use empty string to disable SDK.
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.Sentry.initConfigurations(Sentry.java:192)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.Sentry.init(Sentry.java:162)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.Sentry.init(Sentry.java:110)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:59)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:32)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.android.core.SentryInitProvider.onCreate(SentryInitProvider.java:25)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.content.ContentProvider.attachInfo(ContentProvider.java:2522)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.content.ContentProvider.attachInfo(ContentProvider.java:2492)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at io.sentry.android.core.SentryInitProvider.attachInfo(SentryInitProvider.java:42)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    at android.app.ActivityThread.installProvider(ActivityThread.java:8328)
12-17 19:57:58.345 24409 24409 E AndroidRuntime:    ... 11 more
12-17 19:57:58.346 24409 24435 I Sentry  : sentry-debug-meta.properties file was not found.
12-17 19:57:58.348 24409 24435 D Sentry  : SU isn't found on this Device.
12-17 19:57:58.371 24409 24409 I Process : Sending signal. PID: 24409 SIG: 9
ka-iy commented 6 months ago

@jurajhilje Ok, I have two crash incidents which should have been logged. But since I'm not at my Linux box right now I can't get the log via adb. So if you can tell me the local filesystem location of the log, and if that location is accessible without needing root, I can just attach the log file directly.

jurajhilje commented 6 months ago

@Kartikeya-IYER Thank you, but it's not necessary as now I'm able to reproduce the crash on my end and see the same crash log. I'm working on the fix so it should be available ASAP. cc @mohammadrafigh

ka-iy commented 6 months ago

@jurajhilje Cool, good luck!

As an aside, I think that it would be helpful to have the log location be customizable so that if this ever happens again (or for other issues needing logs), non-rooted android users can just browse their filesystem and directly attach the log :)

satirical-muzzle commented 6 months ago

I also have the same issue. The app crashed upon installing v2.10.5. I tried to install v2.10.4 from Github but I receive an error during install that says package appears to be invalid. I tried installing v2.10.4 from F-Droid but received an INSTALL_FAILED_VERSION_DOWNGRADE error. I am currently unable to install or run any version of IVPN on Android 14.

ka-iy commented 6 months ago

@satirical-muzzle Uninstall v2.10.5 first - this will let you downgrade. Then install v2.10.4 from F-Droid so that you will get the update notification when the new build with the fix (v2.10.6) hits F-Droid. Needless to say, ignore the update notification you will get for the borked v2.10.5 :)

Note that you will need to login to the downgraded version after installation, so keep your ivpn account ID handy. The rest of your settings should be preserved.

jurajhilje commented 6 months ago

The fixed app is pending for processing on F-Droid.

As a temporary workaround, you can manually download and install the previous v2.10.4 version from F-Droid page: https://f-droid.org/repo/net.ivpn.client_127.apk https://f-droid.org/en/packages/net.ivpn.client/

satirical-muzzle commented 6 months ago

@Kartikeya-IYER @jurajhilje I uninstalled v2.10.5, restarted the phone, but I still cannot downgrade. When opening the APK from F-Droid, the error says that the package appears to be invalid. I get this same error if I download the APK from github.

jurajhilje commented 6 months ago

@satirical-muzzle We have 3 distribution options other than F-Droid, let me know if you can use any of those (dropdown list at Download button): https://www.ivpn.net/apps-android/

licaon-kter commented 6 months ago

fyi https://gitlab.com/fdroid/fdroiddata/-/issues/3154#note_1700378550

jurajhilje commented 6 months ago

New app version v2.10.6 is now available on F-Droid.

ka-iy commented 6 months ago

New app version v2.10.6 is now available on F-Droid.

I confirm that v2.10.6 installed via F-Droid works just fine! Thank you, @jurajhilje and @licaon-kter for the quick resolution/fix 🖖