Last updated: Jul 18, 2019 18:17
The following error is received when executing a script:
It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
The issue occurs when "app" and "bundleId" capabilities are used together. Due to changes in Appium, you cannot use the following two capabilties together.
Per Appium's own GitHub information page, this is by design. You must use one or the other, independently. Use the bundleID capability, if testing only with an app. Use browserName, if testing only with mobile browsers.
Alternatively, you can set the bundle ID, as a string variable, instead of calling it as a capability. You can also do the same with the browser name.
String myWUT = "https://testsite.who";
String myAUT = "com.company.myapp";
The issue occurs when there is no trusted app on the device, and the capability of bundleID is used.
Upon installing an application, the old version of the application is uninstalled and if there is no other application signed by the same developer, the iOS Trusted settings will be reset. The newly installed application will not be Trusted.
When you connect to a device with the capability of an app, with the intent to start the app, you may receive this error because of the lack of trust.
The solution is to check the app on the device, and make sure that it is trusted, then run your automation.
The issue occurs when a connection is attempted to reach the cloud, but is blocked by your local proxy or firewall rules.
First step is to see if you can connect to your mobile cloud and open a device, from your desktop web browser of choice. If it passes, then the issue is most likely the security of your company and the IDE being used (Eclipse/IntelliJ/UFT/xFramium/etcetera)
Second step will be more challenging. In order to troubleshoot this issue, please put your IDE into debug mode. You will need to step through each step in debug mode, which should give the details of the API command that is failing.
Most reasons for this issue are an incorrect URL to the cloud (example: trying to use <yourLab>.perfecto.com instead of <yourLab>.perfectomobile.com). Please check your constructor and ensure that the host variable is set properly
String host = mycloud.perfectomobile.com;
AppiumDriver driver = new AppiumDriver(new URL("https://" + host + "/nexperience/perfectomobile/wd/hub"), capabilities);
Additional Notes IRT on this Error:
The error message is very generic. It could also be caused by other reasons i.e. device is offline, etcetera.
There is no content with the specified labels