Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

python - Passthrough is not supported, GL is disabled

I tried crawling a specific site using selenium and webdriver_manager.chrome, and my code crawled elements of that site totally. But after crawling, the following error message appears in the console window.

ERROR:gpu_init.cc(426) Passthrough is not supported, GL is disabled

When I first found it, I unchecked Hardware hardware accleration of chrome also it didn't solve the problem.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Tested environment

Windows OS, Chromedriver vesion 89, headless mode

Solution

I am not certain that this can be a solution for your question, since the error message is slightly different.

As I remember correctly, the error message Passthrough is not supported, GL is swiftshader has been shown after the Chromedriver version 89 as a bug (but not certain) [1].

In case of Windows, --headless and --disable-gpu options are required to make the chromedriver work as a headless mode [2]. It seems like --disable-gpu is also required for Linux because of the bug [3].

  1. The error message does not appear if both --headless and --disable-gpu options are removed. However, the chromedriver does not work as a headless mode anymore.

  2. In my case, the error message does not affect the operation of a headless chrome. As I found, "Normally, Chrome would just fall back to work without GPU. However, for consistent results, Telemetry requires the presence of GPU [4]."

  3. I've additionally applied --disable-software-rasterizer option to disable WebGL [5]. The error message does not show anymore under the headless operation.

References

[1] https://reddit.com/r/chrome/comments/n6qywt/hardware_acceleration_fail_in_chrome_on_linux/
[2] https://developers.google.com/web/updates/2017/04/headless-chrome
[3] https://bugs.chromium.org/p/chromium/issues/detail?id=737678
[4] https://groups.google.com/a/chromium.org/g/telemetry/c/bEgV1EH63eA
[5] https://bugs.chromium.org/p/chromium/issues/detail?id=617551


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...