如题,我用 appium 做 UI 自动化测试,但是用的是 macaca 的 app-inspector 来查看 UI 树状图,但是开启了 app-inspector 之后,运行 appium 脚本时一直报错:
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.

日志如下:
[debug] [W3C] Encountered internal error running command: Error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
[debug] [W3C] at Object.wrappedLogger.errorAndThrow (/usr/local/homebrew/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[debug] [W3C] at UiAutomator2Server.errorAndThrow as startSession
[debug] [W3C] at
[HTTP] <-- POST /wd/hub/session 500 11962 ms - 809
[HTTP]


↙↙↙阅读原文可查看相关链接,并与作者交流