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.

If sockHost is not specified, overlay will try to connect to 3rd party server hosting other scripts on the page

See original GitHub issue

Using the latest version of the plugin (0.5.4)

I’m initializing like:

new ReactRefreshWebpackPlugin({
          overlay: {
            sockPort: 1887
          }
});

The url of the page: http://localhost:3000/

Webpack dev server is on localhost:1887.

The console will show an error opening a web socket to a third party server (e.g., wss://googleads.g.doubleclick.net:1887/ws, but the host of other third party scripts used on the page is seen frequently as well) instead of localhost. According to the docs, the default should be window.location.hostname. This error seems to be related to usage of this plugin (changing settings as described below resolves the issue).

While not happening every time I load a page, the error happens very frequently. Manually setting sockHost to ‘localhost’ makes it so the connection always goes to localhost, however it uses wss instead of ws (which I think is related to the third party scripts being loaded with https instead of http like the main page). So I also need to hardcode sockProtocol to ‘ws’. Once I do this it works 100% (but I shouldn’t need to according to the docs, and I don’t want to hardcode these values).

The web socket established by webpack-dev-server (4.7.2) always establishes correctly – only the socket established by this plugin has intermittent issues.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pmmmwhcommented, Jan 6, 2022

It should probably have the same behaviour as WDS, I’ll take a look at why this was breaking.

0reactions
pmmmwhcommented, Apr 25, 2022

This will be fixed in #630 and should be released soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Connect To Your Minecraft Server With 3rd Party FTP ...
Learn how to connect to your Minecraft server using FTP Software. Apex Minecraft Hosting : https://apexminecrafthosting.com/24/7 Uptime, ...
Read more >
5 Ways How To Host A Minecraft Server - YouTube
Showing You 5 Different Ways You Can Host A Free Minecraft Server and Low Cost Minecraft Servers for Java Edition! Step by step...
Read more >
Server Options - Vite
Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not...
Read more >
Hosting your own dedicated Valheim server in the cloud - AWS
The solution provided here has defaults that launch a Valheim server from a BASH script and have the server firewall (EC2 Security Groups) ......
Read more >
Server Setup - Sawtooth Software
As part of the first upload of a survey web application package, the Perl scripts contained in it will connect to the database...
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