Appium Wdio not run = ERROR webdriver: RequestError: connect ECONNREFUSED ::1:4723

Viewed 811

Run npx wdio and not run ı more try but ı did not PLease help me this issue always

My caps

capabilities: [{
    
    platformName: "Android",
    "appium:deviceName": "emulator-5554",
    "appium:automationName": "UIAutomator2",
    "appium:app": join(process.cwd(), "./app/android/Berqnet Connect 3.1.0-1.apk"),
}],

My Bugs

ERROR webdriver: RequestError: connect ECONNREFUSED ::1:4723
ERROR @wdio/runner: Error: Failed to create session.
FAILED in Android - C:(MyFiles)\Desktop\wdioDers\test\specs\sample.js

My sample.js File

describe('Sample', () => {
it('Sample Test', () =>{

});

});

2 Answers

I think you need show full code of "wdio.config.js" to everyone can help you check around your config. Maybe, You can check the value of "services" in wdio.config.js file. You must set value of services is "services: ['appium']" I hope it will help you resolve your problem.

For anyone coming to look for answers to this solution, if you're on windows and use WSL. If the code is run on WSL while using the appium GUI on normal port, you can't connect through so you need to either:

  1. Open port connection from WSL to windows port
  2. move the code to windows and run it from there

Hope this helps anyone who's having the same issue as I did and couldn't find the problem!

Related