sitespeedio / sitespeedio/sitespeed.io

Error stopping measurement: Invalid time value

Open
#4,285 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5k
Forks
624
Avg merge
4h 8m
Merged PRs (30d)
2

Description

Your question

Hello, All

I'm experiencing an issue while calling the measure stop command (short example):
let menuXpath = await this.custom.findElementByXpathSelector("//*[contains(@class, 'settings')]"); await commands.measure.start("Home Page - Open Settings Menu"); await homePage.custom.clickByXpathAndWait(menuXpath); await commands.measure.stop();

I'm able to find an element, I'm also able to click on the element and see how the page is loading, but the measure.stop() it returns an error:
Error stopping measurement: Invalid time value
I even added hardcoded timeouts to wait after clicking by the XPath selector to be confident that the page was loaded, but I still, see the error.

INFO: Versions OS: win32 10.0.19045 nodejs: v22.9.0 sitespeed.io: 35.0.0 browsertime: 23.0.0 coach: 8.0.2

Could someone please help to resolve this issue?
Thanks in advance!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the measure.start and measure.stop sequence from the report with sitespeed.io 35.0.0, Browsertime 23.0.0, and Node.js 22.9.0, then trace where the “Invalid time value” error is produced. Done means the same interaction stops measurement without the error and the relevant regression is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.