Skip to content

fix(proofofwork): de-flake JavaScript loading in Google Chrome - #1807

Merged
Xe merged 1 commit into
mainfrom
Xe/deflake-chrome-js
Aug 5, 2026
Merged

fix(proofofwork): de-flake JavaScript loading in Google Chrome#1807
Xe merged 1 commit into
mainfrom
Xe/deflake-chrome-js

Conversation

@Xe

@Xe Xe commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Load JavaScript using defer instead of async. This fixes a rare race condition that can happen when Chrome finishes downloading the challenge JavaScript before finishing page rendering.

I was not able to reproduce this in testing, possibly due to my setup being incredibly low-latency.

Closes: #1782

Checklist:

  • Added a description of the changes to the [Unreleased] section of docs/docs/CHANGELOG.md
  • Added test cases to the relevant parts of the codebase
  • Ran integration tests npm run test:integration (unsupported on Windows, please use WSL)
  • All of my commits have verified signatures

Load JavaScript using `defer` instead of `async`. This fixes a
rare race condition that can happen when Chrome finishes downloading
the challenge JavaScript before finishing page rendering.

I was not able to reproduce this in testing, possibly due to my
setup being incredibly low-latency.

Closes: #1782
Signed-off-by: Xe Iaso <[email protected]>
@Xe Xe self-assigned this Aug 5, 2026
@Xe
Xe merged commit c85ce21 into main Aug 5, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Async module script can run before div#progress exists, breaking Chrome

1 participant