Logcat empty on some devices since
See original GitHub issueThe problem
Briefly describe the issue you are experiencing (or the feature you want to see added to Appium). Tell us what you were trying to do and what happened instead. Remember, this is not a place to ask questions. For that, go to http://discuss.appium.io!
Since Android platform-tools 28.0.1, some devices (i.e. my LG G6), have problems with logcat output. i.e. “adb logcat” output is empty, while “adb shell logcat” does output the logcat contents.
Is there a way to switch Appium to use the “adb shell” command, or make the shell output default?
Environment
- Appium version (or git revision) that exhibits the issue: 1.17.1
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium: Windows 10/ OSX
- Node.js version (unless using Appium.app|exe):
- Npm or Yarn package manager:
- Mobile platform/version under test: Android
- Real device or emulator/simulator: Device LG G6
- Appium CLI or Appium.app|exe: Appium CLI and/or Appium.app|exe
Details
If necessary, describe the problem you have been experiencing in more detail.
This thread pretty much describes the problem: https://superuser.com/a/1357929
The behavior is same if used via “driver.manage().logs().get(“logcat”)” or via WebSocketConnection as described here: https://appiumpro.com/editions/55-using-mobile-execution-commands-to-continuously-stream-device-logs-with-appium
Link to Appium logs
Create a GIST which is a paste of your full Appium logs, and link them here. Do NOT paste your full Appium logs here, as it will make this issue very long and hard to read! If you are reporting a bug, always include Appium logs!
Code To Reproduce Issue [ Good To Have ]
Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.
Please git clone https://github.com/appium/appium and from the sample-code
directory, use one of your favourite languages and sample apps to reproduce the issue.
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top GitHub Comments
You could change the command locally by modifying server sources for https://github.com/appium/appium-adb/blob/482ca14b18274b3b862f66f605607dbf773d0501/lib/logcat.js#L89
PS. The patch with
adb shell -x logcat
works, but use it with caution because it slowed test execution time by a factor of three. Therefore, in our particular case, we’re going to use the adb from 28.0.0 platform-tools which work with this LG model.Thanks