sitespeedio / sitespeedio/sitespeed.io
Issue facing while including more than one start and stop commands
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 624
- Avg merge
- 4h 8m
- Merged PRs (30d)
- 2
Description
Your question
I was executing sitespeed scripts to capture response times. When I tried to run script with including more than one start and stop commands i.e.,
[ await commands.measure.start('');
await commands.measure.stop(); ]
in a script file, I am getting an error. I was not getting with previous version, with updated latest version only I am getting this error.
ERROR: Caught error from Browsertime TypeError: result[resultIndex].files.screenshot[runIndex] is not iterable
at BrowsertimePlugin.processMessage (file:///usr/src/app/lib/plugins/browsertime/index.js:430:76)
Command:
docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io XXX.js --multi --viewPort 1786x708 --maxLoadTime 180000 --video=false --visualMetrics=false --visualElements=false --browsertime.screenshot false --browsertime.screenshotLCP false --browsertime.screenshotLS false --plugins.remove screenshot --plugins.remove har -n 1 -b chrome
Script:
await commands.addText.byId('XXX', 'username');
await commands.click.byXpathAndWait("");
await commands.addText.byId('XXX', 'password');
await commands.measure.start('Test1');
await commands.click.byXpathAndWait("");
await commands.measure.stop();
await commands.wait.byXpath("", X0000)
await commands.measure.start('Test2');
await commands.click.byXpathAndWait("");
await commands.click.byXpathAndWait('');
await commands.measure.stop();
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
Start with lib/plugins/browsertime/index.js around line 430 and reproduce the failure using the supplied Docker command and script containing two measure.start/stop pairs. Compare this behavior with the previous version if available, then verify that multiple measurements complete without the screenshot iteration error under the stated screenshot and plugin options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript
- Domain
- performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100