-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page crashes when running test from large DOM.getDocument response #15892
Comments
(internal) crash/c962bbbdb7165d4f https://g-issues.chromium.org/issues/40059370 It crashes when converting the binary protocol response to JSON. The message is apparently too large. |
This is from response of Debugging this required some setup so I'll record it here. I remove the depth limit from Chrome and print out all the responses being sent out
We need to get at the chrome logs diff --git a/cli/run.js b/cli/run.js
index 6366ce6c7..f4c207751 100644
--- a/cli/run.js
+++ b/cli/run.js
@@ -88,6 +88,7 @@ function getDebuggableChrome(flags) {
ignoreDefaultFlags: flags.chromeIgnoreDefaultFlags,
chromeFlags: parseChromeFlags(flags.chromeFlags),
logLevel: flags.logLevel,
+ userDataDir: '.tmp/userDataDir',
});
} This script finds what the deepest CDP response message was. chrome-err.log requires some manual editing first. import fs from 'fs';
function search(node) {
if (Array.isArray(node)) {
if (!node.length) return 1;
return 1 + Math.max(...node.map(search));
}
if (typeof node == 'object' && node !== null) {
let list = Array.isArray(node) ? node : Object.values(node);
return list.length ? 1 + Math.max(...list.map(search)) : 1;
}
return 0;
}
const lines = fs.readFileSync('/Users/cjamcl/src/lighthouse/.tmp/userDataDir/chrome-err.log', {'encoding': 'utf-8'}).split('\n').filter(Boolean);
const objects = [];
for (const line of lines) {
try {
objects.push(JSON.parse(line));
} catch {
console.log({line});
process.exit(1);
}
}
const max = search(objects);
for (const object of objects) {
console.log({max});
if (search(object) == max - 1) {
console.log(object);
process.exit(1);
}
} |
btw, not specific to root causes/trace engine. it's any usage of |
possible fix is to bump this: https://source.chromium.org/chromium/chromium/src/+/main:third_party/inspector_protocol/crdtp/cbor.cc;l=817?q=cbor.cc&ss=chromium last done here: https://chromium.googlesource.com/deps/inspector_protocol/+/454b6bcf7d08535681bbd967030f5248bcbc8e6a%5E%21 From looking at chrome crash graphs, this seems very rare, so I'm marking as P3. However, this seems like a straightforward change for any interested chromium contributor to make - except for the fact I couldn't find any history of discussion about why this limit is (imo) so low. Ramifications of increasing are not known to me. Perhaps just increasing the outgoing messages encoder stackLimit would be safer than also increasing the incoming (that's in a different file). |
FAQ
URL
https://uk.elemis.com/
What happened?
Run
lighthouse https://uk.elemis.com/ --view --preset=desktop
.The page crashes:
What did you expect?
The test should finish successfully.
What have you tried?
No response
How were you running Lighthouse?
CLI
Lighthouse Version
11.7.0
Chrome Version
125.0.6379.3
Node Version
No response
OS
No response
Relevant log output
The text was updated successfully, but these errors were encountered: