TestProject Forum

Cannot start session with remote iOS device

I will describe the problem and post comprehensive information, feel free to ask for anything.

I want to run my Java coded tests in a remote iOS device connected to a Mac computer that has the TestProject Agent 2.1.1 installed. The device is already provisioned and reachable through my network as can be seen in this screenshot of the TestProject dashboard.

When I try to run the coded test remotely from my local automation framework based in the Java SDK I get the following exception

io.testproject.sdk.internal.exceptions.AgentConnectException: Could not complete the request to start a new session. Another program such as an antivirus/firewall seems to be interfering with the connection.

This exception appears to be related to a timeout. Then I tried the connection attempt through Postman in an effort to understand the problem. See the following screenshot.

As you can see by the screenshot, the session could not be created and the Agent returned an Internal Server error. In the device screen I see Safari opening and staying there for 1 minute or so before eventually closing, just at the same time as I get the error response from the server.

I transcribe the full message of the response below

> “org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Could not navigate to webview; there are none!\nBuild info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’\nSystem info: host: ‘Mac-mini-1-de-Amaris.local’, ip: ‘fe80:0:0:0:10f5:4e7b:74e7:a0%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.15.7’, java.version: ‘13.0.1’\nDriver info: driver.version: AppiumDriver\nremote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not navigate to webview; there are none!\n at getResponseForW3CError (/_enclose_io_memfs_/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)\n at asyncHandler (/_enclose_io_memfs_/node_modules/appium-base-driver/lib/protocol/protocol.js:392:37)\nBuild info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’\nSystem info: host: ‘Mac-mini-1-de-Amaris.local’, ip: ‘fe80:0:0:0:10f5:4e7b:74e7:a0%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.15.7’, java.version: ‘13.0.1’\nDriver info: driver.version: AppiumDriver”

NOTE: I have logs for both the agent and Appium and willing to provide them to TestProject staff.

See some data about the agent and the device below

AGENT


DEVICE

Hey pablo,
Does this issue happen only when you run your coded tests remotely or on scriptless tests to?
Have you tried running your coded tests on a device that is plugged in locally?
Also are you using any kind of VPN/Proxy/firewall on the target device?
If everything is working for you except when executing on a remote agent, please send us your logs at our support chat tagging this forum thread for further assistance.

Hi amit, thank you for your response
It only happens with coded tests running on a remote agent, I have not tried to do it locally as I do not have access to the physical devices, the agent is available to me through a VPN.

Sorry, where can I find your support chat ?

You can find the support chat here:

If it’s possible for someone inside the network to execute your tests it’s a good idea to rule out the VPN as a cause.
Also if possible try to execute a script-less test on your target machine.

Finally we have found the cause of the problem, the web inspector and remote automation were disabled in the device.