Skip to content

Execute adb shell logcat timeout #324

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

Closed
felipetortella opened this issue Aug 17, 2021 · 3 comments
Closed

Execute adb shell logcat timeout #324

felipetortella opened this issue Aug 17, 2021 · 3 comments

Comments

@felipetortella
Copy link
Contributor

I'm trying to run 'execute adb shell' command with logcat but sometimes I'm getting:

WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Cannot execute the 'logcat -d -e ^.*ENTM.*$' shell command. Original error: Command 'C:\\Users\\xxxxxx\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s R3CM404B3NP shell 'logcat -d -e ^.*ABCD.*$' timed out after 20000ms. StdOut: --------- beginning of main

${logcat}= execute adb shell logcat -d -e ^.ABCD.$
Should Contain ${logcat} ABCD

This happens because the logcat is to big. If I do 'logcat -c' to clean it, it works fine. But for my test I should not do that.
There is any way to increase this 20000ms timeout from ADB? I saw that for application there is newCommandTimeout, but I could not make it work in this case.

What I'm using:

System
robotframework-appiumlibrary 1.6.2
robotframework 4.1

appium --relaxed-security --shell
appium --version
1.21.0

@felipetortella
Copy link
Contributor Author

felipetortella commented Aug 24, 2021

Hi @serhatbolsu
I was able to make a workaround building the lib in local env with this new keyword

image

Please, let me know if it's ok if I submit it as PR
I have based on appium documentation
http://appium.io/docs/en/writing-running-appium/android/android-shell/#supported-arguments

I'm just not sure if we can change existing method or create a new one. Because of *args in implemented method, I could not make it work with method overloading :(

@serhatbolsu
Copy link
Owner

Thanks @felipetortella I think this deserve a new keyword to satisfy backward capability. please share the pr

@felipetortella
Copy link
Contributor Author

Already integrated
#328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants