2017-04-11 39 views
2

私はHomestead バージョン1.0.1ララベルバージョン5.4.16を使用しています。私はLaravelの夕暮れをthe documentationと読んで設定しました。ホームステイでLaravel Duskを実行しています

しかし、ホームステッドにsshでphp artisan duskを実行すると、

PHPUnit 5.7.17 by Sebastian Bergmann and contributors.

E 1 /1 (100%)

Time: 2.52 minutes, Memory: 10.00MB

There was 1 error:

1) Tests\Browser\ExampleTest::testBasicExample Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"binary":"","args":["no-first-run"]}}}

Operation timed out after 30001 milliseconds with 0 bytes received

この問題を解決する方法はありますか?

答えて

3

はい、それは夕暮れのギターページにあります。これは既知の問題であり、次の農家の改築作業に取り組んでいます。

The basic issue is that the homestead box has no visual interface and that dusk runs a real browser, so you have to install a chromedriver if you want to use it.

しかし今、これは私の仕事のために: https://github.com/laravel/dusk/issues/50#issuecomment-275155974

その記事に含まれますが、私には必要ありません: あなたが許可を以下のしていることを確認してはgithubのポストからcd vendor/laravel/dusk/bin; chmod 775 *

手順を設定します。 まず、google-chromeがゲストOSにインストールされるように要求されています。

$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 
$ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' 
$ sudo apt-get update && sudo apt-get install -y google-chrome-stable 

次の事はXVFBです:

$ sudo apt-get install -y libnss3-dev libxi6 libgconf-2-4 

$ sudo apt-get install -y xvfb 

することで、ロードライブラリ(libnss3.so、libgconf-2.so.4)について多少の誤差がある場合は、これを試してみてください./vendor/laravel/dusk/bin/chromedriver-linux --port=8888.を開始するようにしてくださいあなたが見るとき

$ ./vendor/laravel/dusk/bin/chromedriver-linux --port=8888 
Starting ChromeDriver 2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e) on port 8888 
Only local connections are allowed. 
this means ChromeDriver can be started (so SupportsChrome trait should be able to start it too). You can stop this process for now (Ctrl+C). 

実行

$ Xvfb :0 -screen 0 1280x960x24 & 
in a separate terminal window. 

ゲストの/ etc/hostsファイルにdevドメインを追加することもできます: 127.0.0.1 domain.dev。提案されているよう私は依存関係文句なしで実行する事は、あなたの正確なパラメータでXVFBコマンドを開始しました、グーグル・クロム安定をインストールしている、まだ私はまだタイムアウトエラーを取得...私がしようとしている

This issue is to add the chromedriver to homestead by default and will be solved mid April. https://github.com/laravel/homestead/issues/516

+0

macOSホスト上のDebian jessieコンテナでDuskを実行する。ホストOSから、Duskはブラウザを起動できます。 chromedriver-linuxのパーミッションはコンテナ内で755です。 –

+0

このソリューションは、Ubuntuのホームステッドボックス用です。デビアンではない – Christophvh

関連する問題