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

browsertime visual metrics don't work with wayland #1756

Open
julienw opened this issue Apr 5, 2022 · 7 comments
Open

browsertime visual metrics don't work with wayland #1756

julienw opened this issue Apr 5, 2022 · 7 comments

Comments

@julienw
Copy link
Contributor

julienw commented Apr 5, 2022

Feature/improvement

I'm using wayland on my Linux, and it looks like that browsertime uses x11grab (which is x11-based) to capture the video of the app. Probably we need another way to do that with wayland.

I know Gnome has some built-in capability to do that, but I don't know if we can tap into this, or even if that would be a good idea to be tightly coupled with Gnome.

@julienw
Copy link
Contributor Author

julienw commented Apr 5, 2022

Or maybe that's another issue?

Here is my full output:

[2022-04-05 18:24:35] INFO: Running tests using Chrome - 3 iteration(s)
[2022-04-05 18:24:35] INFO: Testing url https://profiler.firefox.com iteration 1
[2022-04-05 18:24:35] ERROR: Error: Command failed with exit code 1: ffmpeg -hide_banner -video_size 1366x768 -f x11grab -framerate 30 -probesize 10M -y -draw_mouse 0 -i :99.0+0,0 -codec:v libx264rgb -threads 0 -crf 0 -preset ultrafast -vf pad=ceil(iw/2)*2:ceil(ih/2)*2 /home/julien/travail/git/browsertime/browsertime-results/profiler.firefox.com/2022-04-05T182435+0200/x11-tmp.mp4
[x11grab @ 0x56153eb024c0] Cannot open display :99.0+0,0, error 1.
:99.0+0,0: Input/output error
[x11grab @ 0x56153eb024c0] Cannot open display :99.0+0,0, error 1.
:99.0+0,0: Input/output error
    at makeError (/home/julien/travail/git/browsertime/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/home/julien/travail/git/browsertime/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Measure._startVideo (/home/julien/travail/git/browsertime/lib/core/engine/command/measure.js:86:7)
    at async Measure.start (/home/julien/travail/git/browsertime/lib/core/engine/command/measure.js:199:7)
    at async /home/julien/travail/git/browsertime/lib/core/engine/run.js:9:9
    at async Iteration.run (/home/julien/travail/git/browsertime/lib/core/engine/iteration.js:221:9)
    at async Engine.runByScript (/home/julien/travail/git/browsertime/lib/core/engine/index.js:266:20)
    at async run (/home/julien/travail/git/browsertime/bin/browsertime.js:71:22)
[2022-04-05 18:24:35] ERROR: Error: Command failed with exit code 1: ffmpeg -hide_banner -video_size 1366x768 -f x11grab -framerate 30 -probesize 10M -y -draw_mouse 0 -i :99.0+0,0 -codec:v libx264rgb -threads 0 -crf 0 -preset ultrafast -vf pad=ceil(iw/2)*2:ceil(ih/2)*2 /home/julien/travail/git/browsertime/browsertime-results/profiler.firefox.com/2022-04-05T182435+0200/x11-tmp.mp4
[x11grab @ 0x56153eb024c0] Cannot open display :99.0+0,0, error 1.
:99.0+0,0: Input/output error
[x11grab @ 0x56153eb024c0] Cannot open display :99.0+0,0, error 1.
:99.0+0,0: Input/output error
    at makeError (/home/julien/travail/git/browsertime/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/home/julien/travail/git/browsertime/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Measure._startVideo (/home/julien/travail/git/browsertime/lib/core/engine/command/measure.js:86:7)
    at async Measure.start (/home/julien/travail/git/browsertime/lib/core/engine/command/measure.js:199:7)
    at async /home/julien/travail/git/browsertime/lib/core/engine/run.js:9:9
    at async Iteration.run (/home/julien/travail/git/browsertime/lib/core/engine/iteration.js:221:9)
    at async Engine.runByScript (/home/julien/travail/git/browsertime/lib/core/engine/index.js:266:20)
    at async run (/home/julien/travail/git/browsertime/bin/browsertime.js:71:22)
[2022-04-05 18:24:35] ERROR: No data to collect

With the command:

bin/browsertime.js  https://profiler.firefox.com --visualMetrics

@bdekoz
Copy link

bdekoz commented Jun 9, 2022

I am assuming the DISPLAY environment variable is :0 for you?

@gmierz
Copy link
Collaborator

gmierz commented Jan 10, 2023

@soulgalore have you ever tried browsertime with wayland before?

@soulgalore
Copy link
Member

@gmierz no.

@bdekoz
Copy link

bdekoz commented Oct 9, 2023

wayland users can use wr-recorder instead.

@soulgalore
Copy link
Member

I think for this to happen we need to be able to setup a GitHub action that can run the tests. If someone could help me set that up then we can have a go with wr-recorder so we can continue to verify that it works.

@julienw
Copy link
Contributor Author

julienw commented Dec 18, 2023

I believe we also need to implement the equivalent of xvfb.js?
Some leads in https://unix.stackexchange.com/questions/653672/virtual-wayland-display-server-possible, it looks like wayland's default compositor weston can easily work headless.

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