microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
66.39k stars 3.63k forks source link

[BUG] Merging blobs ends up in Error: Cannot create a string longer than 0x1fffffe8 characters #28362

Closed mxschmitt closed 10 months ago

mxschmitt commented 10 months ago

Customer: internal Issue: Merging large blobs does not work and end up in: Status: We have a repro Logs:

merging reports from D:\a\_work\1\s\x-tests\all-report
extracting: all-report\report-1.zip
extracting: all-report\report-2.zip
Error: Cannot create a string longer than 0x1fffffe8 characters
at Buffer.toString (node:buffer:844:17)
at parseCommonEvents (D:\a\_work\1\s\x-tests\node_modules\playwright\lib\reporters\merge.js:81:22)
at extractAndParseReports (D:\a\_work\1\s\x-tests\node_modules\playwright\lib\reporters\merge.js:103:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async mergeEvents (D:\a\_work\1\s\x-tests\node_modules\playwright\lib\reporters\merge.js:133:17)
at async createMergedReport (D:\a\_work\1\s\x-tests\node_modules\playwright\lib\reporters\merge.js:45:21)
at async mergeReports (D:\a\_work\1\s\x-tests\node_modules\playwright\lib\cli.js:179:3)
at async t.<anonymous> (D:\a\_work\1\s\x-tests\node_modules\playwright\lib\cli.js:93:7) {
code: 'ERR_STRING_TOO_LONG'
}
yury-s commented 10 months ago

The fix is being cherry-picked into 1.40.1. The report that the customer has contains a lot of inline attachments, which blow up the size of report.jsonl for no good reason. We should recommend them storing the attachments to files and attaching the files instead.