-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Bug]: Android ERR_CONNECTION_REFUSED when redirecting from external url back to https://localhost #7367
Comments
We've got the same issue (with Capacitor 5/6). #5818 is about the same issue but was closed because set as duplicate of #4240 (by mistake to me, because is does not fix the issue at all as said by this comment #4240 (comment)). Might be related to this one (with Capacitor 6 example) as well: #7454 |
|
Hi @terrencebob, Thanks for getting back to me. You are referring to overload android/capacitor/src/main/java/com/getcapacitor/BridgeWebViewClient.java, is that correct? Is there any way to do this without forking the repo? Or, would it be possible to integrate this into the release? I'm not sure if we are able maintain a custom fork... Thank you! Best, |
I just spent a couple of hours trying to resolve this, I found this #2391 where it seems like a lot of people have struggled with it only for it to be closed by this #7199 which did not seem to fix it and yet somehow nobody complained, until I found this bug. So I am a little confused, was it working at any point in time and is this a regression or people just moved on to something else? |
This really blocks us - we have not moved away but will continue to use our existing native app. |
I'm facing the same issue. Any updates? I've tried setting But no difference. |
I can confirm that the suggestion by @terrencebob works. change below in BridgeWebViewClient. From: To: Can we get this change implemented ASAP? FYI. Ionic CLI : 7.2.0 Capacitor: Capacitor CLI : 6.1.2 |
Capacitor Version
Latest Dependencies:
@capacitor/cli: 5.7.4
@capacitor/core: 5.7.4
@capacitor/android: 5.7.4
@capacitor/ios: 5.7.4
Installed Dependencies:
@capacitor/cli: 5.7.3
@capacitor/core: 5.7.3
@capacitor/android: 5.7.3
@capacitor/ios: 5.7.3
[success] Android looking great! 👌
Other API Details
Platforms Affected
Current Behavior
The app is redirecting to an external auth service. From there the user is redirected 302 back to https://localhost, where the browser blocks the request saying ERR_CONNECTION_REFUSED:
HTTPS is encouraged: "we would strongly recommend that you change your androidScheme to use https."
capacitor.config.ts looks like this:
Expected Behavior
Redirect to https://localhost is successful.
Project Reproduction
https://github.com/atremel/redir
Additional Information
Real device has this issue, too.
The text was updated successfully, but these errors were encountered: