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

fix(ReactFiberCommitEffects): cannot read properties of undefined (reading 'tag') #32767

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

emerson-paiva
Copy link

@emerson-paiva emerson-paiva commented Mar 27, 2025

Summary

  • ⚠️ I don't know exactly how to reproduce the bug, my only evidence that this problem exists is my error logs.
  • It looks like the fiber tree hits the end and we are not checking this
  • Versions that my application uses [email protected] and [email protected].
  • I got some logs from my application with the following stack trace, it was caught 4 times until now from my ErrorBoundary.
  | Attributes.metadata.stack.0 | webpack://_N_E/node_modules/react-dom/cjs/react-dom-client.production.js:7481:0
  | Attributes.metadata.stack.1 | webpack://_N_E/node_modules/react-dom/cjs/react-dom-client.production.js:8940:0
  | Attributes.metadata.stack.2 | webpack://_N_E/node_modules/react-dom/cjs/react-dom-client.production.js:8915:0
  | Attributes.metadata.stack.3 | webpack://_N_E/node_modules/react-dom/cjs/react-dom-client.production.js:9034:0
  | Attributes.metadata.stack.4 | webpack://_N_E/node_modules/react-dom/cjs/react-dom-client.production.js:8915:0
  | Attributes.metadata.stack.5 | webpack://_N_E/node_modules/react-dom/cjs/react-dom-client.production.js:9034:0
  | Attributes.metadata.stack.6 | webpack://_N_E/node_modules/react-dom/cjs/react-dom-client.production.js:8915:0
  | Attributes.metadata.stack.7 | webpack://_N_E/node_modules/react-dom/cjs/react-dom-client.production.js:8934:0
  | Attributes.metadata.stack.8 | webpack://_N_E/node_modules/react-dom/cjs/react-dom-client.production.js:8915:0
  | Attributes.metadata.stack.9 | webpack://_N_E/node_modules/react-dom/cjs/react-dom-client.production.js:8934:0

After checking the react code base, and the code generated from the react-dom-client.production version, I made the change on the lastEffect.next to ensure that it will have a value before enter the do while.

How did you test this change?

I did the following steps:

  • I ran the yarn test command
  • I ran the yarn test --prod command
  • I ran the yarn linc command

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

Successfully merging this pull request may close these issues.

2 participants