fix: a slow answer to an approval still reaches the site (closes #540)
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. The approval window now posts an empty message on its approval port every 20 seconds while it is open; each one is an event, which keeps the worker running. tests/e2e/slowApproval.js, run by make test-e2e, leaves a transaction and a signature approval open for seven minutes 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:
@@ -97,6 +97,18 @@ main() {
|
||||
-e HOME=/tmp \
|
||||
"$(cat "$IIDFILE")" \
|
||||
node tests/e2e/storagePartition.js
|
||||
|
||||
# Approvals left open for seven minutes, past the point where Chrome
|
||||
# stopped the background worker before the approval window 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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user