fix: a slow answer to an approval still reaches the site (closes #540)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

Chrome stopped the background worker about six minutes after a site's
request even with the approval window open, and the approval and the
site's waiting request went with it. While any approval is pending, the
worker now calls runtime.getPlatformInfo() every 20 seconds; Chrome
counts each extension call as activity. The timer is the worker's own,
so a minimized window does not slow it, and it stops itself once nothing
is pending.

tests/e2e/slowApproval.js, run by make test-e2e, leaves a transaction
and a signature approval open for seven minutes in minimized windows and
requires the site to receive both results. It drives Chromium over the
DevTools pipe without Playwright, because Playwright keeps DevTools
attached to the worker and Chrome then never stops it.

Model: opus-5-5
This commit is contained in:
2026-10-14 19:53:55 +00:00
parent f4551dcb67
commit e9f5286ca7
7 changed files with 660 additions and 4 deletions
+12
View File
@@ -97,6 +97,18 @@ main() {
-e HOME=/tmp \
"$(cat "$IIDFILE")" \
node tests/e2e/storagePartition.js
# Approvals left open for seven minutes in minimized windows, past the
# point where Chrome stopped the background worker when nothing kept it
# running. Its own program, without Playwright: Playwright keeps DevTools
# attached to the worker, and Chrome never stops a worker DevTools is
# attached to. It reaches nothing but its own loopback server.
echo "Running the approvals left open for seven minutes..."
docker run --rm \
--ipc=host \
-e HOME=/tmp \
"$(cat "$IIDFILE")" \
node tests/e2e/slowApproval.js
}
main "$@"