Closed martincostello closed 2 years ago
The playwright client version needs to be the same as the playwright server version. In this case the Browserstack version is too old, thats why tracing.StopAsync is not working anymore. If I remember correctly you can pass a version parameter on their side so they give you a corresponding server which matches your client version.
(Since the protocol is an implementation detail we don't consider it as part of the SemVer versioning.)
Yeah we pass that through, but they don't seem to have 1.18.0.
OK thanks, I'll contact BrowserStack support and ask them when 1.18.0 will be available.
Context:
Code Snippet
Clone the
Remote-Traces
branch of the https://github.com/martincostello/dotnet-playwright-tests repository, and configure valid credentials for BrowserStack Automate (see here).Describe the bug
With the release of v1.18.0 I've been doing some investigation into using Playwright with BrowserStack, and incorporated it into some sample code here.
Today I extended the sample further to capture traces, but found that when BrowserStack Automate is being used, calls to
Tracing.StopAsync()
fail with the below exception (https://github.com/martincostello/dotnet-playwright-tests/pull/40#issuecomment-1022215119):Build logs showing the error are available from https://github.com/martincostello/dotnet-playwright-tests/pull/41.
Cloning this repository locally and using it from source and doing debugging lead me to a mismatch between what the BrowserStack remote server expects vs. what Playwright sends to it for the
tracingStopChunk
command. With tracing enabled, the error from the BrowserStack server is the below:I'm unsure of whether this is a bug, an incompatibility between the v1.17.2 and v1.18.0 protocol versions, or some customisation made on BrowserStack's end that breaks it, but I thought I'd ask here first in case you have some insight into where/when this different parameters are/were used.
If I add a
save
andskipCompress
boolean arguments to the command as shown in this commit, then it works as expected.