When using WebdriverIO to run tests against Real Devices, Emulators or Simulators, test may fail on get logs command.
The reason for this is that by default, the WebdriverIO configuration will set the logging level to info.
This in turn will make a request to retrieve several types of log from the test session, for example:
[
"syslog",
"crashlog",
"performance",
"server",
]
As Appium does not record performance logs by default, an error will occur when an attempt is made to retrieve these logs.
In order to resolve this error, set the logging level to "silent" in the WebdriverIO configuration:
//
// Set specific log levels per logger
// use 'silent' level to disable logger
logLevels: {
webdriver: 'silent',
'@wdio/applitools-service': 'silent'
},
Reference: https://webdriver.io/docs/configurationfile/ for further information