Skip to content

Commit 426c975

Browse files
committed
fix(android): correct helper-missing hint to the two runtime-required files
Review correction on #1285: resolveAndroidSnapshotHelperArtifact only fs.access'es the versioned .manifest.json and the .apk it references — the sha256 is a manifest field, and *.idsig is excluded from the npm package by design. The hint no longer claims the full sidecar set is required, and the test now rejects any future idsig claim.
1 parent beff38f commit 426c975

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎src/platforms/android/__tests__/snapshot.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,9 +903,10 @@ test('snapshotAndroid gives an actionable hint when the helper artifact is missi
903903
const hint = String((error as { details?: Record<string, unknown> }).details?.hint);
904904
assert.match(hint, /pnpm build:android/);
905905
assert.match(hint, /prepack/);
906-
assert.match(hint, /\.apk\.idsig/);
907-
assert.match(hint, /\.apk\.sha256/);
908906
assert.match(hint, /\.manifest\.json/);
907+
assert.match(hint, /\.apk/);
908+
// The npm package excludes *.idsig by design — the hint must never claim it is required.
909+
assert.doesNotMatch(hint, /idsig/);
909910
return true;
910911
},
911912
);

‎src/platforms/android/snapshot.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ function androidSnapshotHelperUnavailableError(errorReason: string | undefined):
547547
const reason = errorReason ?? 'the bundled helper artifact was not found';
548548
return new AppError('COMMAND_FAILED', `Android snapshot helper is unavailable: ${reason}`, {
549549
androidSnapshotHelperFailureReason: reason,
550-
hint: 'Run `pnpm build:android` to build the full helper dist (android/snapshot-helper/dist: the .apk, .apk.idsig, .apk.sha256, and .manifest.json) for a source checkout. Packaged installs ship this dist automatically via the prepack script — if it is missing from a packaged install, reinstall agent-device.',
550+
hint: 'Run `pnpm build:android` to build the helper dist for a source checkout — the runtime needs android/snapshot-helper/dist/agent-device-android-snapshot-helper-<version>.manifest.json and the .apk it references. Packaged installs ship these via the prepack script; if they are missing from a packaged install, reinstall agent-device.',
551551
});
552552
}
553553

0 commit comments

Comments
 (0)