Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPN Disconnects Immediately on App Bundle Release Build #128

Open
OzeryOt opened this issue Jan 17, 2025 · 2 comments
Open

VPN Disconnects Immediately on App Bundle Release Build #128

OzeryOt opened this issue Jan 17, 2025 · 2 comments

Comments

@OzeryOt
Copy link

OzeryOt commented Jan 17, 2025

I'm encountering an issue with the openvpn_flutter library where the VPN connection disconnects immediately after attempting to connect. The issue only occurs when building the app as an App Bundle in release mode.

When I build the app as an APK in release mode, the VPN works without any problems. The problem is isolated to App Bundles.

Environment Details
Library Version: openvpn_flutter v1.3.3
Flutter Version: 3.27.1
Dart Version: 3.6.0
Min SDK Version: 21
Target SDK Version: 35
Android Device/OS: Tested on Pixel 5 (Android 12) and Galaxy S21 (Android 13)
Steps to Reproduce
Build the app using flutter build appbundle --release.
Deploy the app to the Play Store or sideload the App Bundle.
Attempt to connect to the VPN using the openvpn_flutter library.
Observe that the VPN connection starts but disconnects immediately.

Troubleshooting Steps Taken
Verified that VpnService.prepare() is being called properly.
Confirmed the app works as expected when built as an APK in release mode.
Tested on multiple devices and Android versions.
Updated ProGuard rules to ensure no relevant classes are being obfuscated or removed:

-keep class de.blinkt.openvpn.** { ; }
-dontwarn de.blinkt.openvpn.
*

@OzeryOt
Copy link
Author

OzeryOt commented Jan 17, 2025

@nizwar

@kglebows
Copy link

kglebows commented Feb 7, 2025

Got the same issue. Any fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants