篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了appium在安装setting和Unlock时无法安装,报异常,异常如下,求解决方案相关的知识,希望对你有一定的参考价值。
selenium.common.exceptions.WebDriverException: Message: A new session could not be created. (Original error: An unknown server-side error occurred while processing the command. (Original error: unknown error: Device 63165a4 is not online
(Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64)))
1、文件:/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/lib/driver.js,注释以下几句代码
await this.adb.uninstallApk(this.opts.appPackage);
await helpers.installApkRemotely(this.adb, this.opts);
await helpers.resetApp(this.adb, this.opts.app, this.opts.appPackage, this.opts.fastReset);
await this.checkPackagePresent();
2、文件:/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/build/lib/driver.js,注释以下几句代码:
return _regeneratorRuntime.awrap(_androidHelpers2[‘default‘].resetApp(this.adb, this.opts.app, this.opts.appPackage, this.opts.fastReset));
return _regeneratorRuntime.awrap(this.adb.uninstallApk(this.opts.app));
return _regeneratorRuntime.awrap(_androidHelpers2[‘default‘].installApkRemotely(this.adb, this.opts));
return _regeneratorRuntime.awrap(this.checkPackagePresent());
3、文件:/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/lib/android-helpers.js 注释以下几句代码
await adb.
install
(unicodeIMEPath,
false
);
await helpers.pushSettingsApp(adb);
await helpers.pushUnlock(adb);
4、文件/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/build/lib/android-helpers.js 替换以下几句代码
return _regeneratorRuntime.awrap(helpers.initUnicodeKeyboard(adb)) 替换为return context$1$0.abrupt(‘return‘, defaultIME);
return _regeneratorRuntime.awrap(helpers.pushSettingsApp(adb)); 替换为return context$1$0.abrupt(‘return‘, defaultIME);
return _regeneratorRuntime.awrap(helpers.pushUnlock(adb)); 替换为return context$1$0.abrupt(‘return‘, defaultIME);