question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatible SockJS! Main site uses: "1.4.0", the iframe: "1.3.0".

See original GitHub issue

Hi there,

I just upgraded to react-scripts v3.2.0 and am now see the below error in the console in my dev server: image

Seems the issue is coming from the sockjs-client package. Tracking it down in my package-lock, react-scripts requires webpack-dev-server which in turn requires sockjs-client v1.3.0. react-scripts also requires react-dev-utils, which requires sockjs-client v1.4.0. I think that’s where the mismatch is coming from.

Do you have any advice moving forward?

Thank you.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9

github_iconTop GitHub Comments

14reactions
EmEmGeecommented, Oct 7, 2019

what’s your webserver?

I had this today as well and solved it by adding these 3 lines to my nginx.conf file:

  location / {
    proxy_pass http://client:3000;
    proxy_redirect    default;
    proxy_set_header  Host $host;
    proxy_set_header  X-Real-IP $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header  X-Forwarded-Host $server_name;

    # WebSocket support added
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }
5reactions
cuellarjcommented, Oct 9, 2019

Update: Had a miscommunication with my back-end dev and those three lines were added outside the location object. The below settings fixed the issue (apologies for poor formatting). Thanks @EmEmGee for your original suggestion!

location / { proxy_pass our_server; proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incompatibile SockJS! Main site uses: "1.1.4", the iframe: "1.0.0".
I have problem with WebSocket using SpringBoot and Angular2: Incompatibile SockJS! Main site uses: "1.1.4 ...
Read more >
[Solved] Incompatibile SockJS! Main site uses: “1.5.0”, the iframe
nginx! So I checked my package-lock. json and modified the sockjs-client version to 1.5. 1, and reinstalled the dependency on npm i and...
Read more >
Incompatible SockJS! Main site uses: "1.3.0", the iframe: "1.4.0".
Hello everyone, currently the following issue occurs in the client when the socket is forwarded by an nginx proxy: Incompatible SockJS! Main ......
Read more >
Incompatibile Sockjs! Main Site Uses: "1.4.0" The Iframe: "1.0.0"
I fixed it by manually hardcoding the SockJS version on the serverside Spring/Java by @Override public void registerStompEndpoints. Error: Incompatible SockJS!
Read more >
Dependencies | webpack-dev-server - Open Source Insights
arrow_right ansi‑html. 0.0.7 Notes 1 advisory Relation Licenses Version 0.0.7 Published January 2, 2017 Description Advisories in this pack... arrow_right bonjour. 3.5.0 Notes Relation Licenses Version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found