libp2p / js-libp2p

The JavaScript Implementation of libp2p networking stack.
https://libp2p.io
Other
2.29k stars 438 forks source link

Flaky Firefox WebRTC test #2642

Open achingbrain opened 1 month ago

achingbrain commented 1 month ago

Sometimes the receiving end of the can send a large file WebRTC test doesn't receive all of the bytes when running in Firefox, Chrome is fine:

  1) basics
       can send a large file:

      expected Uint8Array[ 0, 0, 0, 0, 0, 0, 0, …(5242845) ] to equal Uint8Array[ 0, 0, 0, 0, 0, 0, 0, …(5242881) ]
      + expected - actual

This fails in CI quite often and can be reproduced locally too.

It seems to happen when there are several datachannels open on the connection simultaneously so may be related to https://bugzilla.mozilla.org/show_bug.cgi?id=1902850 - the fix for this should ship in Firefox 129 on August 6th, though we need to wait for that version of FF to be included in playwright to verify the fix.

achingbrain commented 1 month ago

It seems to happen when there are several datachannels open on the connection simultaneously

I don't think this is the case, it still happens if I add a delay in the test to ensure there are no other streams open.

Investigation continues.

SgtPooki commented 1 month ago

looks like playwright has the latest Firefox set, but hasn't released an updated version to NPM yet: https://github.com/microsoft/playwright/commit/5cc1e7b29951ff3f75264d87ab21cacc7908cca2