Repository navigation
fix: read the tail of chrome-err.log - #369
Merged
Merged
Conversation
readFileSync throws ERR_FS_FILE_TOO_LARGE once the append-only log passes 2 GiB. Readiness now reads at most the last 1 MiB and uses the latest DevTools listening line. Fixes GoogleChrome#293
paulirish
approved these changes
Oct 5, 2026
paulirish
enabled auto-merge (squash)
October 5, 2026 17:39
Contributor
Author
|
Local results for f773f14 on macOS arm64, with Node 22.23.3, 24.22.0 and 26.12.0: all three passed the full suite (53 tests on this PR, 47 on main), build and type-check. Source formatting matches the bundled clang-format 11 via Rosetta. Real Chrome 155 also started successfully with a 3,055,630,622-byte sparse stderr log containing no old port marker. Linux/Windows CI was not run locally. A separate reused-log test still picks an old port before Chrome writes its new marker, then keeps retrying that port. This reproduces on both main and this PR and is outside the bounded-read fix; selecting the last marker does not resolve that startup-ordering case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
waitUntilReadywas loading all ofchrome-err.logwithreadFileSync. Past 2 GiB that throwsERR_FS_FILE_TOO_LARGE, which is exactly when the debugging port is being read from the log.The check now reads at most the last 1 MiB and uses the latest
DevTools listeningline. The file is left as Chrome wrote it.Test plan
yarn test— 47 passedreadFileSyncthrows and the port at the end is still foundyarn buildyarn type-checkFixes #293