sitespeedio / sitespeedio/sitespeed.io
Long URLs being performance tested generate errors
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 624
- Avg merge
- 4h 8m
- Merged PRs (30d)
- 2
Description
Have you read the documentation?
- Yes, I've read the how to make a reproducable bug guide
- Yes, I've read the how to debug my script guide
URL
See in the script
What are you trying to accomplish
Here is execution command:
node bin/sitespeed.js -b chrome -n 1 --video --visualMetrics --multi storefront\storefront_fe\src\workflows\demo.mjs
NOTE: If " --visualMetrics" is removed, then it works fine.
What browser did you use?
Chrome
How to reproduce
Run:
node bin/sitespeed.js -b chrome -n 1 --video --visualMetrics --multi demo.mjs
demo.mjs script
/**
*
* @param {import('browsertime').BrowsertimeContext} context
* @param {import('browsertime').BrowsertimeCommands} commands
*/
export default async function (context, commands) {
const seleniumWebdriver = context.selenium.webdriver;
const By = seleniumWebdriver.By;
const seleniumDriver = context.selenium.driver;
await seleniumDriver.manage().window().maximize();
return commands.measure.start(
'https://???/vigor-2-piece-non-stick-stainless-steel-aluminum-clad-with-excalibur-coating-fry-pan-set-with-8-and-9-1-2-pan/473SSFRYKT3.html');
};
OS:
Windows
Error occurs trying to generate report
If " --visualMetrics" is removed then it works fine.
Log output
INFO: Testing url https://???/vigor-2-piece-non-stick-stainless-steel-aluminum-clad-with-excalibur-coating-fry-pan-set-with-8-and-9-1-2-pan/473SSFRYKT3.html iteration 1
[2024-03-06 18:36:06] INFO: Take after page complete check screenshot
[2024-03-06 18:36:07] INFO: Take cumulative layout shift screenshot
[2024-03-06 18:36:08] INFO: Take largest contentful paint screenshot
[2024-03-06 18:36:11] INFO: Use the visual metrics portable script
[2024-03-06 18:36:11] INFO: Get visual metrics from the video
[2024-03-06 18:36:11] ERROR: VisualMetrics failed to run Error: Command failed with exit code 1: python C:\Users\?\Source\sitespeed.io\node_modules\browsertime\visualmetrics\visualmetrics-portable.py --dir C:\Users\??\Source\sitespeed.io\sitespeed-result\demo_mjs\2024-03-06-18-35-50\pages\????\vigor-2-piece-non-stick-stainless-steel-aluminum-clad-with-excalibur-coating-fry-pan-set-with-8-and-9-1-2-pan\473SSFRYKT3.html\data\filmstrip\1 --video C:\Users\??\Source\sitespeed.io\sitespeed-result\demo_mjs\2024-03-06-18-35-50\pages\????\vigor-2-piece-non-stick-stainless-steel-aluminum-clad-with-excalibur-coating-fry-pan-set-with-8-and-9-1-2-pan\473SSFRYKT3.html\data\video\1.mp4 --orange --force --renderignore 5 --json --viewport --viewportretries 60 --viewportminheight 100 --viewportminwidth 100 -q 75 --logfile C:\Users\????\Source\sitespeed.io\sitespeed-result\demo_mjs\2024-03-06-18-35-50\pages\????\vigor-2-piece-non-stick-stainless-steel-aluminum-clad-with-excalibur-coating-fry-pan-set-with-8-and-9-1-2-pan\473SSFRYKT3.html\data\video\1.visualmetrics.log -vvv
C:\Users\???\Source\sitespeed.io\node_modules\browsertime\visualmetrics\visualmetrics-portable.py:502: SyntaxWarning: invalid escape sequence '\.'
matcher = re.compile(".*com\.android\.version.*")
Traceback (most recent call last):
File "C:\Users\???\Source\sitespeed.io\node_modules\browsertime\visualmetrics\visualmetrics-portable.py", line 1969, in <module>
main()
File "C:\Users\???\Source\sitespeed.io\node_modules\browsertime\visualmetrics\visualmetrics-portable.py", line 1877, in main
logging.basicConfig(
File "C:\Python312\Lib\logging\__init__.py", line 2125, in basicConfig
h = FileHandler(filename, mode,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\logging\__init__.py", line 1231, in __init__
StreamHandler.__init__(self, self._open())
^^^^^^^^^^^^
File "C:\Python312\Lib\logging\__init__.py", line 1263, in _open
return open_func(self.baseFilename, self.mode,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\???\\Source\\sitespeed.io\\sitespeed-result\\demo_mjs\\2024-03-06-18-35-50\\pages\\????\\vigor-2-piece-non-stick-stainless-steel-aluminum-clad-with-excalibur-coating-fry-pan-set-with-8-and-9-1-2-pan\\473SSFRYKT3.html\\data\\video\\1.visualmetrics.log'
C:\Users\????\Source\sitespeed.io\node_modules\browsertime\visualmetrics\visualmetrics-portable.py:502: SyntaxWarning: invalid escape sequence '\.'
matcher = re.compile(".*com\.android\.version.*")
Traceback (most recent call last):
File "C:\Users\???\Source\sitespeed.io\node_modules\browsertime\visualmetrics\visualmetrics-portable.py", line 1969, in <module>
main()
File "C:\Users\???\Source\sitespeed.io\node_modules\browsertime\visualmetrics\visualmetrics-portable.py", line 1877, in main
logging.basicConfig(
File "C:\Python312\Lib\logging\__init__.py", line 2125, in basicConfig
h = FileHandler(filename, mode,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\logging\__init__.py", line 1231, in __init__
StreamHandler.__init__(self, self._open())
^^^^^^^^^^^^
File "C:\Python312\Lib\logging\__init__.py", line 1263, in _open
return open_func(self.baseFilename, self.mode,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\???\\Source\\sitespeed.io\\sitespeed-result\\demo_mjs\\2024-03-06-18-35-50\\pages\\????\\vigor-2-piece-non-stick-stainless-steel-aluminum-clad-with-excalibur-coating-fry-pan-set-with-8-and-9-1-2-pan\\473SSFRYKT3.html\\data\\video\\1.visualmetrics.log'
at makeError (file:///C:/Users/???/Source/sitespeed.io/node_modules/execa/lib/error.js:60:11)
at handlePromise (file:///C:/Users/????/Source/sitespeed.io/node_modules/execa/index.js:124:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async run (file:///C:/Users/???/Source/sitespeed.io/node_modules/browsertime/lib/video/postprocessing/visualmetrics/visualMetrics.js:129:20)
at async getVideoMetrics (file:///C:/Users/????/Source/sitespeed.io/node_modules/browsertime/lib/video/postprocessing/visualmetrics/getVideoMetrics.js:33:21)
at async Video.postProcessing (file:///C:/Users/???/Source/sitespeed.io/node_modules/browsertime/lib/video/video.js:90:22)
at async Iteration.run (file:///C:/Users/????/Source/sitespeed.io/node_modules/browsertime/lib/core/engine/iteration.js:222:34)
at async Engine.runByScript (file:///C:/Users/????/Source/sitespeed.io/node_modules/browsertime/lib/core/engine/index.js:308:20)
at async analyzeUrl (file:///C:/Users/???/Source/sitespeed.io/lib/plugins/browsertime/analyzer.js:190:19)
at async BrowsertimePlugin.processMessage (file:///C:/Users/???/Source/sitespeed.io/lib/plugins/browsertime/index.js:173:26)
[2024-03-06 18:36:11] ERROR: Could not run Visual Metrics Error: ENOENT: no such file or directory, open 'C:\Users\????\Source\sitespeed.io\sitespeed-result\demo_mjs\2024-03-06-18-35-50\pages\???\vigor-2-piece-non-stick-stainless-steel-aluminum-clad-with-excalibur-coating-fry-pan-set-with-8-and-9-1-2-pan\473SSFRYKT3.html\data\video\1.visualmetrics.log''
[2024-03-06 18:36:11] ERROR: Visual Metrics failed to analyse the video Error: ENOENT: no such file or directory, open 'C:\Users\????\Source\sitespeed.io\sitespeed-result\demo_mjs\2024-03-06-18-35-50\pages\????\vigor-2-piece-non-stick-stainless-steel-aluminum-clad-with-excalibur-coating-fry-pan-set-with-8-and-9-1-2-pan\473SSFRYKT3.html\data\video\1.visualmetrics.log''
[2024-03-06 18:36:11] ERROR: TypeError: Cannot read properties of undefined (reading 'push')
at Iteration.run (file:///C:/Users/????/Source/sitespeed.io/node_modules/browsertime/lib/core/engine/iteration.js:246:36)
at async Engine.runByScript (file:///C:/Users/????/Source/sitespeed.io/node_modules/browsertime/lib/core/engine/index.js:308:20)
at async analyzeUrl (file:///C:/Users/????/Source/sitespeed.io/lib/plugins/browsertime/analyzer.js:190:19)
at async BrowsertimePlugin.processMessage (file:///C:/Users/????/Source/sitespeed.io/lib/plugins/browsertime/index.js:173:26)
[2024-03-06 18:36:11] INFO: https://????/vigor-2-piece-non-stick-stainless-steel-aluminum-clad-with-excalibur-coating-fry-pan-set-with-8-and-9-1-2-pan/473SSFRYKT3.html 298 requests, TTFB: 587ms, firstPaint: 1.60s, FCP: 1.60s, DOMContentLoaded: 1.67s, LCP: 1.60s, CLS: 0.001, TBT: 175ms, CPUBenchmark: 33ms, Load: 5.29s
[2024-03-06 18:36:11] INFO: Could not read filmstrip dir TypeError: Cannot read properties of undefined (reading 'time') at getFilmstrip (file:///C:/Users/????/Source/sitespeed.io/lib/plugins/browsertime/filmstrip.js:200:43)
at async HTMLBuilder.render (file:///C:/Users/????/Source/sitespeed.io/lib/plugins/html/htmlBuilder.js:285:13)
[2024-03-06 18:36:13] INFO: Could not read filmstrip dir TypeError: Cannot read properties of undefined (reading 'time') at getFilmstrip (file:///C:/Users/????/Source/sitespeed.io/lib/plugins/browsertime/filmstrip.js:200:43)
at async HTMLBuilder.render (file:///C:/Users/????/Source/sitespeed.io/lib/plugins/html/htmlBuilder.js:352:13)
[2024-03-06 18:36:15] INFO: HTML stored in C:\Users\????\Source\sitespeed.io\sitespeed-result\demo_mjs\2024-03-06-18-35-50
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the command on Windows with a long URL and --visualMetrics, then inspect visualmetrics-portable.py and the visual metrics entry points in node_modules/browsertime/lib/video/postprocessing/visualmetrics/visualMetrics.js and getVideoMetrics.js. Check the reported path failure alongside lib/plugins/browsertime/analyzer.js and filmstrip.js; done means visual metrics completes and the HTML report is generated without the logged errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100