我已经为这个问题挣扎了几天了,我不知道是什么导致了这个问题。测试套件在TravisCI上运行良好,在我重新启动计算机时在本地运行。不过,在本地做了一些事情之后,我一直收到相同的错误消息:
Unable to load URL: http://localhost.dev:3001/en/users/sign_in because of error loading http://localhost.dev:3001/en/users/sign_in: Unknown error (Capybara::Webkit::InvalidResponseError)下面是完整的webkit调试跟踪:
Using the default profile...
..........Finished "EnableLogging" with response "Success()"
Wrote response true ""
Received "Visit"
Started "Visit"
Load started
"Visit" started page load
Started request to "http://localhost.dev:3001/en/users/sign_in"
Finished "Visit" with response "Success()"
Received 0 from "http://localhost.dev:3001/en/users/sign_in"
Page finished with false
Load finished
Page load from command finished
Wrote response false "{"class":"InvalidResponseError","message":"Unable to load URL: http://localhost.dev:3001/en/users/sign_in because of error loading http://localhost.dev:3001/en/users/sign_in: Unknown error"}"
F-Received "Reset"
Started "Reset"
undefined|0|SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.
Finished "Reset" with response "Success()"
Wrote response true ""
Received "FindXpath"
Started "FindXpath"
Finished "FindXpath" with response "Success()"
Wrote response true ""
..........F--------
(::) failed steps (::)
Unable to load URL: http://localhost.dev:3001/en/users/sign_in because of error loading http://localhost.dev:3001/en/users/sign_in: Unknown error (Capybara::Webkit::InvalidResponseError)这出现在应用程序的任何地方,我试图visit一个路径。据我所知,“未知错误”是来自qt,而不是capybara-webkit,但我不太确定谁才是最好的选择。我使用DNSmasq作为子域,我们有多种语言,因此localhost:3000被重定向到www.localhost.dev:3000/en。
当前版本的事物:
编辑1:还发布在capybara-webkit回购:https://github.com/thoughtbot/capybara-webkit/issues/667上
编辑2:下面是测试日志文件:https://gist.github.com/GolfyMcG/060053eba51a9ba69722
发布于 2015-04-10 01:04:31
正如我在相关的Github问题中发布的那样,我在这里找到了解决方案:
https://apple.stackexchange.com/questions/26616/dns-not-resolving-on-mac-os
与Capybara-webkit无关,也与我如何让我的ElasticSearch实例进行测试有关。
https://stackoverflow.com/questions/25875766
复制相似问题