Skip to content

undefined is not an object: "a[c]=l" and "delete t.object.__r3f" (Sentry) #3493

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

Open
twobit opened this issue Mar 11, 2025 · 2 comments
Open

Comments

@twobit
Copy link

twobit commented Mar 11, 2025

These errors only happens in production (Vercel). Nothing renders no matter how simple or complex the scene.

  1. undefined is not an object (evaluating 'a[c]=l')

Traced to fiber/src/core/utils.tsx:

root[key] = value;
  1. undefined is not an object (evaluating 'delete t.object.__r3f')

Traced to fiber/src/core/reconciler.tsx:

delete child.object.__r3f

Next: 15.2.1
R3F: 9.1.0
Three: 0.174.0
Node: 22.13.1

@krispya
Copy link
Member

krispya commented Mar 13, 2025

Thanks for the report! Do you have a minimal reproduction I can look at?

@twobit
Copy link
Author

twobit commented Mar 13, 2025

@krispya after a lot of trial and error this is an error caused by Sentry. Specifically this line in next.config.ts:

  // Automatically annotate React components to show their full name in breadcrumbs and session replay
  reactComponentAnnotation: {
    enabled: true
  },

getsentry/sentry-javascript#13413
getsentry/sentry-javascript-bundler-plugins#530

@twobit twobit changed the title undefined is not an object: "a[c]=l" and "delete t.object.__r3f" undefined is not an object: "a[c]=l" and "delete t.object.__r3f" (Sentry) Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants