In your code if you are using appium server URL with /wd/hub, then please start Appium also with ‘--base-path=/wd/hub’
Or take out /wd/hub from the appium server URL.