【发布时间】:2016-06-17 15:09:56
【问题描述】:
我正在尝试在 Ubuntu Trusty 上运行 xvfb-run -s '-screen 0 1024x768x24' pub run test -p content-shell。
Dart 和 content shell 的安装方式如下:
# Install Dart
curl https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --import --no-default-keyring --keyring /etc/apt/trusted.gpg.d/google.gpg
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list
apt-get update
apt-get install --assume-yes dart=1.15.0-1
# Content shell and dartium
curl https://storage.googleapis.com/dart-archive/channels/stable/release/1.15.0/dartium/dartium-linux-x64-release.zip> /dartium-linux-x64-release.zip && \
unzip /dartium-linux-x64-release.zip -d /opt/google && \
mv /opt/google/dartium-* /opt/google/dartium && \
chmod -R 755 /opt/google/dartium
curl http://storage.googleapis.com/dart-archive/channels/stable/release/1.15.0/dartium/content_shell-linux-x64-release.zip > /content_shell-linux-x64-release.zip && \
unzip /content_shell-linux-x64-release.zip -d /opt/google && \
mv /opt/google/drt-* /opt/google/content_shell && \
chmod -R 755 /opt/google/content_shell
/opt/google/content_shell 包含在我的 PATH 变量中。
# which content_shell
/opt/google/content_shell/content_shell
但是,当我运行该测试尝试时:
# xvfb-run -s '-screen 0 1024x768x24' pub run test -p content-shell
我收到如下错误:
Failed to run Content Shell: Content Shell failed with exit code 1..
dart:async Future.Future.error
package:async/src/result/error.dart 30 ErrorResult.asFuture
package:async/src/result.dart 93 Result.release.<fn>
===== asynchronous gap ===========================
dart:async _Future.then
package:async/src/result.dart 93 Result.release
我没有看到更多信息。我不确定这是否应该引起关注,尽管它看起来很不祥:
# content_shell --version
[1114:1114:0617/150811:9471556647:ERROR:browser_main_loop.cc(189)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[1116:1116:0100/000000:9471568304:ERROR:zygote_linux.cc(612)] write: Broken pipe
我的问题是如何配置内容 shell 以正确安装,以便使用 pub run test -p content-shell 运行测试?
【问题讨论】:
-
这可能会有所帮助github.com/travis-ci/travis-build/blob/master/lib/travis/build/… 通常问题是由缺少字体引起的。尝试直接运行 content_shell 看看它是否产生任何错误。
-
@GünterZöchbauer 这对于 ubuntu 来说是精确的,虽然我想我也可以尝试在 trusty 上找到所有这些包......
-
我认为没有针对不同 Ubuntu 版本的具体示例。在我的 debian 系统上,我刚刚创建了一堆从缺失字体到任意其他字体的符号链接。
-
@GünterZöchbauer 有没有办法从 contentshell 中获取更多有意义的信息以尝试进行更多调查?我也没有想出任何方法来获得更有用的调试日志(这可能会有所帮助)。
-
@GünterZöchbauer 我能够解决这个问题,
/opt/google/content_shell/content_shell.log向我展示了一些隐藏的错误。
标签: ubuntu dart chromium dartium