Js-ipfs: Bootstrap broken in 0.34.0?

Created on 17 Jan 2019  路  3Comments  路  Source: ipfs/js-ipfs

  • Version:
    0.34.0

  • Platform:
    Darwin [REMOVED] 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

  • Subsystem:
    libp2p (assumed)

Type:

Bug

Severity:

High

Description:

Upon upgrade to version 0.34.0, I noticed that none of the bootstrap nodes were connecting any longer when using js-ipfs as a client in browser. There is a new error in console that did not exist in 0.33.1 that seems to be related (see below). This error is thrown once for each of the nodes in the bootstrap list.

Did some initial digging and it seems that 0.34.0 comes with a new supporting package called iso-url. This seems to be the source of the problem or at least related. Looks like libp2p-bootstrap had some change between v0.9.3 and v0.9.7 that may have required the new package but I did a comparison (link below) between the two tags and did not see much.

https://github.com/libp2p/js-libp2p-bootstrap/compare/v0.9.3..v0.9.7

Unfortunately, 0.34.0 is DOA for me due to this issue as the browser instance will not connect to any bootstrap nodes.

Steps to reproduce the error:

Upgrade browser app to js-ipfs version 0.34.0

Detailed stack trace:

url-browser.js:28 Uncaught TypeError: Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
    at new URLWithLegacySupport (url-browser.js:28)
    at push../node_modules/iso-url/src/relative.js.module.exports (relative.js:26)
    at push../node_modules/pull-ws/ws-url.js.module.exports (ws-url.js:11)
    at push../node_modules/pull-ws/client.js.module.exports (client.js:18)
    at _class.dial (index.js:42)
    at queue.js:116
    at timeout.js:91
    at initialParams.js:13
    at DialQueue._dialWithTimeout (queue.js:123)
    at DialQueue._doWork (queue.js:64)
    at queue.js:43
    at queue.js:11
    at Object.process (queue.js:192)
    at queue.js:90
    at setImmediate.js:33
    at run (setImmediate.js:48)
    at runIfPresent (setImmediate.js:83)
    at onGlobalMessage (setImmediate.js:125)
P1 dieasy kinbug

Most helpful comment

@hugomrdias do you have a sec to look into this please?

All 3 comments

@hugomrdias do you have a sec to look into this please?

@lifeBCE this should be fixed with https://github.com/hugomrdias/iso-url/releases/tag/v0.4.5 can you update yours deps and confirm ?

@hugomrdias Looks good, thanks! 馃憤

Was this page helpful?
0 / 5 - 0 ratings