Fix synchrous issue: appium may call session check even after session is deleted
MODIFY
lib/appium.js
lib/appium.js
@@ -299,7 +299,7 @@ class AppiumDriver extends BaseDriver {
return await this.getStatus();
}
if (isAppiumDriverCommand(cmd)) {
- return super.executeCommand(cmd, ...args);
+ return await super.executeCommand(cmd, ...args);
}
const sessionId = _.last(args);
@@ -307,7 +307,7 @@ class AppiumDriver extends BaseDriver {
if (!dstSession) {
throw new Error(`The session with id '${sessionId}' does not exist`);
}
- return dstSession.executeCommand(cmd, ...args);
+ return await dstSession.executeCommand(cmd, ...args);
}
proxyActive (sessionId) {

Fix synchrous issue: appium may call session check even after session is deleted (#9550)