How to fix “request was received using an HTTP method that is not supported by the mapped resource”

When I ran the code below, i m observing the error as WebDriverException: Message: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource

Code
*** Settings ***
Library AppiumLibrary
*** Variables ***
#Shared
${newCommandTimeout} 120
${eventTimings} true
${printPageSourceOnFindFailure} true
${appium_host} http://172.23.230.134:4723/ #port no to interact server mac

#Android

App Info

${app_Activity} com.logue.ui.activity.SplashActivity #app_activity
${app_Package} com.logue

Mobile and OS details

${platform_Name_Android} Android
${Android_OS} 14 #OS version
${Pixel_4a} R5CT126FWHA #Device Name
${ANDROID_AUTOMATION_NAME} UIAutomator2

*** Keywords ***
Open App Andriod
Open Application ${appium_host}
… appActivity=${app_Activity} appPackage=${app_Package} platformName=${platform_Name_Android} platformVersion=${Android_OS} newCommandTimeout=${newCommandTimeout} noReset=true automationName=${ANDROID_AUTOMATION_NAME}

*** Test Cases ***
Test to open android
Open App Andriod

System information
Appium v2.6.0

  • xcuitest@7.24.1 [installed (npm)]
  • uiautomator2@3.7.4 [installed (npm)]
  • Vscode 1.86.2

Is this a first time setup, or was it working before and some change made it stop working?

this a first time setup

Appium server, needs the drivers installed. You mentioned installed with npm, but I don’t know if that is the correct way.

Note: Now I see your output is similar.

See my installed drivers (MacOS Catalina):

$ appium driver list
✔ Listing available drivers
- uiautomator2@3.5.2 [installed (npm)]
- xcuitest@7.16.2 [installed (npm)]
- mac2 [not installed]
- espresso [not installed]
- safari [not installed]
- gecko [not installed]
- chromium [not installed]

Note: My appium is version 2.5.4, but should be the same process.

Ýou did not pass the deviceName=${Pixel_4a}.

Please find below appium driver installed in my mac book
:heavy_check_mark: Listing available drivers

  • xcuitest@7.24.1 [installed (npm)]

  • uiautomator2@3.7.4 [installed (npm)]

  • espresso [not installed]

  • mac2 [not installed]

  • windows [not installed]

  • safari [not installed]

  • gecko [not installed]

  • chromium [not installed]

Did you experimented with this argument?

@HelioGuilherme66 I did add it and still getting the same error