Parcel: Hot module reloading not working with https enabled

Created on 15 Mar 2019  路  3Comments  路  Source: parcel-bundler/parcel

馃悰 bug report


Running parcel with parcel src/index.html --https and the browser is not autoreloading. However, it works just by removing the --https flag.

Console output is Firefox could not connect to server at wss://localhost:36857/.

馃實 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel |1.11.0
| Node |10.15.0
| npm/Yarn |6.4.1
| Operating System |18.04.2 LTS (Bionic Beaver)

Bug Stale 鉁栵笍 Non-Parcel bug

Most helpful comment

for searchers: you can add an exception for a specific domain/port combo by going to the https:// version of that wss endpoint and ff should prompt for an exception. My hot module reloading is at wss://localhost:49606 so I loaded https://localhost:49606 in a new tab, added the exception, and now it connects as expected.

You'd guess that the network.websocket.allowInsecureFromHTTPS value would apply here, but its behavior is to allow you to connect to a ws:// endpoint while on an https:// page.

All 3 comments

This happens only with Firefox, Chrome works. A quick google search suggests that Firefox doesn't want to connect to a secure websocket with a self-signed certificate.

for searchers: you can add an exception for a specific domain/port combo by going to the https:// version of that wss endpoint and ff should prompt for an exception. My hot module reloading is at wss://localhost:49606 so I loaded https://localhost:49606 in a new tab, added the exception, and now it connects as expected.

You'd guess that the network.websocket.allowInsecureFromHTTPS value would apply here, but its behavior is to allow you to connect to a ws:// endpoint while on an https:// page.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

urbanhop picture urbanhop  路  3Comments

Niggler picture Niggler  路  3Comments

donaldallen picture donaldallen  路  3Comments

algebraic-brain picture algebraic-brain  路  3Comments

jzimmek picture jzimmek  路  3Comments