You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running wxt inside wsl2 and i cannot connect to websocket i.e vite-hmr.
Is this related to this? I'm able to to connect to the socket from inside wsl2 terminal. Or is it because of wsl2 network configurations, i can't connect even if I use wsl2's ip.
Apologies. I'm using [email protected].
I figured out my issue, once i changed my hostname to 0.0.0.0 i could connect from native cmd to wxt running on wsl2 but another problem arised. Due to manifest v3's csp(content security policy doesn't allow 0.0.0.0) requirements the generated manifest would not allow me to load my extension to chrome so i believe i currently have 2 options.
Either i somehow figure out to run the dev server on 0.0.0.0 and make wxt connect it through localhost which does works btw I checked it but then i cannot find any configuration to change the client hostname as I believe its reads from the same config and there is no option.
I will have to open a windows terminal inside my monorepo in wsl2 and run the dev server outside wsl so that we can develop smoothly.
I apologize if this problem of mine is going way out of context for this issue, I can create a new issue if thats whats required. Any help whatsoever is hugely appreciated
I released a workaround for this in v0.19.28. It doesn't solve the security issue, but it does allow you to upgrade to newer versions of Vite. Since as I haven't been able to work on and merge #1411 in a few weeks, I wanted to get something out to unblock people.
I found this problem while suspecting why does dev comand open a browser but the dev extension not installed automatically on startup, I found this error in console.
Activity
appsplash99 commentedon Jan 21, 2025
content.tsscript does not load as well in the dev server.ericlin11354 commentedon Jan 21, 2025
Bump, I have this issue as well
aklinker1 commentedon Jan 21, 2025
Duplicate of #1360, they're caused by the same thing. For now, downgrade vite to a version without the bug:
Or to use the latest version of Vite, set
legacy.skipWebSocketTokenCheckto true in your vite config:https://github.com/vitejs/vite/blob/9654348258eaa0883171533a2b74b4e2825f5fb6/packages/vite/src/node/config.ts#L535C3-L535C26
alizainaslam commentedon Jan 21, 2025
YES: Vite 6.0.8 is working fine i test it.
aklinker1 commentedon Jan 21, 2025
Fix is in progress, see #1361. Will try and get it out later today.
appsplash99 commentedon Jan 22, 2025
Thank You 🙏 ❤
aaronklinker-st commentedon Jan 29, 2025
This also happens in 5.4.14, we should reduce the allowed versions of v5 as well
v3locity47 commentedon Feb 4, 2025
I'm running wxt inside wsl2 and i cannot connect to websocket i.e vite-hmr.
Is this related to this? I'm able to to connect to the socket from inside wsl2 terminal. Or is it because of wsl2 network configurations, i can't connect even if I use wsl2's ip.
aaronklinker-st commentedon Feb 4, 2025
@v3locity47 What version of Vite are you using?
v3locity47 commentedon Feb 4, 2025
Apologies. I'm using [email protected].
I figured out my issue, once i changed my hostname to 0.0.0.0 i could connect from native cmd to wxt running on wsl2 but another problem arised. Due to manifest v3's csp(content security policy doesn't allow 0.0.0.0) requirements the generated manifest would not allow me to load my extension to chrome so i believe i currently have 2 options.
Either i somehow figure out to run the dev server on 0.0.0.0 and make wxt connect it through localhost which does works btw I checked it but then i cannot find any configuration to change the client hostname as I believe its reads from the same config and there is no option.
I will have to open a windows terminal inside my monorepo in wsl2 and run the dev server outside wsl so that we can develop smoothly.
I apologize if this problem of mine is going way out of context for this issue, I can create a new issue if thats whats required. Any help whatsoever is hugely appreciated
aaronklinker-st commentedon Feb 4, 2025
Yes, unrelated to this. Please open a new issue. @v3locity47
aklinker1 commentedon Mar 4, 2025
I released a workaround for this in
v0.19.28. It doesn't solve the security issue, but it does allow you to upgrade to newer versions of Vite. Since as I haven't been able to work on and merge #1411 in a few weeks, I wanted to get something out to unblock people.ImBIOS commentedon Aug 7, 2025
I have this issue :'v
I found this problem while suspecting why does dev comand open a browser but the dev extension not installed automatically on startup, I found this error in console.