Skip to content
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

Only the logs and pages directories are generated in the locally persisted sitespeed-result/ directory at the end of the container run, with the other directory files missing #4262

Open
taozhu520222 opened this issue Aug 28, 2024 · 4 comments

Comments

@taozhu520222
Copy link

Your question

Hello, I'm having a problem with sitespeed.io, could you please could you explain it to me? A million thanks.
When I run 'docker run --rm -v /docker/sitespeed.io:/sitespeed.io sitespeedio/sitespeed.io -n 1 urls.txt', if the urls.txt contains around 100 url addresses, the In the locally persisted sitespeed-result/ directory at the end of the container run, only the logs and pages directories will appear, without the corresponding css, js, img directories and several other .html files. Is this caused by too many url addresses in the urls.txt file? Or is the file missing due to some URL access failure during the testing process? Because I subsequently reduced the number of addresses in urls.txt to 3~10, there is still a directory loss situation, observed the error message, only the URL test timeout, but there is no directory loss of abnormal error message.

@soulgalore
Copy link
Member

Hi @taozhu520222 do you get any errors in the logs that you can share?

@taozhu520222
Copy link
Author

嗨,您可以在共享的日志中收到任何错误吗?

There seems to be no such error in the past few days, I have currently accessed es,subsequently if there is a similar error, I will write the relevant files into the log to organize and send you, a million thanks for your prompt reply.

@taozhu520222
Copy link
Author

Hi @taozhu520222 do you get any errors in the logs that you can share?您好@taozhu520222 您在可以分享的日志中遇到任何错误吗?

Hi, I'm using sitespeed.io and once again only the logs and pages directories appear in the locally persistent sitespeed-result/ directory at the end of the container run, without generating the corresponding css, js, img directories and several .html files. The relevant files report the following error message:
[2024-09-11:11:00] ERROR: TypeError [ERR_INVALID_ARG_TYPE].
[2024-09-11 07:36:46] ERROR: TypeError [ERR_INVALID_ARG_TYPE]: The “data” parameter must be a string type or an instance of Buffer, TypedArray, or DataView. Received undefined
at writeFile (node:fs:2311:5)
at node:internal/util:432:7
at new Promise ()
at writeFile (node:internal/util:418:12)
at write (file:///usr/src/app/lib/core/resultsStorage/storageManager.js:26:10)
at file:///usr/src/app/lib/core/resultsStorage/storageManager.js:113:9
at async HTMLBuilder.render (file:////usr/src/app/lib/plugins/html/htmlBuilder.js:338:7)

@taozhu520222
Copy link
Author

嗨,您可以在共享的日志中收到任何错误吗?
I want to specify the test load time for a web page each time I test, as well as skip the test for that page if it fails to load, but when I try to mimic docker run --rm -v “$(pwd):/sitespeed.io” sitespeedio/sitespeed.io:34.12.0 https://www .sitespeed.io --browsertime.pageCompleteCheck 'return (function() {try { return (Date.now() - window.performance.timing.loadEventEnd) > 10000 ;} catch(e) {} return true;})() 'This command to do an early end test seems to be running into some problems, can you help me with this?Am I misunderstanding - the meaning of the use of the browsertime.pageCompleteCheck parameter? I just want to put an early end to page checks that take too long, after all, having to wait for a page to be checked 5 times for 60s each time is indeed too slow.
I'm executing the command locally:
[fangyuan@localhost sitespeed.io]$ docker run -v “$(pwd):/sitespeed.io” --rm sitespeedio/sitespeed.io https://academic.eb.com/ -- browsertime.pageCompleteCheck “return (function() { try { return (Date.now() - window.performance.timing.loadEventEnd) > 10000; } catch(e) { } return true; })();” -n 1
Execution result:
`Google Chrome 128.0.6613.84
Mozilla Firefox 129.0
Microsoft Edge 127.0.2651.105
[2024-09-12 16:30:10] INFO: Versions OS: linux 5.14.0-362.8.1.el9_3.x86_64 nodejs: v20.17.0 sitespeed.io: 34.11.1 browsertime: 22.10.1 coach: 8.0.2
[2024-09-12 16:30:10] INFO: Running tests using Chrome - 1 iteration(s)
[2024-09-12 16:30:11] INFO: Testing url https://academic.eb.com/ iteration 1
[2024-09-12 16:30:14] INFO: Take after page complete check screenshot
[2024-09-12 16:30:15] INFO: Take cumulative layout shift screenshot
[2024-09-12 16:30:16] INFO: Take largest contentful paint screenshot
[2024-09-12 16:30:16] INFO: Chrome did not report any largest-contentful-paint
[2024-09-12 16:30:16] ERROR: Couldn't execute script named documentHeight error:JavascriptError: javascript error: Cannot read properties of null (reading 'scrollHeight')
(Session info: chrome=128.0.6613.84)
[2024-09-12 16:30:16] ERROR: Failed to execute user script: JavascriptError: javascript error: Cannot read properties of null (reading 'scrollHeight')
(Session info: chrome=128.0.6613.84)
[2024-09-12 16:30:18] ERROR: Visual Metrics failed to analyse the video TypeError: Cannot read properties of undefined (reading 'visualElements')
at Iteration.run (file:///usr/src/app/node_modules/browsertime/lib/core/engine/iteration.js:224:54)
at async Engine.runByScript (file:///usr/src/app/node_modules/browsertime/lib/core/engine/index.js:308:20)
at async analyzeUrl (file:///usr/src/app/lib/plugins/browsertime/analyzer.js:210:12)
at async BrowsertimePlugin.processMessage (file:///usr/src/app/lib/plugins/browsertime/index.js:173:26)
[2024-09-12 16:30:18] ERROR: TypeError: Cannot read properties of undefined (reading 'push')
at Iteration.run (file:///usr/src/app/node_modules/browsertime/lib/core/engine/iteration.js:252:36)
at async Engine.runByScript (file:///usr/src/app/node_modules/browsertime/lib/core/engine/index.js:308:20)
at async analyzeUrl (file:///usr/src/app/lib/plugins/browsertime/analyzer.js:210:12)
at async BrowsertimePlugin.processMessage (file:///usr/src/app/lib/plugins/browsertime/index.js:173:26)
[2024-09-12 16:30:18] ERROR: Unhandled value type undefined found when adding data for pageinfo
[2024-09-12 16:30:18] INFO: https://academic.eb.com/ 13 requests, TTFB: 660ms, DOMContentLoaded: 0ms, CPUBenchmark: 45ms, Load: 0ms
[2024-09-12 16:30:18] ERROR: https://academic.eb.com/ generated the following errors in the coach {
"info": {
"documentHeight": "Cannot read properties of null (reading 'scrollHeight')",
"documentWidth": "Cannot read properties of null (reading 'scrollWidth')",
"responsive": "Cannot read properties of null (reading 'scrollWidth')",
"serializedDomSize": "Cannot read properties of null (reading 'innerHTML')"
}
}
[2024-09-12 16:30:19] INFO: Could not read filmstrip dir TypeError: Cannot read properties of undefined (reading 'time')
at getFilmstrip (file:///usr/src/app/lib/plugins/browsertime/filmstrip.js:200:37)
at async HTMLBuilder.render (file:///usr/src/app/lib/plugins/html/htmlBuilder.js:283:13)
[2024-09-12 16:30:19] ERROR: Could not generate url/summary/index, /usr/src/app/lib/plugins/html/templates/url/metrics/index.pug:13
11| - const cdp = medianRun ? pageInfo.data.browsertime.pageSummary.cdp[medianRun.runIndex - 1] : pageInfo.data.browsertime.run.cdp
12| - const renderBlocking = medianRun ? pageInfo.data.browsertime.pageSummary.renderBlocking[medianRun.runIndex - 1] : pageInfo.data.browsertime.run.renderBlocking
13| - const loaf = medianRun ? pageInfo.data.browsertime.pageSummary.browserScripts[medianRun.runIndex - 1].pageinfo.loaf : pageInfo.data.browsertime.run.pageinfo.loaf
14|
15| small
16| | |

Cannot read properties of undefined (reading 'loaf')
[2024-09-12 16:30:19] ERROR: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
at writeFile (node:fs:2311:5)
at node:internal/util:432:7
at new Promise ()
at writeFile (node:internal/util:418:12)
at write (file:///usr/src/app/lib/core/resultsStorage/storageManager.js:26:10)
at file:///usr/src/app/lib/core/resultsStorage/storageManager.js:113:9
at async HTMLBuilder.render (file:///usr/src/app/lib/plugins/html/htmlBuilder.js:338:7)
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants