-
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 live reload doesn't work, but build works fine. Error: java.lang.IllegalArgumentException: allowedOriginRules #7423
Comments
This issue has been labeled as |
As workaround you can remove the |
Thank fixed it thanks! Doesn't work on localhost but that may be because of my wifi. Works fine when i use the computer's ip address http://192.168.1.136:5173 without / at the end |
Yeah, you can't use localhost for live reload unless you enable port forwarding. You can enable port forwarding from chrome://inspect/#devices |
I've encountered the same issue. I am using
|
@jcesarmobile Fantastic, removing the trailing slash from |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
@capacitor/ios: 6.0.0
Installed Dependencies:
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
@capacitor/ios: 6.0.0
[success] iOS looking great! 👌
[success] Android looking great! 👌
Other API Details
Platforms Affected
Current Behavior
On Android, I'm getting an error when trying to use a development server for live reloading. Not using a dev server (removing the server url options from capacitor config) works completely fine. IOS both dev server and no dev server works fine.
When running a simple react vite project, I have the vite server open in one terminal window and setup the capacitor config as so:
After running npm run build, npx cap sync, npx cap open android and then pressing play on the emulator, I get this error:
My suspicion is that the URL format seems a bit strange without the dashes, or it could be some cors issue.
The production build works fine just not dev server and both are working on ios for some reason.
Heres the full log:
Expected Behavior
Expected behavior is for the dev server to work and whenever I save files to be able to hotreload changes.
Project Reproduction
https://github.com/kimproductions/capacitor-devserver-not-working
Additional Information
No response
The text was updated successfully, but these errors were encountered: