无头灯铬REPL无法正常工作 [英] Headless Chrome REPL not working
本文介绍了无头灯铬REPL无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试运行时:
google-chrome --headless --disable-gpu --repl http:/ /google.com
变得无限:
[0829 / 155519.758686:INFO:headless_shell.cc(303)]输入一个Javascript表达式来评估或退出退出。
>>> {result:{type:undefined}}
>>> {result:{type:undefined}}
>>> {result:{type:undefined}}
>>> {result:{type:undefined}}
...
在Ubuntu 16.04上使用谷歌Chrome浏览器60.0.3112.113
是Chrome中的一个bug吗?
解决方案直接使用二进制/ opt / google / chrome / chrome而不是google-chrome,它指向bash脚本/ usr / bin / google-chrome。
摘自
https://developers.google.com/web/updates/2017/04/headless-chrome#screenshots
When I try to run:
google-chrome --headless --disable-gpu --repl http://google.com
getting infinite:
[0829/155519.758686:INFO:headless_shell.cc(303)] Type a Javascript expression to evaluate or "quit" to exit.
>>> {"result":{"type":"undefined"}}
>>> {"result":{"type":"undefined"}}
>>> {"result":{"type":"undefined"}}
>>> {"result":{"type":"undefined"}}
...
Google Chrome 60.0.3112.113 on Ubuntu 16.04
Is it a bug in Chrome?
解决方案
Use the binary /opt/google/chrome/chrome directly not google-chrome which points to bash script /usr/bin/google-chrome.
Taken from comments in
https://developers.google.com/web/updates/2017/04/headless-chrome#screenshots
这篇关于无头灯铬REPL无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文