Comments (6)
As workaround you can remove the /
at the end of the url.
from capacitor.
Yeah, you can't use localhost for live reload unless you enable port forwarding.
localhost is "this computer", but if you run on an emulator or a real device, localhost is the emulator or the real device themselves, which don't have the live reload server running, the live reload server is in your computer.
You can enable port forwarding from chrome://inspect/#devices
from capacitor.
This issue has been labeled as type: bug
. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.
from capacitor.
As workaround you can remove the
/
at the end of the url.
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
from capacitor.
As workaround you can remove the
/
at the end of the url.
I've encountered the same issue. I am using "url": "https://example.com/#/test"
, and it currently runs in the Android Studio emulator virtual device, but it crashes on a physical device.
There was no such problem in previous versions.
Process: cc.bagua, PID: 15550
java.lang.RuntimeException: Unable to start activity ComponentInfo{cc.bagua/cc.bagua.MainActivity}: java.lang.IllegalArgumentException: allowedOriginRules https:example.com is invalid
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3640)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3797)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2215)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:346)
at android.os.Looper.loop(Looper.java:475)
at android.app.ActivityThread.main(ActivityThread.java:7889)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1009)
Caused by: java.lang.IllegalArgumentException: allowedOriginRules https:example.com is invalid
at J.N.MrxnMTWN(Native Method)
at org.chromium.android_webview.AwContents.b(chromium-TrichromeWebViewGoogle6432.aab-stable-626111933:36)
at WV.sS.addDocumentStartJavaScript(chromium-TrichromeWebViewGoogle6432.aab-stable-626111933:39)
at java.lang.reflect.Method.invoke(Native Method)
at WV.ya.invoke(chromium-TrichromeWebViewGoogle6432.aab-stable-626111933:36)
at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
at $Proxy3.addDocumentStartJavaScript(Unknown Source)
at androidx.webkit.internal.WebViewProviderAdapter.addDocumentStartJavaScript(WebViewProviderAdapter.java:110)
at androidx.webkit.WebViewCompat.addDocumentStartJavaScript(WebViewCompat.java:823)
at com.getcapacitor.Bridge.loadWebView(Bridge.java:262)
at com.getcapacitor.Bridge.<init>(Bridge.java:223)
at com.getcapacitor.Bridge.<init>(Unknown Source:0)
at com.getcapacitor.Bridge$Builder.create(Bridge.java:1555)
at com.getcapacitor.BridgeActivity.load(BridgeActivity.java:48)
at com.getcapacitor.BridgeActivity.onCreate(BridgeActivity.java:42)
at android.app.Activity.performCreate(Activity.java:8050)
at android.app.Activity.performCreate(Activity.java:8030)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1330)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3613)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3797)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2215)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:346)
at android.os.Looper.loop(Looper.java:475)
at android.app.ActivityThread.main(ActivityThread.java:7889)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1009)
from capacitor.
@jcesarmobile Fantastic, removing the trailing slash from server.url
solved it for me as well!
from capacitor.
Related Issues (20)
- [Feature]: Put app logic into an external package HOT 1
- [Bug]: Build failed because Capacitor.swiftmodule is missing a required architecture. Would you like to build for rosetta instead? HOT 7
- [Bug]: Capacitor on Android detected as web platform after redirecting with `allowNavigation` HOT 2
- [Bug]: With CapacitorJS Storage does not work with IOS Version "@capacitor/ios": "^6.0.0" HOT 2
- [Bug]: XMLHttpRequest onreadystatechange not working for requests HOT 1
- TypeError: window.Capacitor.triggerEvent is not a function. (In 'window.Capacitor.triggerEvent('pause', 'document')', 'window.Capacitor.triggerEvent' is undefined) HOT 2
- [Bug]: v6 ios biuld errors HOT 2
- [Feature]: Support Native Angular Localization HOT 2
- [Bug]: CompileSwift normal arm64 (in target 'App' from project 'App') xcodebuild -exportArchive HOT 2
- [Bug]: Capacitor is not injected on loaded URLs specified in allowNavigation on android when webview supports the document start script feature HOT 1
- [Bug]: new android plugin fails when 3rd party library used HOT 1
- [Bug]: android permissions confusing HOT 1
- [Feature]: Http plugin: Support ArrayBuffer as request body and response HOT 3
- [Bug]: Sending TypedArray as fetch body gets JSON.stringified HOT 3
- [Bug]: CapacitorHttp post return data is wrong HOT 3
- ios Build failed HOT 2
- [Feature]: expose `methodName` via `CAPPluginCall` HOT 1
- [Bug]: Update CapacitorHttp "Large File Support" doc, fix Filesystem.downloadFile() doc HOT 2
- [Feature]: Update CapacitorHttp "Large File Support" doc
- [Feature]: material you themeing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capacitor.