带有 Slimerjs 的 CasperJS - Xlib:显示“:99”时缺少扩展名 "RANDR"
CasperJS with Slimerjs - Xlib: extension "RANDR" missing on display ":99"
我正在尝试 运行将 Casperjs 与 Slimerjs
- 我安装了 SlimerJS 0.10.2
- 我已经安装了 Mozilla Firefox 45.5.1(也尝试过 50)
- 我已经安装了 CasperJS 1.1.3
- 我已经安装了xvfb 1.17.4
运行 在 Centos 6.8
当尝试 运行 来自 php 的 casperjs+slimerjs 我得到:
Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS.
See Gecko version compatibility. If version is correct, launch slimerjs
with --debug=true to see Firefox error message
当我尝试 运行 从控制台使用 debug=true 编写脚本时,例如:
/usr/local/bin/casperjs /tmp/casperjs-5cn484 --debug=true --engine=slimerjs
(我也试过 xvfb-run
)
我收到这个错误:
Xlib: extension "RANDR" missing on display ":99".
process 5588: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
D-Bus not built with -rdynamic so unable to print a backtrace
Redirecting call to abort() to mozalloc_abort
/usr/lib/node_modules/slimerjs/src/slimerjs: line 167: 5588 Segmentation fault "$SLIMERJSLAUNCHER" -app "$SLIMERDIR/application.ini" $PROFILE -no-remote "$@"
如果我运行slimerjs --debug=true
,我得到:
Error: cannot open display: :1.1
Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS.
See Gecko version compatibility. If version is correct, launch slimerjs
with --debug=true to see Firefox error message
我已经尝试了很多解决方案,例如:
- 尝试过:
Xvfb :1 -screen 0 1024x768x24 +extension RANDR &
和 export DISPLAY=:1
(还有 :99)
- 尝试过
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
- 升级降级firefox版本
- 检查是否有字体,有一个,所以没问题
我不知道我在尝试什么了,有什么建议吗? :)
你看到this issue了吗?显然你应该:
Change the max version in src/application.ini
MaxVersion=45.*
我不确定 xrandr 错误,但似乎无关。可能是实验的结果或转移注意力的结果。
还有一个 DBUS 错误可能会导致后续的分段错误。
我建议你尝试一步步检查:
- 看到 firefox 正在运行
- X forwarding 在这里可能会有帮助,它会在本地调出远程 firefox window
- 确保 firefox 正在无头工作
- 你可以生成 an xvfb screenshot
- 检查 slimerjs
- 检查你的 PHP 包装脚本
无论如何我明白了 运行 安装 dbus 包并使用命令:
dbus-uuidgen > /var/lib/dbus/machine-id
Xlib: extension "RANDR" missing on display ":99"
不是大问题...
我正在尝试 运行将 Casperjs 与 Slimerjs
- 我安装了 SlimerJS 0.10.2
- 我已经安装了 Mozilla Firefox 45.5.1(也尝试过 50)
- 我已经安装了 CasperJS 1.1.3
- 我已经安装了xvfb 1.17.4
运行 在 Centos 6.8
当尝试 运行 来自 php 的 casperjs+slimerjs 我得到:
Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS.
See Gecko version compatibility. If version is correct, launch slimerjs
with --debug=true to see Firefox error message
当我尝试 运行 从控制台使用 debug=true 编写脚本时,例如:
/usr/local/bin/casperjs /tmp/casperjs-5cn484 --debug=true --engine=slimerjs
(我也试过 xvfb-run
)
我收到这个错误:
Xlib: extension "RANDR" missing on display ":99".
process 5588: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
D-Bus not built with -rdynamic so unable to print a backtrace
Redirecting call to abort() to mozalloc_abort
/usr/lib/node_modules/slimerjs/src/slimerjs: line 167: 5588 Segmentation fault "$SLIMERJSLAUNCHER" -app "$SLIMERDIR/application.ini" $PROFILE -no-remote "$@"
如果我运行slimerjs --debug=true
,我得到:
Error: cannot open display: :1.1
Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS.
See Gecko version compatibility. If version is correct, launch slimerjs
with --debug=true to see Firefox error message
我已经尝试了很多解决方案,例如:
- 尝试过:
Xvfb :1 -screen 0 1024x768x24 +extension RANDR &
和export DISPLAY=:1
(还有 :99) - 尝试过
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
- 升级降级firefox版本
- 检查是否有字体,有一个,所以没问题
我不知道我在尝试什么了,有什么建议吗? :)
你看到this issue了吗?显然你应该:
Change the max version in src/application.ini MaxVersion=45.*
我不确定 xrandr 错误,但似乎无关。可能是实验的结果或转移注意力的结果。
还有一个 DBUS 错误可能会导致后续的分段错误。
我建议你尝试一步步检查:
- 看到 firefox 正在运行
- X forwarding 在这里可能会有帮助,它会在本地调出远程 firefox window
- 确保 firefox 正在无头工作
- 你可以生成 an xvfb screenshot
- 检查 slimerjs
- 检查你的 PHP 包装脚本
无论如何我明白了 运行 安装 dbus 包并使用命令:
dbus-uuidgen > /var/lib/dbus/machine-id
Xlib: extension "RANDR" missing on display ":99"
不是大问题...