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

Loading pages via VPN on iOS fails #2122

Open
jdeepwell opened this issue May 2, 2024 · 2 comments
Open

Loading pages via VPN on iOS fails #2122

jdeepwell opened this issue May 2, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jdeepwell
Copy link

  • [✅] I have read the Getting Started section
  • [✅] I have already searched for the same problem

Environment

Technology Version
Flutter version 3.10.5
Plugin version 5.8.0
Android version n/a
iOS version 17.4.1
macOS version n/a
Xcode version 15.2
Google Chrome version n/a

Device information: Apple iPhone 13 pro

Description

Expected behavior:

  • Activate the VPN on the device
  • Launch the app
  • InAppWebView can retrieve pages from the server via the VPN

Current behavior:

  • Activate the VPN on the device
  • Launch the app
  • The app can resolve the host name but every page load in inAppWebView hangs in a timeout

Loading the same page via Safari on the device while the VPN is active works.

Steps to reproduce

  1. Install a VPN
  2. Make sure the server/pages are ONLY accessible via the VPN!
  3. Activate the VPN connection
  4. Verify that the page can be loaded in Safari
  5. Launch the app and try to load the same page via inAppWebView

Note that when making the page also accessible without the VPN, it also loads fine in inAppWebView. Only when the app must go through the VPN to access the page, it fails with inAppWebView (but works with Safari)

IMPORTANT: This was only tested on iOS and fur us in this case also is relevant for iOS – so any solutions that only work on Android are of no help :(

Any help would be greatly appreciated!

@jdeepwell jdeepwell added the bug Something isn't working label May 2, 2024
Copy link

github-actions bot commented May 2, 2024

👋 @jdeepwell

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

@jdeepwell
Copy link
Author

Addendum:
We created a test app in which we can switch between flutter_inappwebview and webview_flutter.
webview_flutter can connect to the server through the VPN, flutter_inappwebview just hangs in the timeout.

PS: The same is true by the way for dart:http, which we use to make direct HTTP GET requests to an API on the same server. If we use cupertino_http, it can reach the server, with dart:http it can not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant