TestProject Forum

Display device screen failed

I was using TestProject recording normally until 5/2/2021, but today (8/2/2021) when I was trying to record some test cases, it keeps failing and returns me the message: “Display device screen failed. Failed to connect to device agent”. Nothing has changed in my system or devices used in testing, same laptop, mobile devices, network.
I have tried uninstalling the local agent, installed a new one then registered it. Wiped mobiles data, reset mobiles, switched network, turned off computer firewall. None of that helps.
I downloaded the agent log and saw these log below:

“2021-02-08 14:45:51.342 INFO 13216 auth-entry i.t.a.m.c.e Appium_Android Driver initialized.
2021-02-08 14:45:54.560 INFO 13216 start-appium i.t.a.b.a.d GET https://api.testproject.io/api/v1/element-types?_embed=xPath - 200 (nqITGdM4): null
2021-02-08 14:45:55.000 INFO 13216 start-appium i.t.a.m.r.d Recording session started successfully.
2021-02-08 14:45:55.000 INFO 13216 start-appium i.t.a.m.z Updated state to: Recording
2021-02-08 14:45:55.002 INFO 13216 idle-entry i.t.a.b.b.d Reporting state: Recording
2021-02-08 14:45:59.430 INFO 13216 qtp967041936-12 i.t.a.w.r.e.a.RecordingEndpoints Received request to update recording session parameters
2021-02-08 14:45:59.440 INFO 13216 qtp967041936-12 i.t.a.w.r.e.a.RecordingEndpoints Received request to update recording session parameters
2021-02-08 14:46:07.455 ERROR 13216 pool-3-thread-7 i.t.a.b.a.d GET https://api.testproject.io/api/v1/agent/tokens?type=DeviceInteraction - 404 (6IlxNfO6): null
2021-02-08 14:46:07.455 INFO 13216 pool-3-thread-7 i.t.a.b.b.d Token DeviceInteraction is invalid
2021-02-08 14:46:08.336 ERROR 13216 pool-3-thread-7 i.t.a.b.a.d GET https://api.testproject.io/api/v1/agent/tokens?type=DeviceInteraction - 404 (4dvT43Bu): null
2021-02-08 14:46:08.337 INFO 13216 pool-3-thread-7 i.t.a.b.b.d Token DeviceInteraction is invalid
2021-02-08 14:46:08.602 ERROR 13216 pool-3-thread-7 i.t.a.b.a.d GET https://api.testproject.io/api/v1/agent/tokens?type=DeviceInteraction - 404 (CdLBfIyc): null
2021-02-08 14:46:08.602 INFO 13216 pool-3-thread-7 i.t.a.b.b.d Token DeviceInteraction is invalid
2021-02-08 14:46:09.736 INFO 13216 qtp967041936-11 i.t.a.w.b.h io.testproject.agent.webserver.b.h c6cbf12f-be1f-48f4-9ecb-74d137371606 #0 disconnected: [1005] null
2021-02-08 14:46:09.971 INFO 13216 state-machine i.t.a.e.a.S Ending recording mode…
2021-02-08 14:46:09.985 INFO 13216 idle-entry i.t.a.e.a.F Account plan: Free
2021-02-08 14:46:10.663 INFO 13216 idle-entry i.t.a.m.z Updated state to: Idle
2021-02-08 14:46:10.664 INFO 13216 idle-entry i.t.a.b.b.d Reporting state: Idle
2021-02-08 14:46:10.838 INFO 13216 start-appium i.t.a.b.a.d GET https://api.testproject.io/api/v1/agent/tokens?type=Recording&token=deleted by TestPrject admin - 200 (USv11JUO): null
2021-02-08 14:46:10.839 INFO 13216 start-appium i.t.a.b.b.d Token Recording is valid
2021-02-08 14:46:12.042 INFO 13216 ForkJoinPool.co i.t.a.h.m Found 0 processes with requested filters [Name equals “chromedriver.exe” ]
2021-02-08 14:46:12.043 INFO 13216 ForkJoinPool.co i.t.a.h.m Done killing processes.
2021-02-08 14:46:12.838 INFO 13216 start-appium i.t.a.b.a.d GET https://api.testproject.io/api/v1/agent/tokens?type=Recording&token=deleted by TestProject Admin- 200 (syJ0FGaX): null
2021-02-08 14:46:12.838 INFO 13216 start-appium i.t.a.b.b.d Token Recording is valid”

I don’t know what causes this but now I cannot get any of my devices to display the screen on record mode.
I can execute job/ single case run normally, but I cannot use the recording mode at all. Please help me out!

hi , can you please do the following: shut down the agent, delete your agent from the agent tabs, delete the following files from he agent folder, then turn it on and try to register the agent again?

Hi, where would someone find these files. I have found the Agent folder within Program Files but nothing that matches your screenshots folder structure?

Thanks for your guide, however I can’t find the similar files in your screenshot. Can you please provide a detail folder/file path where I can find these files. This is what my TestProject Agent folder looks like.

1 Like

here under the user profile \ app data

Hey, I found the folder you told me about. Follow your guide, but it still happens

Ok, there are connectivity related issues in some of the geolocations at world at the moment, it might be related to that. The infrastructure team is working to fix it. should be solved within the next hours or so. We will post here once it sorted.

1 Like

Thank you so much for your help.

should be back to normal now, please confirm or let us know if you still experience any issues

Hi, I just updated TestProject Agent with the new version 0.65.43 and unfortunately, it still didn’t work. The same error is happening. The agent log looks similar to the previous time.

2021-02-09 09:18:24.862 INFO 13952 pool-3-thread-8 i.t.a.m.e.s Attempt #0 to initialize Appium_Android session on FA6AN0302488
2021-02-09 09:18:25.109 INFO 13952 idle-entry i.t.a.m.e.v UIAutomator Server exited on FA6AN0302488
2021-02-09 09:18:25.136 INFO 13952 idle-entry i.t.a.m.c.e Initializing driver Appium_Android…
2021-02-09 09:18:25.341 INFO 13952 idle-entry i.t.a.m.e.j Installing Appium Settings 2.16.2 on device FA6AN0302488
2021-02-09 09:18:35.390 INFO 13952 idle-entry i.t.a.m.c.e Appium_Android Driver initialized.
2021-02-09 09:18:39.749 INFO 13952 start-appium i.t.a.b.a.d GET https://api.testproject.io/api/v1/element-types?_embed=xPath - 200 (Ry3KbbSr): null
2021-02-09 09:18:40.444 INFO 13952 start-appium i.t.a.m.r.d Recording session started successfully.
2021-02-09 09:18:40.445 INFO 13952 start-appium i.t.a.m.z Updated state to: Recording
2021-02-09 09:18:40.445 INFO 13952 pool-3-thread-8 i.t.a.b.b.d Reporting state: Recording
2021-02-09 09:18:47.385 INFO 13952 qtp573509357-12 i.t.a.w.r.e.a.RecordingEndpoints Received request to update recording session parameters
2021-02-09 09:18:47.405 INFO 13952 qtp573509357-11 i.t.a.w.r.e.a.RecordingEndpoints Received request to update recording session parameters
2021-02-09 09:18:53.143 ERROR 13952 start-appium i.t.a.b.a.d GET https://api.testproject.io/api/v1/agent/tokens?type=DeviceInteraction - 404 (RdyGWxYN): null
2021-02-09 09:18:53.145 INFO 13952 start-appium i.t.a.b.b.d Token DeviceInteraction is invalid
2021-02-09 09:18:54.606 ERROR 13952 start-appium i.t.a.b.a.d GET https://api.testproject.io/api/v1/agent/tokens?type=DeviceInteraction - 404 (WtZ6zcSB): null
2021-02-09 09:18:54.607 INFO 13952 start-appium i.t.a.b.b.d Token DeviceInteraction is invalid
2021-02-09 09:18:56.089 ERROR 13952 start-appium i.t.a.b.a.d GET https://api.testproject.io/api/v1/agent/tokens?type=DeviceInteraction - 404 (rBmO6Ivy): null
2021-02-09 09:18:56.090 INFO 13952 start-appium i.t.a.b.b.d Token DeviceInteraction is invalid
2021-02-09 09:19:01.022 INFO 13952 qtp573509357-12 i.t.a.w.b.h io.testproject.agent.webserver.b.h 361c113a-b993-4704-89cd-7ed7c1d2ac26 #0 disconnected: [1005] null
2021-02-09 09:19:01.315 INFO 13952 state-machine i.t.a.e.a.S Ending recording mode…
2021-02-09 09:19:01.336 INFO 13952 idle-entry i.t.a.e.a.F Account plan: Free
2021-02-09 09:19:02.792 INFO 13952 idle-entry i.t.a.m.z Updated state to: Idle
2021-02-09 09:19:02.793 INFO 13952 idle-entry i.t.a.b.b.d Reporting state: Idle
2021-02-09 09:19:03.400 INFO 13952 pool-3-thread-8 i.t.a.b.a.d GET https://api.testproject.io/api/v1/agent/tokens?type=Recording&token=f1yUVh9-zneuQQciBJoqDCXhHrtnj62xZungQ5T2l9I1 - 200 (3c9DsGYr): null
2021-02-09 09:19:03.401 INFO 13952 pool-3-thread-8 i.t.a.b.b.d Token Recording is valid
2021-02-09 09:19:06.202 INFO 13952 ForkJoinPool.co i.t.a.h.m Found 0 processes with requested filters [Name equals “chromedriver.exe” ]
2021-02-09 09:19:06.203 INFO 13952 ForkJoinPool.co i.t.a.h.m Done killing processes.

Please help me out.

@Mark_K Hi, I have tried again on 12/02 with the new version 0.65.45 of TestProject. I deleted the registered agent on the Agents tab, wiped clean TestProject agent data in the AppData folder, after that I installed the new version. Things still were the same to me, same errors, same logs. Please help me out, a major part of my work project depends on this.

It should work, does it happens when you try to launch any type of application on the device including native app? what happens if you just do screen mirroring? Can you try to locate Appium app on the device and remove it and lunch new recording session? if all that doesn’t works for you please send an email to support@testproject.io with time that works for your for a zoom session with one of the developers.

Hi, I have tried various mobile applications on my device. It gave me this everytime.

. I did try uninstalled Appium app but still no success.

Hello @duong,

I’d like to schedule a Zoom call with you to troubleshoot the issue, can you please email support@testproject.io and I’ll follow-up ASAP?

Please include the entire Agent logs zip file in the email.