Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Enable firefox CI job #63

Closed
vasco-santos opened this issue Apr 15, 2019 · 2 comments
Closed

Enable firefox CI job #63

vasco-santos opened this issue Apr 15, 2019 · 2 comments
Assignees
Labels
P1 High: Likely tackled by core team if no one steps up

Comments

@vasco-santos
Copy link
Member

The firefox CI job was disabled, as a consequence of some inconsistencies between chrome and firefox tests for circuit ipfs/interop#62 https://travis-ci.com/ipfs/interop/builds/108339116.

After a small debugging session, the conclusions so far are the following:

Taking this test as an example of a failure: https://github.com/ipfs/interop/blob/master/test/circuit/browser.js#L103-L117 nodeB addresses are different in chrome and firefox

firefox:

['/p2p-circuit/ipfs/Qme9NFGddMSBQeQWkMEMJtnko9hA4pWhwPH9cJyteCkbyS', '/p2p-circuit/p2p-websocket-star/ipfs/Qme9NFGddMSBQeQWkMEMJtnko9hA4pWhwPH9cJyteCkbyS', '/p2p-websocket-star/ipfs/Qme9NFGddMSBQeQWkMEMJtnko9hA4pWhwPH9cJyteCkbyS']

chrome:

['/ip4/127.0.0.1/tcp/24642/ws/p2p-websocket-star/ipfs/Qmbmj7h1QzP7EW5xvssMZogM1RB4zs8JRf5d1XJmkJ71Er', '/p2p-circuit/ipfs/Qmbmj7h1QzP7EW5xvssMZogM1RB4zs8JRf5d1XJmkJ71Er', '/p2p-circuit/p2p-websocket-star/ipfs/Qmbmj7h1QzP7EW5xvssMZogM1RB4zs8JRf5d1XJmkJ71Er']

This way, when we do: getWsStarAddr(nodeB.addrs)m we will have /p2p-circuit/p2p-websocket-star/ipfs/Qme9NFGddMSBQeQWkMEMJtnko9hA4pWhwPH9cJyteCkbyS for firefox and /ip4/127.0.0.1/tcp/24642/ws/p2p-websocket-star/ipfs/Qmbmj7h1QzP7EW5xvssMZogM1RB4zs8JRf5d1XJmkJ71Er for chrome

After debugging in the switch, I got a weird behaviour. In firefox, the second dial arrives to the switch, but only with Circuit, no websocket-star, which then fails. In chrome, the second dial does nothing. Basically, even before starting the tests, there is an attempt of nodeB connecting nodeA, and they get connected before the connect in the test. I disabled discovery and bootstrap is empty, so is really odd

@vasco-santos vasco-santos self-assigned this Apr 15, 2019
@vasco-santos vasco-santos added the P1 High: Likely tackled by core team if no one steps up label Apr 15, 2019
@jacobheun
Copy link
Contributor

jacobheun commented Apr 15, 2019

libp2p/js-peer-info#78 is the core reason this is failing. The circuit address and p2p-websocket-star address are treated as the same. The TCP address is removed from the p2p-websocket-star address at https://github.com/ipfs/js-ipfs/blob/v0.35.0/src/core/runtime/libp2p-browser.js#L21 for its listening purposes. Since neither address have ports, they're considered non distinct and p2p-circuit ends up winning.

libp2p/js-libp2p-switch#333 is the reason this passes on Chrome and not Firefox. The PR fixes the discrepancy in browser sorting.

cc: @alanshaw

@jacobheun
Copy link
Contributor

Fixed in the latest switch build, master is passing now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 High: Likely tackled by core team if no one steps up
Projects
None yet
Development

No branches or pull requests

2 participants