-
-
Notifications
You must be signed in to change notification settings - Fork 768
Description
Description
Hi All, I have observed that in Appium 8 we are facing issue while trying to start the Appium server programatically. As per the debug analysis, I could see that the Appium server is starting fine but the checkStatus call is failing because the URL is not formatted properly in case of a basepath. I am using Appium v1.22.0 CLI where I am providing the BasePath flag as "/wd/hub". I noticed that while starting the server, client is passing that as server argument but when it's trying to check the status it's always getting 404 because the code is trying to ping "/wd/status" instead of "/wd/hub/status". I looked up the code then realised that current addSufix code may need a fix to prevent the removal of "/hub" from the endpoint.
Environment
- Java client build version or git revision if you use some snapshot: v8.0.0
- Appium server version or git revision if you use some snapshot: v1.22.0
- Desktop OS/version used to run Appium if necessary: Mac
- Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: N/A
- Mobile platform/version under test: N/A
- Real device or emulator/simulator: N/A
Details
Noticed that while starting the server, client is passing that as server argument but when it's trying to check the status it's always getting 404 because the code is trying to ping "/wd/status" instead of "/wd/hub/status". I looked up the code then realised that current addSufix code may need a fix to prevent the removal of "/hub" from the endpoint.
Code To Reproduce Issue
AppiumDriverLocalService service = buildService(new AppiumServiceBuilder()
.withIPAddress("127.0.0.1")
.usingPort(Integer.parseInt("4723"))
.withArgument(GeneralServerFlag.BASEPATH, "/wd/hub")
.withAppiumJS(new File(APPIUM_JS_FILEPATH)) // replaced with appium CLI path (main.js)
.withArgument(GeneralServerFlag.LOG_LEVEL, "debug")
);
service.start()
Exception Stacktraces
https://gist.github.com/robinGupta11392/9b8780adda59ffe283b4f1fd6f428a93#file-gistfile1-txt