Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unable to view the right context on Traces and Videos #30837

Open
gianhub16 opened this issue May 15, 2024 · 1 comment
Open

[Bug]: Unable to view the right context on Traces and Videos #30837

gianhub16 opened this issue May 15, 2024 · 1 comment

Comments

@gianhub16
Copy link

gianhub16 commented May 15, 2024

Version

1.44.0

Steps to reproduce

Run via cmd line "SimpleTest" on https://github.com/gianhub16/simpletest repository
npx playwright test -g "SampleTest" --workers=3
Compare the traces and videos across browsers

Expected behavior

Trace and Video should be recorded on the right context.

Actual behavior

When I run the test, when the test changes the context, the right context has not been recorded. Specifically, in the trace the screens remain the same as in the old context and the video continues for the duration of the test but gets stuck on the context I closed!
It happens only on FIREFOX (Nightly 125.0.1 (64-bit))

Additional context

It happens only on FIREFOX (Nightly 125.0.1 (64-bit))

Environment

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz      
    Memory: 3.22 GB / 15.75 GB
  Binaries:
    Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.1 - C:\Program Files\nodejs\npm.CMD
  IDEs:
    VSCode: 1.89.1 - C:\Users\user\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
  npmPackages:
    @playwright/test: ^1.44.0 => 1.44.0
@dgozman
Copy link
Contributor

dgozman commented May 29, 2024

Investigation notes:

  • nsScreencastService operates on nsIWidget that corresponds to a window. Therefore, two tabs from the same window only capture the currently visible tab. There is no easy fix for this one, needs investigation.
  • nsScreencastService::Session::Stop() calls StopCapture() which stops capturing for the whole window. With two tabs in a window, this stops capture in both pages when one of them closes, which is undesirable.
  • The proposed fix for the previous issue is to introduce webrtc::VideoCaptureModuleEx::StartCaptureCounted() and webrtc::VideoCaptureModuleEx::StopCaptureCounted() that will increment/decrement a counter and call StartCapture()/StopCapture() respectively.

@dgozman dgozman added v1.46 and removed v1.45 labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants