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

Error during WebSocket handshake: Unexpected response code: 200 #2668

Closed
1 task done
glekner opened this issue Jul 2, 2020 · 1 comment
Closed
1 task done

Error during WebSocket handshake: Unexpected response code: 200 #2668

glekner opened this issue Jul 2, 2020 · 1 comment

Comments

@glekner
Copy link

glekner commented Jul 2, 2020

  • Operating System: WSL Fedora 31
  • Node Version: 12.16.1
  • NPM Version: 6.13.4
  • webpack Version: 4.43.0
  • webpack-dev-server Version: 3.11.0
  • Browser: Chromium Edge 83
  • This is a bug

After changing transportMode to ws im getting the following error in the console:

WebSocket connection to 'ws://localhost:9000/sockjs-node' failed: Error during WebSocket handshake: Unexpected response code: 200

My app is using a bridge, webpack-dev-server is on port 8080 and is only meant for compiling and hot-reloading.
I'm accessing the app from port 9000, where we have a bridge that uses the compiled assets with the help of writeToDisk.
Why am I getting this console error? isn't changing to transportMode to ws disable the usage of sockjs-node?
the app and websockets runs fine even though i'm getting it.

Code

  devServer: {
    writeToDisk: true,
    progress: true,
    hot: true,
    inline: true,
    contentBase: false,
    transportMode: 'ws',
  },

Expected Behavior

No error should show.

Actual Behavior

WebSocket connection to 'ws://localhost:9000/sockjs-node' failed: Error during WebSocket handshake: Unexpected response code: 200

For Bugs; How can we reproduce the behavior?

PR That causes this issue: openshift/console#5840

@alexander-akait
Copy link
Member

alexander-akait commented Jul 3, 2020

Please create reproducible test repo, link on the issue is not reproducible test repo, I will reopen issue when you fill out For Bugs; How can we reproduce the behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants