Websocket errors in browser (js-ipfs) go away when a repo option is specified in create? no errors in node.js though?

The following works:

const ipfs = await IPFS.create({repo: String(Math.random() + Date.now()) })

And the following fails:

const ipfs = await IPFS.create()

in the Browser.

However the code that fails in the browser works in node.js with no problems.

It seems the ‘repo’ option is used for a lockfile or something? Or is this a complete red herring?

I am just trying to use this stuff so have absolutely no idea about anything, just thought this behaviour was weird and I know I am not understanding something.

Please look into my answer in WebSocket connection to 'ws: //127.0.0.1: 43361 Error in connection establishment as it is a complete description that includes an answer for this.

1 Like