Skip to content

Commit cc75ac8

Browse files
committed
Try to avoid 'unable to resolve intent' in ADB setup
Unclear how this would happen after a successful install, best guess is that the device needs a little longer to register the intent, so let's add a tiny extra wait here.
1 parent 39666dc commit cc75ac8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/interceptors/android/android-adb-interceptor.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { HtkConfig } from '../../config';
66
import { generateSPKIFingerprint } from 'mockttp';
77

88
import { reportError } from '../../error-tracking';
9+
import { delay } from '../../util';
910
import {
1011
ANDROID_TEMP,
1112
createAdbClient,
@@ -101,6 +102,8 @@ export class AndroidAdbInterceptor implements Interceptor {
101102
};
102103
const intentData = urlSafeBase64(JSON.stringify(setupParams));
103104

105+
await delay(100); // Add a little delay, to ensure intent URL is registered
106+
104107
// Use ADB to launch the app with the proxy details
105108
await this.adbClient.startActivity(options.deviceId, {
106109
wait: true,

0 commit comments

Comments
 (0)