Skip to content

Fix Failed to execute 'measure' on 'Performance' error #32823

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

Merged

Conversation

unstubbable
Copy link
Collaborator

When startTime still has its initial value of -1.1 we must not call logComponentMount. This can occur when rendering a 'next/dynamic' component with {ssr: false} in a client component, for example. Unfortunately, I didn't manage to reproduce this scenario in a unit test.

When `startTime` still has its initial value of `-1.1` we must not call
`logComponentMount`. This can occur when rendering a `'next/dynamic'`
component with `{ssr: false}` in a client component, for example.
Unfortunately, I didn't manage to reproduce this scenario in a unit
test.
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Apr 5, 2025
Copy link
Collaborator

@acdlite acdlite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you

@react-sizebot
Copy link

react-sizebot commented Apr 5, 2025

Comparing: 6a7650c...05a98de

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 516.15 kB 516.15 kB = 91.87 kB 91.87 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 619.52 kB 619.52 kB = 109.51 kB 109.51 kB
facebook-www/ReactDOM-prod.classic.js = 650.76 kB 650.76 kB = 114.94 kB 114.94 kB
facebook-www/ReactDOM-prod.modern.js = 641.04 kB 641.04 kB = 113.38 kB 113.38 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 05a98de

@sebmarkbage
Copy link
Collaborator

This has a pair for offscreen too. You probably want to update that one as well. Usually these things come in twos. Offscreen/Regular or Mount/Unmount.

if (endTime - startTime > 0.05) {

It seems unexpected though because we always call startProfilerTimer in the work loop:

https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberWorkLoop.js#L2800-L2801

So how do we end up with a new Fiber that hasn't had its beginWork called yet we're visiting it in the passive mount phase?

Seems like there's something deeper going on here that's worth looking into.

@sebmarkbage sebmarkbage merged commit 3366146 into facebook:main Apr 7, 2025
241 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 7, 2025
When `startTime` still has its initial value of `-1.1` we must not call
`logComponentMount`. This can occur when rendering a `'next/dynamic'`
component with `{ssr: false}` in a client component, for example.
Unfortunately, I didn't manage to reproduce this scenario in a unit
test.

DiffTrain build for [3366146](3366146)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants