Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nwjs in mode Mixed Context kill websocket functionnality #8226

Open
davidnurdin opened this issue Oct 15, 2024 · 1 comment
Open

Nwjs in mode Mixed Context kill websocket functionnality #8226

davidnurdin opened this issue Oct 15, 2024 · 1 comment
Labels
bug has-min-repro Has a minimum reproduction

Comments

@davidnurdin
Copy link

Hi,
If i active --mixed-context , => We can't connect to anything with WS.

var conn = new WebSocket('ws://localhost:9400');
conn.onmessage = function(e) { debugger; console.log(e.data); };
conn.onopen = function(e) { conn.send('Hello Me!'); };

If it is disable => it working

Thanks

@ayushmanchhabra ayushmanchhabra added bug has-min-repro Has a minimum reproduction labels Oct 16, 2024
@JuerGenie
Copy link

+1.

It seems caused by undici's WebSocket replacing the window.WebSocket...
It also kill Vite's HMR functionality.

Screenshot_1732357724107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug has-min-repro Has a minimum reproduction
Projects
None yet
Development

No branches or pull requests

3 participants