Laravel Dusk:FacebookWebDriverExceptionUnknownErrorException:未知错误:net::ERR_CONNECTION_REFUSED
问题描述
运行php artisan黄昏得到错误:
Running php artisan dusk get the error:
版本:
- 操作系统:Windows 10 v1903 build 18362.1016
- Chrome:85.0.4183.83
- Laravel:v6.18.37
- 黄昏:v5.11.0
- phpunit:v8.5.8
试过了:
- 禁用防火墙
- 将测试网站设置为使用 localhost(原为 myapp.local)
- 可以使用 Chrome 浏览器访问所有页面
- 检查 vendor/laravel/dusk/bin/chromedriver-win.exe 是否可执行 (-rwxr-xr-x)
- php 工匠路线:清除
- php artisan 缓存:清除
- php 工匠配置:清除
- 作曲家转储自动加载
- 谷歌FacebookWebDriverExceptionUnknownErrorException:未知错误:net::ERR_CONNECTION_REFUSED"
服务器 localhost:9515 在执行测试时似乎正在运行,因为我在尝试时在 Chrome 中得到以下响应:
The server localhost:9515 appears to be running while tests executing as I get the following response in Chrome when trying it:
DuskTestCase 驱动程序:
DuskTestCase driver:
有人知道还有什么可以尝试的吗?或者有其他人知道解决方案吗?
Does anyone have any clues on what else to try? Or does anyone else know a resolution?
推荐答案
我遇到了同样的问题,对我来说有效的方法是将 .env 文件中的 APP_URL
参数设置为:
I faced the same issue and for me what worked was setting the APP_URL
parameter in the .env file as:
因为这是我的 php artisan serve
也将服务于网站的相同端口,即
As that was the same port on which my php artisan serve
would also serve the website i.e.
这篇关于Laravel Dusk:FacebookWebDriverExceptionUnknownErrorException:未知错误:net::ERR_CONNECTION_REFUSED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!