Open matheo opened 1 month ago
@matheo The exposed scheme in the "run" command correspond to the iOS schemes. It's not linked to the https protocol.
Are you sure you cannot use attribute --port=443 for HTTPS ?
--live-reload --port 443
What TiBz0u commented is correct, --scheme
is the iOS project scheme, not the live reload url scheme.
The provided app doesn't run using https, so it's not valid to reproduce. Can you provide one that runs the live reload server on https?
@TiBz0u @jcesarmobile so it's impossible to modify the --live-reload-url
as it was before, and the capacitor.config will always be updated with an http://
url unable to consume a secure API locally?
I tried to serve --port 443
but that port is already in use, you get a Error: listen EACCES: permission denied 0.0.0.0:443
. My point is: live-reload
patches the server.url config and it needs to be https
for the App to query secure development APIs.
Capacitor has never supported --live-reload-url
, not sure what you are talking about.
You can always edit the capacitor config file manually and edit the sever.url
to point to a https url, but don't use the --live-reload
option as it will replace whatever you have in the config file
@jcesarmobile oh I see only Ionic has supported a custom url for live-reload and Capacitor has never done that, my fault
@matheo, wondering if it --host <host>
does respond to your use case if you want to use only the cli command?
@jcesarmobile can you confirm?
Thanks
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 6.1.2 @capacitor/core: 6.1.2 @capacitor/android: 6.1.2 @capacitor/ios: 6.1.2
Installed Dependencies:
@capacitor/android: 6.1.2 @capacitor/core: 6.1.2 @capacitor/cli: 6.1.2 @capacitor/ios: 6.1.2
Other API Details
Platforms Affected
Current Behavior
It was reported here that live-reload has a hardcoded scheme and it still seems to be the case on
main
: https://github.com/ionic-team/capacitor/blob/main/cli/src/util/livereload.ts#L172Why does the API of this command exposes
--scheme
if we cannot connect to a localhost served with--ssl
? https://capacitorjs.com/docs/cli/commands/runExpected Behavior
To be able to run
ng serve --ssl
and connect to it via--live-reload --scheme=https
.Project Reproduction
https://github.com/matheo/capacitor-live-reload-bug
Additional Information
No response