Skip to content
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

esg->redroid: appium shouldn't start for offline device #198

Closed
vdelendik opened this issue Aug 8, 2023 · 6 comments
Closed

esg->redroid: appium shouldn't start for offline device #198

vdelendik opened this issue Aug 8, 2023 · 6 comments
Labels
bug Something isn't working
Milestone

Comments

@vdelendik
Copy link
Contributor

in scope of redroid video recording we must switch into the root to be able to record into "/sdcard" folder.
let's arrange one more verification after switch to avoid appium start for offline device/emulator

[ec2-user@ip-172-64-2-63 tools]$ docker logs 48acf0b97e1f
ENTRYPOINT_DIR: /opt/entrypoint
* daemon not running; starting now at tcp:5037
* daemon started successfully
Connecting to: device:5555
connected to device:5555
device:5555     device
Connected to: device:5555.
adb: failed to stat /tmp/zebrunner/chrome/latest.apk: No such file or directory
Performing Streamed Install
adb: failed to stat /usr/lib/node_modules/appium/node_modules/io.appium.settings/apks/settings_apk-debug.apk: No such file or directory
Performing Streamed Install
restarting adbd as root
Connecting as root to: device:5555
failed to connect to 'device:5555': Connection refused
device:5555     offline
Connected as root to: device:5555.
List of devices attached
device:5555     offline

adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
xvfb-run appium --log-no-colors --log-timestamp -pa /wd/hub --port 4723 --log /tmp/log/appium.log --allow-insecure chromedriver_autodownload
waiting for Appium start...
waiting for the session start...
2023-08-08 11:30:31:802 - [Appium] [A
@vdelendik vdelendik added the bug Something isn't working label Aug 8, 2023
@vdelendik vdelendik added this to the 2.0 milestone Aug 8, 2023
@vdelendik
Copy link
Contributor Author

it is fixed indirectly after resolving #201 and updated healtchcheck on esg level.
for testing it would be great to find 100-200 branch using latest carina and execute mass redroid scenarion on eorg esg tenant using redroid versions:
13.0.0
12.0.0

@vdelendik
Copy link
Contributor Author

still repro:

[ec2-user@ip-172-64-5-45 ~]$ docker logs -f d6f95ff58fd6
ENTRYPOINT_DIR: /opt/entrypoint
* daemon not running; starting now at tcp:5037
* daemon started successfully
Connecting to: device:5555
failed to connect to 'device:5555': Connection refused
Connecting to: device:5555
failed to connect to 'device:5555': Connection refused
Connecting to: device:5555
failed to connect to 'device:5555': Connection refused
Connecting to: device:5555
failed to connect to 'device:5555': Connection refused
Connecting to: device:5555
connected to device:5555
device:5555     device
Connected to: device:5555.


adb: failed to install /tmp/zebrunner/chrome/latest.apk: cmd: Can't find service: package
Performing Streamed Install
adb: device offline
List of devices attached
device:5555     offline

adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
adb: device offline
xvfb-run appium --log-no-colors --log-timestamp -pa /wd/hub --port 4723 --log /tmp/log/appium.log --allow-insecure chromedriver_autodownload
waiting for Appium start...

we have to add extra verification at the end to avoid appium startup and healthy state

@vdelendik vdelendik reopened this Aug 10, 2023
@vdelendik vdelendik modified the milestones: 2.0, 2.1 Aug 10, 2023
@vdelendik
Copy link
Contributor Author

moved to 2.1 because appium in this case can reconnect on it's own. under the question mobile web tests as we couldn't install chrome.apk for such case.
in scope of 2.0 made appium settings apk 1st and chrome 2nd

@vdelendik
Copy link
Contributor Author

https://vd2.zebrunner.org/projects/DEF/automation-launches/3671
so far so good in 2.0.x^^^

@vdelendik vdelendik modified the milestones: 2.1, 2.0.15 Mar 19, 2024
@vdelendik
Copy link
Contributor Author

it should be fixed in appium:2.0.15

@dhreben
Copy link
Contributor

dhreben commented Mar 22, 2024

Verified.

log:

at index 18: 'com.android.chrome/'
03-22 13:31:34.953  77  86 I adb   : transport.cpp:339 device:5555: read failed: Success
03-22 13:31:34.953  77  86 I adb   : transport.cpp:1253 device:5555: connection terminated: read failed
03-22 13:31:34.953  77  77 I adb   : adb.cpp:180 device:5555: offline
03-22 13:31:34.954  77  77 I adb   : transport.cpp:936 destroying transport device:5555
03-22 13:31:34.954  77  77 I adb   : transport.cpp:407 BlockingConnectionAdapter(device:5555): stopping
03-22 13:31:34.954  77  77 I adb   : transport.cpp:425 BlockingConnectionAdapter(device:5555): stopped
2024-03-22 13:31:34:955 - [Logcat] Logcat terminated with code 0, signal null
2024-03-22 13:31:34:955 - [Logcat] Logcat not started. Continuing
2024-03-22 13:31:34:976 - [AndroidUiautomator2Driver@bfb2 (39470a7c)] Unable to stop ChromeDriver proxies: Cannot read properties of undefined (reading 'proxyReqRes')
2024-03-22 13:31:34:982 - [AndroidUiautomator2Driver@bfb2 (39470a7c)] Restoring hidden api policy to the device default configuration
2024-03-22 13:31:35:014 - [HTTP] <-- POST /wd/hub/session 500 1862 ms - 1274
2024-03-22 13:31:35:014 - [HTTP] 
2024-03-22 13:31:35:025 - [AndroidUiautomator2Driver@bfb2 (39470a7c)] Unable to persist mock location app id 'io.appium.settings': Error executing adbExec. Original error: 'Command '/opt/android/platform-tools/adb -P 5037 -s device\:5555 shell mkdir -p /data/local/tmp' exited with code 1'; Command output: adb: device offline
2024-03-22 13:31:35:025 - [AndroidUiautomator2Driver@bfb2 (39470a7c)] 
on finish begin
[warn] sessionId is empty on finish!
on finish end
Exit status: 143
exit_code: 143

log :

WARN Appium Appium encountered 2 warnings while validating drivers found in manifest /usr/lib/node_modules/appium/node_modules/.cache/appium/extensions.yaml
WARN Appium Driver "uiautomator2" has 1 potential problem: 
WARN Appium  - Driver "uiautomator2" (package `appium-uiautomator2-driver`) may be incompatible with the current version of Appium (v2.2.2) due to its peer dependency on older Appium v^2.4.1. Please upgrade `appium-uiautomator2-driver` to v3.0.4 or newer.
- Listing available plugins
✔ Listing available plugins
- images [not installed]
- execute-driver [not installed]
- relaxed-caps [not installed]
- universal-xml [not installed]
03-22 13:40:49.966  77  77 I adb   : auth.cpp:416 adb_auth_init...
03-22 13:40:49.966  77  77 I adb   : auth.cpp:220 User key '/root/.android/adbkey' does not exist...
03-22 13:40:49.966  77  77 I adb   : auth.cpp:64 generate_key(/root/.android/adbkey)...
03-22 13:40:50.036  77  77 I adb   : auth.cpp:152 loaded new key from '/root/.android/adbkey' with fingerprint E10F86B9DD3512D79FE53355E455084F93197BEBEDE488B3A73B5459D8FB4BE3
03-22 13:40:50.036  77  77 I adb   : auth.cpp:391 adb_auth_inotify_init...
Connecting to: device:5556
03-22 13:40:51.990  77  85 W adb   : network.cpp:149 failed to connect to 'device:5556': Connection refused
failed to connect to 'device:5556': Connection refused
Connecting to: device:5556
03-22 13:40:56.995  77  91 W adb   : network.cpp:149 failed to connect to 'device:5556': Connection refused
failed to connect to 'device:5556': Connection refused
Connecting to: device:5556
03-22 13:41:02.000  77  97 W adb   : network.cpp:149 failed to connect to 'device:5556': Connection refused
failed to connect to 'device:5556': Connection refused
Connecting to: device:5556
03-22 13:41:07.004  77  103 W adb   : network.cpp:149 failed to connect to 'device:5556': Connection refused
failed to connect to 'device:5556': Connection refused
Connecting to: device:5556
03-22 13:41:12.009  77  119 W adb   : network.cpp:149 failed to connect to 'device:5556': Connection refused
failed to connect to 'device:5556': Connection refused
Connecting to: device:5556
03-22 13:41:17.013  77  125 W adb   : network.cpp:149 failed to connect to 'device:5556': Connection refused
failed to connect to 'device:5556': Connection refused
Connecting to: device:5556
03-22 13:41:22.018  77  131 W adb   : network.cpp:149 failed to connect to 'device:5556': Connection refused
failed to connect to 'device:5556': Connection refused
Connecting to: device:5556
03-22 13:41:27.022  77  137 W adb   : network.cpp:149 failed to connect to 'device:5556': Connection refused
failed to connect to 'device:5556': Connection refused
Connecting to: device:5556
03-22 13:41:32.027  77  143 W adb   : network.cpp:149 failed to connect to 'device:5556': Connection refused
failed to connect to 'device:5556': Connection refused
Connecting to: device:5556
03-22 13:41:37.032  77  159 W adb   : network.cpp:149 failed to connect to 'device:5556': Connection refused
failed to connect to 'device:5556': Connection refused
Device device:5556 is not connected!
Exiting without restarting...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants