Failed to create Appium session
See original GitHub issueEnvironment (please complete the following information):
- WebdriverIO version: [6.0.13]
- Mode: [WDIO Testrunner]
- If WDIO Testrunner, running sync/async: [sync]
- Node.js version: [14.4.0]
- NPM version: [6.14.5]
- Browser name and version: [Chrome]
- Platform name and version: [Windows 10]
Config of WebdriverIO Appium Config:
services: [
[
"appium",
{
// For options see
// https://github.com/webdriverio/webdriverio/tree/master/packages/wdio-appium-service
args: {
// ...
debugLogSpacing: true,
platformName: "android",
// ...
},
command: "appium",
},
],
],
port: 4723,
config.capabilities = [
{
// The defaults you need to have in your config
platformName: "Android",
browserName: "chrome",
maxInstances: 1,
// For W3C the appium capabilities need to have an extension prefix
// http://appium.io/docs/en/writing-running-appium/caps/
// This is `appium:` for all Appium Capabilities which can be found here
"appium:deviceName": "Pixel_2_XL_API_29",
"appium:platformVersion": "11",
"appium:orientation": "PORTRAIT",
// `automationName` will be mandatory, see
// https://github.com/appium/appium/releases/tag/v1.13.0
"appium:automationName": "UiAutomator2",
"appium:newCommandTimeout": 240,
"goog:chromeOptions": {
w3c: true,
// Add this option to prevent the annoying "Welcome"-message
args: ["--no-first-run"],
},
},
Describe the bug
Not able to create a session with Appium. Getting error Unable to connect to "http://localhost:4723/", make sure browser driver is running on that address.
If I run Appium
instance separately then I get this error: ERROR webdriver: Error: The URL '/session' did not map to a valid resource
To Reproduce
I’m using the appium-boilerplate
, no changes made to it other than the deviceName
and platformVersion
Expected behavior Be able to run tests in Android simulator
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Appium failed to create session - android - Stack Overflow
1-In your device -> Settings -> Apps then search uiautomator , 2 apps will pop up . 2-Uninstall them. This error occurs when...
Read more >Failed to create appium session for android #458 - GitHub
I am using below mentioned capabilities to start session. I have tested in android physical device and emulator both but its not working...
Read more >Unable to start session from appium inspector - Issues/Bugs
I am getting error message when I try to start the session in Appium inspector: "Could not connect to server; are you sure...
Read more >An Appium server error occurred: Failed to create a new session
I try to run the sample file while watching the video, but I can't access the Appium Server due to the following error....
Read more >Appium server GUI returned error "No route found for /session ...
In, Appium inspector just add /wd/hub under field Remote Path enter image description here; Check it will start working now.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sam-022
Strange, do you have a version of Appium already running in the background? The boilerplate starts a session on its own, not using
/wd/hub
.If you run Appium as a separate service you need to set the basePath as
/
, see also below from https://webdriver.io/blog/2020/03/26/webdriverio-v6-released.htmlif you run it as a service you need to stop the current separate appium service, that’s why possibly get
connect ECONNREFUSED 127.0.0.1:4723
@wswebcreation I’m using the same boilerplate example, every time I run the test I get this error:
ERROR webdriver: Error: The URL '/session' did not map to a valid resource
For some reason, it’s not able to connect to/wd/hub
. Do you have any suggestions? Or, any other alternative way to get this running?