0

We're running wdio tests using wdio (both for local run & browserstack based devices)

When I run browserstack (server run) I am getting following error:

[11:41:04] COMMAND POST "/wd/hub/session" [11:41:04] DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"name":"Ping","build":"1.0","browserstack.debug":true,"device":"Samsung Galaxy S8","os_version":"7.0","requestOrigins":{"url":"http://webdriver.io","version":"4.14.2","name":"webdriverio"}}} ERROR: connect ECONNREFUSED 127.0.0.1:4444

My dependency stack We use yarn

"wdio-allure-reporter": "0.8.3",
"wdio-appium-service": "^0.2.3",
"wdio-browserstack-service": "^0.1.18",
"wdio-cucumber-framework": "2.2.8",
"wdio-dot-reporter": "0.0.10",
"wdio-mocha-framework": "^0.6.4",
"wdio-screenshots-cleanup-service": "0.0.7",
"wdio-spec-reporter": "^0.1.4",
"wdio-visual-regression-service": "^0.9.0",
"webdriverio": "4.14.2"

I have tried troubleshooting tip mentioned on below documentation, but no affect.

Kindly advise what might be the reason tests are not running either locally & not on server.

Troubleshooting tip

user2451016
  • 1,204
  • 2
  • 15
  • 30

1 Answers1

2

The error you're seeing is because wdio is trying to reach out to a WebDriver server on "127.0.0.1:4444", which is the default local server (i.e. not Browserstack).

This means you likely don't have your user/key set up in your wdio.conf.js file. WebdriverIO relies on the user/key to determine what default server to use.

Check your config that both user and key are set. More info is available here: http://v4.webdriver.io/guide/services/browserstack.html

Kevin Lamping
  • 2,079
  • 15
  • 19