Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

chore: update buffer deps #3607

Merged
merged 24 commits into from
Apr 27, 2021
Merged

chore: update buffer deps #3607

merged 24 commits into from
Apr 27, 2021

Conversation

achingbrain
Copy link
Member

Updates deps to pull in Buffer@6.x.x

Refs #3604

Updates deps to pull in Buffer@6.x.x

Refs #3604
@rvagg rvagg mentioned this pull request Apr 10, 2021
77 tasks
achingbrain and others added 17 commits April 21, 2021 16:37
…rrect address (#3633)

Error in CI: https://travis-ci.com/github/ipfs/js-ipfs/jobs/500525900

In the past webrtc did not proper support multiple listeners. This basically mean that if trying to listen on multiple addresses the webrtc sdp offers could end up with wrong signal server address throwing random errors in CI.

libp2p/js-libp2p-webrtc-star#330 fixed this and now a libp2p node allows multiple listeners. When a peer with multiple webrtc-star listeners attempts to dial another peer via a star signalling server, the signal server of the target peers is identified among the listeners and used for starting the dial.

In the test changed in this PR (note that ports might change):

```
nodeA: ['/ip4/127.0.0.1/tcp/53466/ws/p2p-webrtcstar/p2p/QmPqSo3Kqf9XtWG6g3WKVrx2PZ2q3BoFZssVjixaweABNW']
nodeB: [
          '/ip4/127.0.0.1/tcp/53466/ws/p2p-webrtc-star/p2p/QmNLojvkVdRTD2bmy7Yzpc7vUBv6bUDEpamrgQeRwPQAg1',
          '/ip4/127.0.0.1/tcp/53467/ws/p2p-webrtc-star/p2p/QmNLojvkVdRTD2bmy7Yzpc7vUBv6bUDEpamrgQeRwPQAg1'
]
```

and the test did:

```
await nodeA.swarm.connect(nodeB.peerId.addresses[isBrowser ? 1 : 0])
```

We were using nodeA to dial nodeB with an address of a signalServer it does not use, which obviously failed. The solution here is to either have nodeB dial nodeA address (has same signalServer), or we need to do in the test a match function to understand what address of nodeB we should use (with the same signalServer).

The error in CI is poor and webrtc-star should validate we actually have the listener for the signalServer and throw a proper error if not instead of the Cannot read property 'listener' of undefined. This will be fixed shortly in a new PR
@achingbrain achingbrain merged commit c79d3d6 into master Apr 27, 2021
@achingbrain achingbrain deleted the chore/update-buffer-deps branch April 27, 2021 07:46
@dancingfrog
Copy link

dancingfrog commented Oct 12, 2021

There is a typo on line 75 of packages/ipfs-http-gateway/src/index.js

const gatewayAddrs = addresses?.Gateway || []

... which leads to...

    const gatewayAddrs = addresses?.Gateway || [];
                                   ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:931:16)
    at Module._compile (internal/modules/cjs/loader.js:979:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:903:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at main (/home/revlin/Data/data/edu/ipfs/try.js:14:19)

SgtPooki referenced this pull request in ipfs/js-kubo-rpc-client Aug 18, 2022
Updates deps to pull in Buffer@6.x.x

Refs #3604
Fixes #3389

Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants