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

Forge Android cannot download assets initially when traffic is forced through VPN #6718

Open
QuickBanjo opened this issue Dec 24, 2024 · 2 comments
Assignees
Labels

Comments

@QuickBanjo
Copy link

Describe the bug
The first time you run Forge on Android, it is supposed to download an assets file. If you are connected to the internet, this normally works.

However, if you have configured a VPN and force all network traffic through that VPN, it doesn't work. This is the case even if you can connect to the internet via the VPN.

To Reproduce

  1. Verify that your phone is connected to a network, such as wifi.
  2. Verify in system settings that you are connected to a VPN, and that the VPN is set to "Block connections without VPN".
  3. Verify that other apps can connect to the internet via the VPN.
  4. Install Forge Android.
  5. Run app.

Actual behavior
Get the error message "Updated resource files cannot be downloaded due to lack of internet connection".

Expected behavior
The app downloads assets and updates as usual.

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S7
  • OS: Android 8.0.0
  • Forge version: 2.0.01 snapshot

Additional context

Workaround
I was unable to find a workaround, other than to stop forcing traffic over VPN, which defeats the purpose of that VPN setting.

@QuickBanjo
Copy link
Author

I noticed that the connectivity check specifically checks for wifi, ethernet, etc., but I think that when VPN traffic is forced, that there is a separate interface internally.

Rather than explicitly checking for VPNs, is there a reason we can't use a more hardware agnostic approach to checking for internet connectivity, such as https://stackoverflow.com/a/4239019 ?

@QuickBanjo
Copy link
Author

This also affects the internet check for the Classic Mode main menu "Help" button. It says "no internet" when on a forced VPN. Fixing the isNetworkConnected call should fix that as well.

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

No branches or pull requests

3 participants