gpt4 book ai didi

google-chrome - 在 headless 模式下运行 Chrome

转载 作者:行者123 更新时间:2023-12-03 05:44:44 33 4
gpt4 key购买 nike

为了在 headless 模式下运行chrome,我做了

alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"

chrome --remote-debugging-port=9222 --disable-gpu --headless

在控制台中,但是,我收到此错误,

[0305/140111.481537:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not permitted (1) [0305/140111.484254:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not permitted (1) [0305/140111.484254:INFO:crashpad_client_mac.cc(292)] restarting handler in 0.983s [0305/140111.513641:ERROR:gpu_process_transport_factory.cc(1009)] Lost UI shared context. [0305/140111.513709:ERROR:instance.cc(49)] Unable to locate service manifest for metrics [0305/140111.513733:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics [0305/140111.514229:ERROR:socket_posix.cc(142)] bind() returned an error, errno=48: Address already in use (48)

DevTools listening on ws://[::1]:9222/devtools/browser/c46563ca-1891-48bd-bdd6-e6122f3f3b5d [0305/140112.484141:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not permitted (1) [0305/140112.484641:INFO:crashpad_client_mac.cc(292)] restarting handler in 0.985s [0305/140113.489618:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not permitted (1) [0305/140113.490274:INFO:crashpad_client_mac.cc(292)] restarting handler in 0.979s [0305/140114.484881:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not permitted (1) [0305/140114.485349:INFO:crashpad_client_mac.cc(292)] restarting handler in 0.985s [0305/140115.489188:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/m3/92mmh21n0cx4ppf8c3bcns38hd4_kk/T/: Operation not permitted (1) [0305/140115.489638:INFO:crashpad_client_mac.cc(292)] restarting handler in 0.985s

我也试过

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --disable-gpu --headless

但我遇到了同样的错误。

有什么解决办法吗?

最佳答案

我从 Chrome crashpad crashes on xattr 得到了答案

只需在启动 Chrome 时为“故障转储”提供一个不同的目录,如下所示:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --disable-gpu --headless --crash-dumps-dir=/tmp

关于google-chrome - 在 headless 模式下运行 Chrome,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49103799/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com