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

sockjs-client updated -> Incompatibile SockJS! Main site uses: "1.6.0", the iframe: "1.5.0" #4331

Closed
jhakkinen opened this issue Mar 12, 2022 · 3 comments

Comments

@jhakkinen
Copy link

Bug report

In v3, there seems to be a sockjs-client version mismatch between the version that gets bundled into into the /client directory and the version that gets installed as a dependency.

A fresh install of webpack-dev-server v3.11.3 bundles version 1.5.0 of sockjs-client into the /client directory to be used when falling back to iframe transports. However, the latest version of sockjs-client matching webpack-dev-server's dependency version constraint is currently 1.6.0 so it get installed into the main application.

This version mismatch results in the following message when iframe transports are used: Incompatibile SockJS! Main site uses: "1.6.0", the iframe: "1.5.0"

Extract from my yarn.lock:

webpack-dev-server@3.11.3:
  dependencies:
    sockjs-client "^1.5.0"

sockjs-client@^1.5.0:
  version "1.6.0"

Actual Behavior

The following message is shown when iframe transports are used: Incompatibile SockJS! Main site uses: "1.6.0", the iframe: "1.5.0"

Expected Behavior

The version bundled into /client should match the dependency version constraint, thus avoiding the version mismatch.

How Do We Reproduce?

I ran into this when running E2E tests with Testcafe using headless Chrome. Unfortunately, I can't share the project and can't think of another easy way to reproduce this.

Please paste the results of npx webpack-cli info here, and mention other relevant information

  System:
    OS: macOS 12.2.1
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
    Memory: 223.98 MB / 16.00 GB
  Binaries:
    Node: 12.22.3 - ~/.nvm/versions/node/v12.22.3/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v12.22.3/bin/yarn
    npm: 6.14.13 - ~/.nvm/versions/node/v12.22.3/bin/npm
  Browsers:
    Chrome: 99.0.4844.51
    Firefox: 97.0.1
    Safari: 15.3
  Packages:
    eslint-loader: ^2.1.1 => 2.2.1

See also #474 (comment)

@alexander-akait
Copy link
Member

webpack-dev-server has a lot of other bugs, please migrate to v4, v4 supports webpack v4

@7anshuai
Copy link

sockjs-client 1.6.0 introduce a breaking change (required Node.js 12), for backward compatible webpack-dev-server v3 should set tilde ranges ~1.5.0 for sockjs-client

@alexander-akait
Copy link
Member

Please migrate on v4, v3 is depreacted, also v4 supports webpack v4 and webpack v5

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

3 participants