diff --git a/lib/driver.js b/lib/driver.js index e5a3e0ca8..f16c38db5 100644 --- a/lib/driver.js +++ b/lib/driver.js @@ -369,10 +369,10 @@ class AndroidUiautomator2Driver extends BaseDriver { try { await this.adb.setHiddenApiPolicy('1', !!this.opts.ignoreHiddenApiPolicyError); } catch (err) { - this.log.errorAndThrow(`Failed to disable hidden api policy as ${err.message}. You could configure ` + + this.log.errorAndThrow('Failed to disable hidden api policy. You could configure ' + 'the device properly to avoid permission denial error. https://github.com/appium/appium/issues/13802 ' + 'may help to see possible configurations, or ignoreHiddenApiPolicyError capability let you ' + - 'ignore the error.'); + `ignore the error. Original error: ${err.message}`); } }