We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Rod Version: v0.116.2
func TestRod(t *testing.T) { browser := rod.New().MustConnect() defer browser.MustClose() tests := []struct { name string input *rod.Page }{ { name: "1", input: browser.MustPage("https://www.example.com"), }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { tc.input.WaitLoad() tc.input.Screenshot(true, &proto.PageCaptureScreenshot{ Format: "png", Quality: new(int), FromSurface: false, CaptureBeyondViewport: false, OptimizeForSpeed: false, }) }) } }
func TestRod(t *testing.T) { browser := rod.New().MustConnect() defer browser.MustClose() tests := []struct { name string input *rod.Page }{ { name: "1", input: browser.MustPage("https://www.example.com"), }, { name: "2", input: browser.MustPage("https://www.example.com"), }, { name: "3", input: browser.MustPage(), }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { tc.input.WaitLoad() tc.input.Screenshot(true, &proto.PageCaptureScreenshot{ Format: "png", Quality: new(int), FromSurface: false, CaptureBeyondViewport: false, OptimizeForSpeed: false, }) }) } }
ok github.com/go-rod/rod
Didn't look the problem yet. I'm opening the issue to inform you about the problem. Tested in 0.112.x, 0.115.x, 0.116.0 - all works as expected.
The text was updated successfully, but these errors were encountered:
Same issue here, have anyone figured out a work around ?
Also, the instrumented chrome goes to 100% CPU usage, not sure why.
Sorry, something went wrong.
Ok, I just had to relearn how to debug go-rod and chrome.
go-rod
chrome
It seems google-chrome and the more recent chromium version fails if trying to use the GPU.
google-chrome
I fixed by adding the disable-gpu and disable-software-rasterizer flags in my instrumented code:
disable-gpu
disable-software-rasterizer
... var controlURL string chromePath, err := exec.LookPath("google-chrome") var l *launcher.Launcher if err == nil { klog.V(1).Infof("Using system's Google Chrome") l = launcher.New().Bin(chromePath) } else { klog.Warningf("Using rod downloaded chromium, with --no-sandbox") l = launcher.New().NoSandbox(true) } controlURL = l. Set("disable-gpu", "true"). Set("disable-software-rasterizer", "true"). Logger(os.Stderr). MustLaunch() ...
No branches or pull requests
Rod Version: v0.116.2
The code to demonstrate your question
Works as expected
Fails
What you got
Second case
What you expect to see
What have you tried to solve the question
Didn't look the problem yet. I'm opening the issue to inform you about the problem.
Tested in 0.112.x, 0.115.x, 0.116.0 - all works as expected.
The text was updated successfully, but these errors were encountered: