ipfs / js-ipfs

IPFS implementation in JavaScript
https://js.ipfs.tech
Other
7.44k stars 1.25k forks source link

[help required] A lot of websocket connection errors #4141

Closed ohager closed 2 years ago

ohager commented 2 years ago

Severity:

Medium - A non-essential functionality does not work, performance issues, etc.

Description:

I use ipfs-core package via jsdelivr and since a few days I see a looooot of WS connection issues on local and production system. I tried several versions, but still same result. It seems that ipfs is working, but slowing down performance significantly.

image

Probably, this is a configuration issue... but not sure what shall I do. This came out of a sudden...

Steps to reproduce the error:

I just load the dist package and start the node programmatically using almost the default config:

        const node = await window.IpfsCore.create({
          repo: "my-repo",
        });
achingbrain commented 2 years ago

This is a misconfiguration, we shouldn't be passing WebSocketsFilters.all as the filter on this line, instead passing no args which will use the default filter - e.g. only try to connect to wss: addresses in browsers.

This will get fixed in the next release.