wdio/运行程序错误:错误:无法创建会话。[0 - 0]无法连接到"http://localhost:4723/",请确保浏览器驱动程序正在该地址上运行。
jule@Ahmeds-MBP implement_typescript % npm run android.app
> automation@1.0.0 android.app
> wdio config/wdio.android.app.conf.ts
Execution of 1 workers started at 2023-01-02T12:12:47.549Z
2023-01-02T12:12:47.555Z INFO @wdio/cli:launcher: Run onPrepare hook
2023-01-02T12:12:51.063Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2023-01-02T12:12:51.064Z INFO @wdio/local-runner: Start worker 0-0 with arg:
config/wdio.android.app.conf.ts
[0-0] 2023-01-02T12:12:51.409Z INFO @wdio/local-runner: Run worker command: run
[0-0] RUNNING in Android - /test/specs/android/arive.e2e.ts
[0-0] 2023-01-02T12:12:51.951Z INFO webdriver: Initiate new session using the
WebDriver protocol
[0-0] 2023-01-02T12:12:52.010Z INFO webdriver: [POST] http://localhost:4723/session
[0-0] 2023-01-02T12:12:52.010Z INFO webdriver: DATA {
[0-0] capabilities: {
[0-0] alwaysMatch: {
[0-0] platformName: 'Android',
[0-0] 'appium:deviceName': 'emulator-5554',
[0-0] 'appium:automationName': 'UiAutomator2',
[0-0] 'appium:appPackage': 'com.getarive.app',
[0-0] 'appium:appWaitActivity': 'com.getarive.app.MainActivity',
[0-0] 'appium:app': '/Users/jule/Desktop/arive/Arive-git-repo/implement_typescript/app/android/arive-staging-v2.13.0-staging-release.apk',
[0-0] 'appium:noReset': true
[0-0] },
[0-0] firstMatch: [ {} ]
[0-0] },
[0-0] desiredCapabilities: {
[0-0] platformName: 'Android',
[0-0] 'appium:deviceName': 'emulator-5554',
[0-0] 'appium:automationName': 'UiAutomator2',
[0-0] 'appium:appPackage': 'com.getarive.app',
[0-0] 'appium:appWaitActivity': 'com.getarive.app.MainActivity',
[0-0] 'appium:app': '/Users/jule/Desktop/arive/Arive-git-repo/implement_typescript/app/android/arive-staging-v2.13.0-staging-release.apk',
[0-0] 'appium:noReset': true
[0-0] }
[0-0] }
[0-0] 2023-01-02T12:12:52.044Z ERROR webdriver: RequestError: connect ECONNREFUSED ::1:4723
[0-0] at ClientRequest.<anonymous> (/Users/jule/Desktop/arive/Arive-git-repo/implement_typescript/node_modules/got/dist/source/core/index.js:970:111)
[0-0] at Object.onceWrapper (node:events:628:26)
[0-0] at ClientRequest.emit (node:events:525:35)
[0-0] at ClientRequest.emit (node:domain:489:12)
[0-0] at ClientRequest.origin.emit (/Users/jule/Desktop/arive/Arive-git-repo/implement_typescript/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
[0-0] at Socket.socketErrorListener (node:_http_client:494:9)
[0-0] at Socket.emit (node:events:513:28)
[0-0] at Socket.emit (node:domain:489:12)
[0-0] at emitErrorNT (node:internal/streams/destroy:151:8)
[0-0] at emitErrorCloseNT (node:internal/streams/destroy:116:3)
[0-0] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)
[0-0] 2023-01-02T12:12:52.045Z ERROR @wdio/runner: Error: Failed to create session.
[0-0] Unable to connect to "http://localhost:4723/", make sure browser driver is running on that address.
[0-0] If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.
[0-0] at startWebDriverSession (/Users/jule/Desktop/arive/Arive-git-repo/implement_typescript/node_modules/webdriver/build/utils.js:73:15)
[0-0] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[0-0] at async Function.newSession (/Users/jule/Desktop/arive/Arive-git-repo/implement_typescript/node_modules/webdriver/build/index.js:46:45)
[0-0] at async remote (/Users/jule/Desktop/arive/Arive-git-repo/implement_typescript/node_modules/webdriverio/build/index.js:78:22)
[0-0] at async Runner._startSession (/Users/jule/Desktop/arive/Arive-git-repo/implement_typescript/node_modules/@wdio/runner/build/index.js:223:56)
[0-0] at async Runner._initSession (/Users/jule/Desktop/arive/Arive-git-repo/implement_typescript/node_modules/@wdio/runner/build/index.js:176:25)
[0-0] at async Runner.run (/Users/jule/Desktop/arive/Arive-git-repo/implement_typescript/node_modules/@wdio/runner/build/index.js:88:19)
[0-0] FAILED in Android - /test/specs/android/arive.e2e.ts
2023-01-02T12:12:52.171Z INFO @wdio/cli:launcher: Run onWorkerEnd hook
2023-01-02T12:12:52.172Z INFO @wdio/cli:launcher: Run onComplete hook
Report successfully generated to allure-report
Allure report successfully generated
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:06
1条答案
按热度按时间rsaldnfx1#
已找到,节点版本-
v18.12.1
不支持在-
nvm use 16
之后立即启动服务器