Closed coreyasmith closed 3 weeks ago
Hi @coreyasmith - Can you check that you are using http:\\localhost:3000
for the next.config.js assetPrefix
(by default this originates from the PUBLIC_URL
environment variable)?
Latest versions of Next.js should derive the websocket protocol from this if set. In this case, I would expect the websocket connection to be ws://localhost:3000/_next/webpack-hmr
which should succeed.
Hi @coreyasmith - Can you check that you are using
http:\\localhost:3000
for the next.config.jsassetPrefix
(by default this originates from thePUBLIC_URL
environment variable)?Latest versions of Next.js should derive the websocket protocol from this if set. In this case, I would expect the websocket connection to be
ws://localhost:3000/_next/webpack-hmr
which should succeed.
@ambrauer yes, I've not made any changes to next.config.js
which sets assetPrefix
to the result of getPublicUrl
from @sitecore-jss/sitecore-jss-nextjs
.
I think the browser is trying to use wss://
instead of ws://
because Sitecore is running on https
.
@coreyasmith Got it, thanks for confirming. I've added this to our backlog to investigate further.
This has been automatically marked as stale because it has not had recent activity. It will be closed if there is no further activity within 30 days. You may add comments or the 'keep' label to prevent it from closing. Thank you for your contributions.
Describe the Bug
The following error is shown in the Firefox console in the Experience Editor repeatedly:
And in Chrome:
To Reproduce
Expected Behavior
No webpack-hmr errors are thrown in Experience Editor with a fresh install.
Possible Fix
None, but the proposed CORS fix from #1485 did not have any effect.
Provide environment information