【问题标题】:Getting error on attempt to work with ggr+selenoid: ECONNREFUSED 127.0.0.1:443尝试使用 ggr+selenoid 时出错:ECONNREFUSED 127.0.0.1:443
【发布时间】:2021-09-03 04:36:35
【问题描述】:

对于我自己的 ggr+selenoid 集群 (https://test:123456@selenoid.my.server.com:443/wd/hub/session) 。使用 curl 创建会话效果很好。

这似乎是问题 https - 它尝试连接到 localhost:443,但我的 ggr url 抛出错误

WebdriverIO 版本:v7 模式:WDIO 测试运行器 如果是 WDIO Testrunner,运行同步/异步:同步 Node.js 版本:v12.22 NPM 版本:6.14.11

"@wdio/allure-reporter": "^7.5.7",
"@wdio/cli": "^7.5.7",
"@wdio/local-runner": "^7.5.7",
"@wdio/mocha-framework": "^7.5.3",
"@wdio/spec-reporter": "^7.5.7",

  runner: 'local',
  protocol: 'https',
  user: 'test',
  key: '123456',
  hostname: 'ggr.my.server.com',
  port: 443,
  path: '/wd/hub/',

[0-0] 2021-06-18T11:32:49.065Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:443
[0-0]     at ClientRequest.<anonymous> (/Users/.../Documents/project/web-tests-wdio/node_modules/got/dist/source/core/index.js:956:111)
[0-0]     at Object.onceWrapper (node:events:476:26)
[0-0]     at ClientRequest.emit (node:events:381:22)
[0-0]     at ClientRequest.emit (node:domain:470:12)
[0-0]     at ClientRequest.origin.emit (/Users/.../Documents/project/web-tests-wdio/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20)
[0-0]     at TLSSocket.socketErrorListener (node:_http_client:472:9)
[0-0]     at TLSSocket.emit (node:events:369:20)
[0-0]     at TLSSocket.emit (node:domain:470:12)
[0-0]     at emitErrorNT (node:internal/streams/destroy:188:8)
[0-0]     at emitErrorCloseNT (node:internal/streams/destroy:153:3)
[0-0]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1138:16)

[0-0] 2021-06-18T11:32:49.065Z ERROR @wdio/runner: Error: Failed to create session.
[0-0] Unable to connect to "https://ggr.my.server.com:443/wd/hub/", 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 Object.startWebDriverSession (/Users/.../web-tests-wdio/node_modules/webdriver/build/utils.js:68:15)
[0-0]     at processTicksAndRejections (node:internal/process/task_queues:94:5)
[0-0]     at Function.newSession (/Users/.../web-tests-wdio/node_modules/webdriver/build/index.js:58:45)
[0-0]     at Object.remote (/Users/.../web-tests-wdio/node_modules/webdriverio/build/index.js:67:22)
[0-0]     at Runner._startSession (/Users/.../web-tests-wdio/node_modules/@wdio/runner/build/index.js:216:56)
[0-0]     at Runner._initSession (/Users/.../web-tests-wdio/node_modules/@wdio/runner/build/index.js:172:25)
[0-0]     at Runner.run (/Users/.../web-tests-wdio/node_modules/@wdio/runner/build/index.js:87:19)

【问题讨论】:

标签: javascript webdriver-io selenoid


【解决方案1】:

好的,对于将来会寻找解决方案的人来说:

在我的项目中我有一些深层文件(我们目前处于迁移阶段)

import { browser } from 'protractor'

由于某种原因,一些量角器依赖项或量角器本身改变了 webdriverio 如何连接到远程 https selenoid 的行为,并给出了我发布的问题非常不清楚的错误。

避免使用会改变全局 http/https 模块行为的依赖项。

这个问题指出我应该检查我的依赖项:https://github.com/sindresorhus/got/issues/1572

【讨论】:

    猜你喜欢
    • 2020-12-11
    • 2020-09-19
    • 1970-01-01
    • 2023-01-17
    • 2022-12-23
    • 2017-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多