TestProject Forum

Why iphone 12 mini always disconnect with testproject agent?

The first time I ran it, it was still very smooth, and then I lost the connection when I called the real device the second time.
below is error code:
2021-10-20 16:36:50,447 ERROR Failed to initialize a session with the Agent
Traceback (most recent call last):
File “test_demo2.py”, line 207, in
test_main()
File “test_demo2.py”, line 51, in test_main
desired_capabilities=capabilities)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/src/testproject/sdk/drivers/webdriver/remote.py”, line 102, in init
report_settings=report_settings,
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/src/testproject/sdk/internal/agent/agent_client_singleton.py”, line 31, in call
cls._instances[cls] = super(AgentClientSingleton, cls).call(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/src/testproject/sdk/internal/agent/agent_client.py”, line 100, in init
self.__start_session()
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/src/testproject/sdk/internal/agent/agent_client.py”, line 143, in __start_session
self._request_session_from_agent()
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/src/testproject/sdk/internal/agent/agent_client.py”, line 219, in _request_session_from_agent
self.__handle_new_session_error(response)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/src/testproject/sdk/internal/agent/agent_client.py”, line 484, in __handle_new_session_error
f"Agent responded with HTTP status {response.status_code}: [{response.message}]"
src.testproject.sdk.exceptions.agentconnectexception.AgentConnectException: Agent responded with HTTP status 500: [org.openqa.selenium.SessionNotCreatedException: Failed to create automation session on iPhone12mini. Please Restart your device and try again.
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘simonmacmini.ad.harman.com’, ip: ‘fe80:0:0:0:4c1:19c:36af:f776%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.16’, java.version: ‘13.0.1’
Driver info: driver.version: unknown]

Recently i debug this issue found that caused by hadn’t closed APP, maybe last one process hadn’t close can effect new one.@testproject developer it is truth?