<small id='V8g59'></small><noframes id='V8g59'>

  • <legend id='V8g59'><style id='V8g59'><dir id='V8g59'><q id='V8g59'></q></dir></style></legend>

  • <i id='V8g59'><tr id='V8g59'><dt id='V8g59'><q id='V8g59'><span id='V8g59'><b id='V8g59'><form id='V8g59'><ins id='V8g59'></ins><ul id='V8g59'></ul><sub id='V8g59'></sub></form><legend id='V8g59'></legend><bdo id='V8g59'><pre id='V8g59'><center id='V8g59'></center></pre></bdo></b><th id='V8g59'></th></span></q></dt></tr></i><div id='V8g59'><tfoot id='V8g59'></tfoot><dl id='V8g59'><fieldset id='V8g59'></fieldset></dl></div>
    • <bdo id='V8g59'></bdo><ul id='V8g59'></ul>

  • <tfoot id='V8g59'></tfoot>

      1. Laravel Dusk:FacebookWebDriverExceptionUnknownErrorException

        Laravel Dusk: FacebookWebDriverExceptionUnknownErrorException: unknown error: net::ERR_CONNECTION_REFUSED(Laravel Dusk:FacebookWebDriverExceptionUnknownErrorException:未知错误:net::ERR_CONNECTION_REFUSED)

            <tbody id='ArIdx'></tbody>
                <tfoot id='ArIdx'></tfoot>
              • <small id='ArIdx'></small><noframes id='ArIdx'>

                <i id='ArIdx'><tr id='ArIdx'><dt id='ArIdx'><q id='ArIdx'><span id='ArIdx'><b id='ArIdx'><form id='ArIdx'><ins id='ArIdx'></ins><ul id='ArIdx'></ul><sub id='ArIdx'></sub></form><legend id='ArIdx'></legend><bdo id='ArIdx'><pre id='ArIdx'><center id='ArIdx'></center></pre></bdo></b><th id='ArIdx'></th></span></q></dt></tr></i><div id='ArIdx'><tfoot id='ArIdx'></tfoot><dl id='ArIdx'><fieldset id='ArIdx'></fieldset></dl></div>
                <legend id='ArIdx'><style id='ArIdx'><dir id='ArIdx'><q id='ArIdx'></q></dir></style></legend>

                  <bdo id='ArIdx'></bdo><ul id='ArIdx'></ul>
                • 本文介绍了Laravel Dusk:FacebookWebDriverExceptionUnknownErrorException:未知错误:net::ERR_CONNECTION_REFUSED的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  运行php artisan黄昏得到错误:

                  Running php artisan dusk get the error:

                  FacebookWebDriverExceptionUnknownErrorException: unknown error: net::ERR_CONNECTION_REFUSED
                    (Session info: headless chrome=85.0.4183.83)
                  

                  版本:

                  • 操作系统: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:

                  {
                      value: {
                          error: "unknown command",
                          message: "unknown command: unknown command: ",
                          stacktrace: "Backtrace: Ordinal0 [0x0037D383+3134339] Ordinal0 [0x0026A171+2007409] Ordinal0 [0x0010AEE8+569064] Ordinal0 [0x000AD12C+184620] Ordinal0 [0x000ACF0A+184074] Ordinal0 [0x00081FD7+8151] Ordinal0 [0x00082496+9366] Ordinal0 [0x00082B40+11072] Ordinal0 [0x00280CD9+2100441] GetHandleVerifier [0x004EB75A+1396954] GetHandleVerifier [0x004EB3D9+1396057] GetHandleVerifier [0x004F7126+1444518] GetHandleVerifier [0x004EBCE8+1398376] Ordinal0 [0x00277F51+2064209] Ordinal0 [0x00081D35+7477] Ordinal0 [0x00081991+6545] GetHandleVerifier [0x006BF31C+3312796] BaseThreadInitThunk [0x76986359+25] RtlGetAppContainerNamedObjectPath [0x771D7C24+228] RtlGetAppContainerNamedObjectPath [0x771D7BF4+180] (No symbol) [0x00000000] ",
                      }
                  }
                  

                  DuskTestCase 驱动程序:

                  DuskTestCase driver:

                  /**
                   * Create the RemoteWebDriver instance.
                   *
                   * @return FacebookWebDriverRemoteRemoteWebDriver
                   */
                  protected function driver()
                  {
                      $options = (new ChromeOptions)->addArguments([
                          '--disable-gpu',
                          '--headless',
                          '--window-size=1920,1080',
                      ]);
                  
                      return RemoteWebDriver::create(
                          'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
                              ChromeOptions::CAPABILITY, $options
                          )
                      );
                  }
                  

                  有人知道还有什么可以尝试的吗?或者有其他人知道解决方案吗?

                  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:

                  APP_URL=http://127.0.0.1:8000
                  

                  因为这是我的 php artisan serve 也将服务于网站的相同端口,即

                  As that was the same port on which my php artisan serve would also serve the website i.e.

                  Laravel development server started: http://127.0.0.1:8000
                  

                  这篇关于Laravel Dusk:FacebookWebDriverExceptionUnknownErrorException:未知错误:net::ERR_CONNECTION_REFUSED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How do I parse XML containing custom namespaces using SimpleXML?(如何使用 SimpleXML 解析包含自定义命名空间的 XML?)
                  SimpleXML SOAP response Namespace issues(SimpleXML SOAP 响应命名空间问题)
                  Problems with PHP namespaces and built-in classes, how to fix?(PHP 命名空间和内置类的问题,如何解决?)
                  Use php namespace inside function(在函数内部使用 php 命名空间)
                  unexpected #39;use#39; (T_USE) when trying to use composer(尝试使用作曲家时意外的“使用(T_USE))
                  PHP adding custom namespace using autoloader from composer(PHP使用来自作曲家的自动加载器添加自定义命名空间)
                  • <bdo id='cHO99'></bdo><ul id='cHO99'></ul>

                      <small id='cHO99'></small><noframes id='cHO99'>

                      <i id='cHO99'><tr id='cHO99'><dt id='cHO99'><q id='cHO99'><span id='cHO99'><b id='cHO99'><form id='cHO99'><ins id='cHO99'></ins><ul id='cHO99'></ul><sub id='cHO99'></sub></form><legend id='cHO99'></legend><bdo id='cHO99'><pre id='cHO99'><center id='cHO99'></center></pre></bdo></b><th id='cHO99'></th></span></q></dt></tr></i><div id='cHO99'><tfoot id='cHO99'></tfoot><dl id='cHO99'><fieldset id='cHO99'></fieldset></dl></div>

                      <legend id='cHO99'><style id='cHO99'><dir id='cHO99'><q id='cHO99'></q></dir></style></legend>
                          <tfoot id='cHO99'></tfoot>

                              <tbody id='cHO99'></tbody>