Selenium/TestBench错误: net::ERR_CONNECTION_REFUSED

huangapple go评论75阅读模式
英文:

Selenium/TestBench failure: net::ERR_CONNECTION_REFUSED

问题

我尝试运行 Web 应用程序并使用 Google Chrome 启动它,但是出现了错误,以下是我得到的异常信息。我对 Web 开发不太熟悉,没有 Web 开发经验。这完全是按照 Vaadin 教程操作的,但仍然出现了这样的错误。

希望有人能够解释这里的问题并提供解决方案。

12:18:42.525 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - 正在使用 chromedriver 85.0.4183.87(因为您的计算机已安装 Google Chrome 85)
12:18:42.557 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - 将 webdriver.chrome.driver 导出为 C:\Users\Abyss\.m2\repository\webdriver\chromedriver\win32.0.4183.87\chromedriver.exe
Sep 18, 2020 12:18:42 PM com.vaadin.testbench.parallel.ParallelTest setup
INFO: 未找到在本地、Sauce Labs 或其他测试网格上运行的配置。回退到在 Chrome 上本地运行。
正在启动 ChromeDriver 85.0.4183.87(cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689}),端口 14652
仅允许本地连接。
请参阅 https://chromedriver.chromium.org/security-considerations 以获取有关保护 ChromeDriver 安全性的建议。
ChromeDriver 成功启动。
Sep 18, 2020 12:18:46 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: 检测到方言:W3C
警告:发生了非法反射访问操作
警告:javassist.util.proxy.SecurityActions(file:/C:/Users/Abyss/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar)对 java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) 的方法的非法反射访问
警告:请考虑向 javassist.util.proxy.SecurityActions 的维护人员报告此问题
警告:使用 --illegal-access=warn 以启用进一步的非法反射访问操作警告
警告:所有非法访问操作在将来的版本中将被拒绝
Sep 18, 2020 12:18:52 PM com.vaadin.testbench.ScreenshotOnFailureRule failed
INFO: 错误截图已写入:C:\Users\Abyss\Documents\Intellij Prgram\vaadin-crm\vaadin-crm\error-screenshots\loginAsValidUserSucceeds[ANY_Chrome_](com.vaadin.tutorial.crm.it.LoginIT).png

org.openqa.selenium.WebDriverException:未知错误:net::ERR_CONNECTION_REFUSED
(会话信息:chrome=85.0.4183.102)
构建信息:版本:'3.141.59',修订版:'e82be7d358',时间:'2018-11-14T08:17:03'
系统信息:主机:'DESKTOP-UIL9GAM',IP:'192.168.0.22',os.name:'Windows 10',os.arch:'amd64',os.version:'10.0',java.version:'11.0.8'
驱动程序信息:org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 85.0.4183.102, ...}
会话 ID:de2db382831034a569b4913b37583b71

...(以下部分类似)
英文:

I tried to run the web application and launch it using google chrome but it shows an error and this is the exception that im getting. Im new to web development and i dont have experience on web development. This is fully following from vaadin tutorial and still im getting such error.

I hope someone can explain the problem here and the solution.

12:18:42.557 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as C:\Users\Abyss\.m2\repository\webdriver\chromedriver\win32\85.0.4183.87\chromedriver.exe
Sep 18, 2020 12:18:42 PM com.vaadin.testbench.parallel.ParallelTest setup
INFO: Did not find a configuration to run locally, on Sauce Labs or on other test grid. Falling back to running locally on Chrome.
Starting ChromeDriver 85.0.4183.87 (cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689}) on port 14652
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Sep 18, 2020 12:18:46 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by javassist.util.proxy.SecurityActions (file:/C:/Users/Abyss/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of javassist.util.proxy.SecurityActions
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Sep 18, 2020 12:18:52 PM com.vaadin.testbench.ScreenshotOnFailureRule failed
INFO: Error screenshot written to: C:\Users\Abyss\Documents\Intellij Prgram\vaadin-crm\vaadin-crm\error-screenshots\loginAsValidUserSucceeds[ANY_Chrome_](com.vaadin.tutorial.crm.it.LoginIT).png
org.openqa.selenium.WebDriverException: unknown error: net::ERR_CONNECTION_REFUSED
(Session info: chrome=85.0.4183.102)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-UIL9GAM', ip: '192.168.0.22', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.8'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 85.0.4183.102, chrome: {chromedriverVersion: 85.0.4183.87 (cd6713ebf92fa..., userDataDir: C:\Users\Abyss\AppData\Loca...}, goog:chromeOptions: {debuggerAddress: localhost:58803}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:virtualAuthenticators: true}
Session ID: de2db382831034a569b4913b37583b71
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:277)
at com.vaadin.testbench.TestBenchDriverProxy.get(TestBenchDriverProxy.java:66)
at com.vaadin.testbench.TestBenchDriverProxy_$$_jvste97_0._d24get(TestBenchDriverProxy_$$_jvste97_0.java)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.vaadin.testbench.DriverInvocationHandler.invoke(DriverInvocationHandler.java:51)
at com.vaadin.testbench.TestBenchDriverProxy_$$_jvste97_0.get(TestBenchDriverProxy_$$_jvste97_0.java)
at com.vaadin.tutorial.crm.it.AbstractTest.setup(AbstractTest.java:31)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at com.vaadin.testbench.parallel.ParallelRunner$1.evaluate(ParallelRunner.java:468)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at com.vaadin.testbench.parallel.ParallelScheduler$1.call(ParallelScheduler.java:48)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
org.openqa.selenium.NoSuchSessionException: Session ID is null. Using WebDriver after calling quit()?
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-UIL9GAM', ip: '192.168.0.22', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.8'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:125)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:489)
at com.vaadin.testbench.commands.TestBenchCommandExecutor.waitForVaadin(TestBenchCommandExecutor.java:127)
at com.vaadin.testbench.DriverInvocationHandler.waitForVaadinIfNecessary(DriverInvocationHandler.java:69)
at com.vaadin.testbench.DriverInvocationHandler.invoke(DriverInvocationHandler.java:37)
at com.vaadin.testbench.TestBenchDriverProxy_$$_jvste97_0.getScreenshotAs(TestBenchDriverProxy_$$_jvste97_0.java)
at com.vaadin.testbench.ScreenshotOnFailureRule.failed(ScreenshotOnFailureRule.java:113)
at org.junit.rules.TestWatcher.failedQuietly(TestWatcher.java:90)
at org.junit.rules.TestWatcher.access$300(TestWatcher.java:52)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:68)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at com.vaadin.testbench.parallel.ParallelScheduler$1.call(ParallelScheduler.java:48)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Process finished with exit code -1

答案1

得分: 3

我不认为错误与非法反射访问警告有关。

你的应用程序是否在运行?TestBench 要求在执行测试时应用程序保持运行状态。

英文:

I don't think the error is related to the illegal reflective access warning.

Is your application running? TestBench requires your application to run while executing tests.

huangapple
  • 本文由 发表于 2020年9月18日 14:20:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/63950316.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定