-
-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket hang up after 60 seconds of inactivity #466
Comments
the press_keycode is probably the below in the logcat. Only one command existed around the similar timeline.
I wonder the adb port forward got an issue temporary at that time, so the 2nd press_keycode reached while the 1st one did not... |
+1, I am seeing this exact same issue in some code I am running, where the newCommandTimeout is being set high (e.g. 300 seconds), but commands which wait around 60 seconds will see a "READER_IDLE: closing the channel" logcat line and a "socket hang up" response in Appium. I am going to work around the issue from the client's side by retrying 500 error code responses, based on the following: |
Environment
Driver: UIAutomator2 4.27.0
Device: Android 9 device, real or emulated
Server: Appium 1.22.3
Client: Appium-Python-Client 2.1.4
How to reproduce
Wait exactly 60 seconds between 2 driver call. Randomly, the following exception is raised:
Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
Additions
Workaround
Depending on needs, if we wait 59s or 61s, the problem does not occur
Stats & Randomness
I try to reproduce it with random delays around 60s. to identify the worst case scenario. I obtained the following results:
The actual data generated with all test results and timings:
2022_04_04_12_07_56_log.csv
Logs
appium server logs:
appium-server-logs.log
all logcats after failure:
logcats.zip
Reproducing test
All the data above has been produced with the following script
The text was updated successfully, but these errors were encountered: