Open larabr opened 1 month ago
Latest commit: c4e2bd094a5a1df86e2ec699ad92ea90981512a8
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Tricky one, I would love to have a stable solution for BrowserStack, many times my tests just randomly failed with timeouts in Firefox and Safari on BrowserStack.
However do you think it's a generic issue with WS or is it due to BrowserStack? If the latter, it would be better to implement this in the BrowserStack adapter
In this case I think it might be due to the Browserstack testing setup, because I couldn't repro with Playwright in local, but I'm not sure if it's a problem unique to the platform: based on other issues I've found around (incl. the one I linked), other network setups might be affected as well.
Edit: the Browserstack support team shared that they use mitmproxy to enable network logs on their side, so the inactivity timeout might come from there.
What I did
1006
) when testing on BrowserStack (Safari).I couldn't get to the bottom of what exactly is causing the timeout, but sending periodic ping messages fixes it. I checked if the
ws
server is closing the connection, but it doesn't seem to be the case; using a ping to keep the connection alive is suggested here.