schwabe / ics-openvpn

OpenVPN for Android
3.36k stars 1.2k forks source link

VPN will not start #1471

Closed 2011 closed 2 years ago

2011 commented 2 years ago

To make issues more manageable, I would appreciate it if you fill out the following details as applicable:

General information

  1. Android Version: 6.0 (multiple devices)
  2. Android Vendor/Custom ROM: LinageOS (and others)
  3. Device: multipe, but will use Galaxy Tab2 for this report
  4. Version of the app (version number/play store version/self-built): 0.7.34 (F-Droid)

Description of the issue

Get popups (Unfortunately, OpenVPN for Android has stopped). Every version prior has worked without any issues (for at least the past eight years).

Log (if applicable)

l2022-03-20 16:53:08 F-Droid built and signed version 0.7.34 running on Android Galaxy Tab 2 (piranha), Android 6.0.1 (MOI10E) API 23, ABI armeabi-v7a, (samsung/espresso10wifixx/espresso10wifi:4.2.2/JDQ39/P5110XXDML1:user/release-keys)
2022-03-20 16:53:08 Building configuration…
2022-03-20 16:53:10 started Socket Thread
2022-03-20 16:54:17 Building configuration…
2022-03-20 16:50:09 Reread (312) log items from log cache file
2022-03-20 16:53:08 Building configuration…
2022-03-20 16:53:10 started Socket Thread
2022-03-20 16:54:17 Reread (3) log items from log cache file
2022-03-20 16:54:17 F-Droid built and signed version 0.7.34 running on Android Galaxy Tab 2 (piranha), Android 6.0.1 (MOI10E) API 23, ABI armeabi-v7a, (samsung/espresso10wifixx/espresso10wifi:4.2.2/JDQ39/P5110XXDML1:user/release-keys)
2022-03-20 16:54:18 Restarting OpenVPN Service (App crashed probably crashed or killed for memory pressure)
2022-03-20 16:54:18 started Socket Thread

Configuration file

# Config for OpenVPN 2.x
# Enables connection to GUI
management /data/user/0/de.blinkt.openvpn/cache/mgmtsocket unix
management-client
management-query-passwords
management-hold
setenv IV_GUI_VER "de.blinkt.openvpn 0.7.34" 
setenv IV_SSO openurl,webauth,crtext
setenv IV_PLAT_VER "23 6.0.1 armeabi-v7a Android piranha Galaxy Tab 2"
setenv IV_HWADDR 01:23:45:67:89:ab:cd
tls-cert-profile legacy
machine-readable-output
allow-recursive-routing
ifconfig-nowarn
client
verb 4
connect-retry 2 300
resolv-retry 60
dev tun
remote 23.82.193.66 1194 udp
tun-mtu-extra 32 
auth-user-pass
<ca>

[...]

</ca>
<tls-auth>

[...]

</tls-auth>
key-direction 1
mssfix
nobind
remote-cert-tls server
data-ciphers AES-256-GCM:AES-128-GCM:AES-256-CBC
cipher AES-256-CBC
auth SHA512
persist-tun
# persist-tun also enables pre resolving to avoid DNS resolve problem
preresolve
# Use system proxy setting
management-query-proxy
# Custom configuration options
# You are on your on own here :)
# These options found in the config file do not map to config settings:
ping 15 
fast-io 
ping-restart 0 
reneg-sec 0 
resolv-retry infinite 
ping-timer-rem
schwabe commented 2 years ago

Since you are running from F-Droid, I don't get your crash report in the play console. Can you run adb logcat and fetch the stacktrace from there? Note that 0.7.34 is a beta version (F-Droid has no beta handling)

2011 commented 2 years ago

Since you are running from F-Droid, I don't get your crash report in the play console. Can you run adb logcat and fetch the stacktrace from there?

Not an expert at this by any measure, but here goes (note that I obtained the log from a different device that exhibits identical behavior, since I need the VPN on the first device, and have downgraded it to 0.7.33):

[03-21 07:39:23.515 587:601 I/ActivityManager]
START u0 {act=android.intent.action.MAIN cmp=de.blinkt.openvpn/.LaunchVPN (has extras)} from uid 10122 on display 0

[03-21 07:39:23.554 587:2099 I/ActivityManager]
START u0 {flg=0x20000 cmp=de.blinkt.openvpn/.activities.LogWindow} from uid 10122 on display 0

[03-21 07:39:23.876 10117:10347 E/AndroidRuntime]
FATAL EXCEPTION: Thread-4217
Process: de.blinkt.openvpn:openvpn, PID: 10117
Theme: themes:{}
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/util/concurrent/CompletableFuture;
    at de.blinkt.openvpn.core.OpenVPNThread.<init>(OpenVPNThread.java:40)
    at de.blinkt.openvpn.core.OpenVPNService.startOpenVPN(OpenVPNService.java:632)
    at de.blinkt.openvpn.core.OpenVPNService.lambda$onStartCommand$1$de-blinkt-openvpn-core-OpenVPNService(OpenVPNService.java:528)
    at de.blinkt.openvpn.core.OpenVPNService$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
    at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassNotFoundException: Didn't find class "java.util.concurrent.CompletableFuture" on path: DexPathList[[zip file "/data/app/de.blinkt.openvpn-2/base.apk"],nativeLibraryDirectories=[/data/app/de.blinkt.openvpn-2/lib/arm64, /data/app/de.blinkt.openvpn-2/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
    ... 5 more
    Suppressed: java.lang.ClassNotFoundException: java.util.concurrent.CompletableFuture
        at java.lang.Class.classForName(Native Method)
        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
        ... 6 more
    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

[...]

[03-21 07:39:26.238 587:2010 I/ActivityManager]
Process de.blinkt.openvpn:openvpn (pid 10117) has died

[03-21 07:39:26.238 587:2010 D/ActivityManager]
cleanUpApplicationRecord -- 10117

[03-21 07:39:26.239 587:2010 W/ActivityManager]
Scheduling restart of crashed service de.blinkt.openvpn/.core.OpenVPNService in 1000ms

[03-21 07:39:26.239 587:2010 W/ActivityManager]
Scheduling restart of crashed service de.blinkt.openvpn/.core.OpenVPNStatusService in 10999ms

[03-21 07:39:27.261 587:607 I/ActivityManager]
Start proc 10357:de.blinkt.openvpn:openvpn/u0a122 for service de.blinkt.openvpn/.core.OpenVPNService

[03-21 07:39:27.443 10357:10357 I/art]
Rejecting re-init on previously-failed class java.lang.Class<de.blinkt.openvpn.core.ICSOpenVPNApplication$$ExternalSyntheticLambda0>

[03-21 07:39:27.443 10357:10357 I/art]
Rejecting re-init on previously-failed class java.lang.Class<de.blinkt.openvpn.core.ICSOpenVPNApplication$$ExternalSyntheticLambda0>

[03-21 07:39:27.766 10357:10370 E/AndroidRuntime]
FATAL EXCEPTION: Thread-4231
Process: de.blinkt.openvpn:openvpn, PID: 10357
Theme: themes:{}
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/util/concurrent/CompletableFuture;
    at de.blinkt.openvpn.core.OpenVPNThread.<init>(OpenVPNThread.java:40)
    at de.blinkt.openvpn.core.OpenVPNService.startOpenVPN(OpenVPNService.java:632)
    at de.blinkt.openvpn.core.OpenVPNService.lambda$onStartCommand$1$de-blinkt-openvpn-core-OpenVPNService(OpenVPNService.java:528)
    at de.blinkt.openvpn.core.OpenVPNService$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
    at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassNotFoundException: Didn't find class "java.util.concurrent.CompletableFuture" on path: DexPathList[[zip file "/data/app/de.blinkt.openvpn-2/base.apk"],nativeLibraryDirectories=[/data/app/de.blinkt.openvpn-2/lib/arm64, /data/app/de.blinkt.openvpn-2/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
    ... 5 more
    Suppressed: java.lang.ClassNotFoundException: java.util.concurrent.CompletableFuture
        at java.lang.Class.classForName(Native Method)
        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
        ... 6 more
    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

[...]

[03-21 07:39:29.738 587:19858 I/ActivityManager]
Process de.blinkt.openvpn:openvpn (pid 10357) has died

[03-21 07:39:29.738 587:19858 D/ActivityManager]
cleanUpApplicationRecord -- 10357

[03-21 07:39:29.739 587:19858 W/ActivityManager]
Service crashed 2 times, stopping: ServiceRecord{b12084b u0 de.blinkt.openvpn/.core.OpenVPNService}

[03-21 07:39:29.739 587:19858 W/ActivityManager]
Service crashed 2 times, stopping: ServiceRecord{8af72ca u0 de.blinkt.openvpn/.core.OpenVPNStatusService}

Note that 0.7.34 is a beta version (F-Droid has no beta handling)

Not sure I completely agree with that. I see other projects on F-Droid with beta labels that don't get recommened for me to install. I don't see any designation that marks 0.7.34 as beta.

I will add that I only have this problem with my Android 6 devices. The update appears to work perfectly on all of my Android 7 (or greater) devices.

schwabe commented 2 years ago

I will look into the crash. Last time I spoke with F-droid they told me that there is no handling of beta versions. Maybe that has been added recently. I used to add extra vxx-production tags in my repo just for F-droid, so they could pick up only production versions but at some point they started picking up all versions including beta, so I stopped adding the git tags since nobody used them anymore.

schwabe commented 2 years ago

btw. do you have an example of an app with beta versions?

2011 commented 2 years ago

I will look into the crash.

Thank you.

btw. do you have an example of an app with beta versions?

The options include (in "Other): "Unstable updates: Suggest updates to unstable versions" (which I do not have selected).

Without looking through every app, I did find one called "Mumla," which has (not the newest version, but included in the ones shown) a "3.5.9-beta1". I do remember recently seeing several 1.14 alpha versions of F-Droid itself (still listed), and I never got prompted to update to any of them in the app (someone did suggest, in response to a bug report, that I try the latest alpha versions on one of my devices, and I had to select it manually). F-Droid did (of course) suggest the upgrade to the production version of 1.14 upon release.

schwabe commented 2 years ago

Yeah, I had a chat with the people of fdroid. There seems to be no easy solution to have beta versions, automatic pickup of new versions as well marking the stable as preferred.

2011 commented 2 years ago

If you have a "beta" label (or even a numbering version like the old linux kernels in the last century), I can ignore those manually, but I agree that F-Droid should have the capability to designate preferred versus unstable versions.

schwabe commented 2 years ago

@2011 there are no dedicated beta versions. Each beta may became stable if it doesn't have any bugs. If this issue wasn't in 0.7.34, 0.7.34 would have become the stable version.

kambala-decapitator commented 1 year ago

encountered same crash when starting VPN on a 4.4 device, used apk 0.7.34 from GitHub releases. Downgrading to 0.7.33 doesn't have the issue. Please add to release notes of 0.7.34 that it's broken on old OS versions.

schwabe commented 1 year ago

I think it is in the release notes:

image
kambala-decapitator commented 1 year ago

@schwabe please read attentively: I'm talking about v0.7.34 (same as in OP), not 0.7.36

schwabe commented 1 year ago

Yes. 0.7.34 might have a bug that crashes on your phone but that is different from requiring a different minimum Android version. And the bug does not manifest in all cases, e.g. selecting OpenVPN3 core should not trigger it.

kambala-decapitator commented 1 year ago

Yes. 0.7.34 might have a bug that crashes on your phone but that is different from requiring a different minimum Android version. And the bug does not manifest in all cases, e.g. selecting OpenVPN3 core should not trigger it.

thanks. Anyway, I think such info should be added to release notes that people don't bang their head and start searching why it crashes.

kambala-decapitator commented 1 year ago

selecting OpenVPN3 core should not trigger it

yes, I confirm