Having issues running my first appium test

I’m trying to run my first appium test but I’m getting this response and I can’t seem to know what is wrong.
I’ve tried different fixes online but my test isn’t passing.
I installed wdio cli
Operating system: Mac
Appium desktop

Places I made changes

  1. In wdio.conf.js, I added the appium port.

  2. In capabilities, I added this;

This is the response from the terminal

2021-07-10T20:12:50.432Z INFO @wdio/cli:launcher: Run onPrepare hook
Failed to connect to selenium. Attempts left: 25
connect ECONNREFUSED 127.0.0.1:4444
Failed to connect to selenium. Attempts left: 20
connect ECONNREFUSED 127.0.0.1:4444
2021-07-10T20:17:38.899Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2021-07-10T20:17:38.900Z INFO @wdio/local-runner: Start worker 0-0 with arg: wdio.conf.js
[0-0] 2021-07-10T20:17:41.599Z INFO @wdio/local-runner: Run worker command: run
[0-0] RUNNING in Android - /test/specs/sample.test.js
[0-0] 2021-07-10T20:17:42.342Z INFO webdriver: Initiate new session using the WebDriver protocol
[0-0] 2021-07-10T20:17:42.343Z INFO webdriver: [POST] http://127.0.0.1:4723/session
[0-0] 2021-07-10T20:17:42.343Z INFO webdriver: DATA {
[0-0] capabilities: {
[0-0] alwaysMatch: {
[0-0] platformName: ‘Android’,
[0-0] ‘appium:deviceName’: ‘Pixel 3’,
[0-0] ‘appium:app’: ‘/Users/amaechionyi/Documents/appium_my/ApiDemos-debug.apk’
[0-0] },
[0-0] firstMatch: [ {} ]
[0-0] },
[0-0] desiredCapabilities: {
[0-0] platformName: ‘Android’,
[0-0] ‘appium:deviceName’: ‘Pixel 3’,
[0-0] ‘appium:app’: ‘/Users/amaechionyi/Documents/appium_my/ApiDemos-debug.apk’
[0-0] }
[0-0] }
[0-0] (node:51466) DeprecationWarning: “Runner(suite: Suite, delay: boolean)” is deprecated. Use “Runner(suite: Suite, {delay: boolean})” instead.
[0-0] (Use node --trace-deprecation ... to show where the warning was created)
[0-0] 2021-07-10T20:17:42.654Z WARN webdriver: Request failed with status 404 due to The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
[0-0] 2021-07-10T20:17:42.654Z INFO webdriver: Retrying 1/3
[0-0] 2021-07-10T20:17:42.656Z INFO webdriver: [POST] http://127.0.0.1:4723/session
[0-0] 2021-07-10T20:17:42.656Z INFO webdriver: DATA {
[0-0] capabilities: {
[0-0] alwaysMatch: {
[0-0] platformName: ‘Android’,
[0-0] ‘appium:deviceName’: ‘Pixel 3’,
[0-0] ‘appium:app’: ‘/Users/amaechionyi/Documents/appium_my/ApiDemos-debug.apk’
[0-0] },
[0-0] firstMatch: [ {} ]
[0-0] },
[0-0] desiredCapabilities: {
[0-0] platformName: ‘Android’,
[0-0] ‘appium:deviceName’: ‘Pixel 3’,
[0-0] ‘appium:app’: ‘/Users/amaechionyi/Documents/appium_my/ApiDemos-debug.apk’
[0-0] }
[0-0] }
[0-0] 2021-07-10T20:17:42.683Z WARN webdriver: Request failed with status 404 due to The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
[0-0] 2021-07-10T20:17:42.683Z INFO webdriver: Retrying 2/3
[0-0] 2021-07-10T20:17:42.683Z INFO webdriver: [POST] http://127.0.0.1:4723/session
[0-0] 2021-07-10T20:17:42.683Z INFO webdriver: DATA {
[0-0] capabilities: {
[0-0] alwaysMatch: {
[0-0] platformName: ‘Android’,
[0-0] ‘appium:deviceName’: ‘Pixel 3’,
[0-0] ‘appium:app’: ‘/Users/amaechionyi/Documents/appium_my/ApiDemos-debug.apk’
[0-0] },
[0-0] firstMatch: [ {} ]
[0-0] },
[0-0] desiredCapabilities: {
[0-0] platformName: ‘Android’,
[0-0] ‘appium:deviceName’: ‘Pixel 3’,
[0-0] ‘appium:app’: ‘/Users/amaechionyi/Documents/appium_my/ApiDemos-debug.apk’
[0-0] }
[0-0] }
[0-0] 2021-07-10T20:17:42.703Z WARN webdriver: Request failed with status 404 due to The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
[0-0] 2021-07-10T20:17:42.711Z ERROR webdriver: Request failed with status 404 due to unknown command: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
[0-0] 2021-07-10T20:17:42.711Z ERROR webdriver: unknown command: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
[0-0] at Object.getErrorFromResponseBody (/Users/amaechionyi/Documents/appium_my/node_modules/webdriver/build/utils.js:189:12)
[0-0] at WebDriverRequest._request (/Users/amaechionyi/Documents/appium_my/node_modules/webdriver/build/request.js:168:31)
[0-0] at processTicksAndRejections (internal/process/task_queues.js:95:5)
[0-0] at async Object.startWebDriverSession (/Users/amaechionyi/Documents/appium_my/node_modules/webdriver/build/utils.js:63:20)
[0-0] at async Function.newSession (/Users/amaechionyi/Documents/appium_my/node_modules/webdriver/build/index.js:58:45)
[0-0] at async Object.remote (/Users/amaechionyi/Documents/appium_my/node_modules/webdriverio/build/index.js:67:22)
[0-0] at async Runner._startSession (/Users/amaechionyi/Documents/appium_my/node_modules/@wdio/runner/build/index.js:216:56)
[0-0] at async Runner._initSession (/Users/amaechionyi/Documents/appium_my/node_modules/@wdio/runner/build/index.js:172:25)
[0-0] at async Runner.run (/Users/amaechionyi/Documents/appium_my/node_modules/@wdio/runner/build/index.js:87:19)
[0-0] 2021-07-10T20:17:42.711Z ERROR @wdio/runner: Error: Failed to create session.
[0-0] The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
[0-0] at Object.startWebDriverSession (/Users/amaechionyi/Documents/appium_my/node_modules/webdriver/build/utils.js:68:15)
[0-0] at processTicksAndRejections (internal/process/task_queues.js:95:5)
[0-0] at async Function.newSession (/Users/amaechionyi/Documents/appium_my/node_modules/webdriver/build/index.js:58:45)
[0-0] at async Object.remote (/Users/amaechionyi/Documents/appium_my/node_modules/webdriverio/build/index.js:67:22)
[0-0] at async Runner._startSession (/Users/amaechionyi/Documents/appium_my/node_modules/@wdio/runner/build/index.js:216:56)
[0-0] at async Runner._initSession (/Users/amaechionyi/Documents/appium_my/node_modules/@wdio/runner/build/index.js:172:25)
[0-0] at async Runner.run (/Users/amaechionyi/Documents/appium_my/node_modules/@wdio/runner/build/index.js:87:19)
[0-0] 2021-07-10T20:17:42.703Z INFO webdriver: Retrying 3/3
[0-0] 2021-07-10T20:17:42.703Z INFO webdriver: [POST] http://127.0.0.1:4723/session
[0-0] 2021-07-10T20:17:42.703Z INFO webdriver: DATA {
[0-0] capabilities: {
[0-0] alwaysMatch: {
[0-0] platformName: ‘Android’,
[0-0] ‘appium:deviceName’: ‘Pixel 3’,
[0-0] ‘appium:app’: ‘/Users/amaechionyi/Documents/appium_my/ApiDemos-debug.apk’
[0-0] },
[0-0] firstMatch: [ {} ]
[0-0] },
[0-0] desiredCapabilities: {
[0-0] platformName: ‘Android’,
[0-0] ‘appium:deviceName’: ‘Pixel 3’,
[0-0] ‘appium:app’: ‘/Users/amaechionyi/Documents/appium_my/ApiDemos-debug.apk’
[0-0] }
[0-0] }
[0-0] FAILED in Android - /test/specs/sample.test.js
2021-07-10T20:17:42.831Z INFO @wdio/cli:launcher: Run onComplete hook
2021-07-10T20:17:42.831Z INFO @wdio/selenium-standalone-service: shutting down all browsers

Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:04:52

2021-07-10T20:17:42.834Z INFO @wdio/local-runner: Shutting down spawned worker
2021-07-10T20:17:43.088Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2021-07-10T20:17:43.089Z INFO @wdio/local-runner: shutting down

I think your app path was not correct

kindly recheck your file path and try again

@NAGARJUNA_MALLEMKOND trust me, the path is correct.
I had to drag the file and paste in terminal so it’d give me the path… just to be very sure.