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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Umbrella Issue for "Cannot convert undefined or null to object" #5406

Closed
3 tasks done
SaraVieira opened this issue Jan 27, 2021 · 9 comments
Closed
3 tasks done

Umbrella Issue for "Cannot convert undefined or null to object" #5406

SaraVieira opened this issue Jan 27, 2021 · 9 comments

Comments

@SaraVieira
Copy link
Contributor

SaraVieira commented Jan 27, 2021

馃悰 bug report

Preflight Checklist

  • I have read the
    Contributing Guidelines
    for this project.
  • I agree to follow the
    Code of Conduct
    that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

Sometimes when using codesandbox the page will just break with the error:

TypeError: Cannot convert undefined or null to object

This error only happens in Chrome-based browsers and it comes from the sentry SDK:
CleanShot 2021-01-27 at 14 36 58

https://sentry.io/organizations/codesandbox/issues/1730507122/?project=2071895&query=%22Cannot+convert+undefined+or+null+to+object+%22&statsPeriod=90d

I created a related issue in the sentry javascript library

How has this issue affected you? What are you trying to accomplish?

Not me but people's codesandbox breaks out of nowhere

To Reproduce

No one has a clue

Link to issues:

#5420
#5017
#4992
#5346
#5326

Your Environment

Software Name/Version
小odesandbox any
Browser Chromium
Operating System any
@kamilogorek
Copy link

Hey there, Sentry dev here.

This error only happens in Chrome-based browsers and it comes from the sentry SDK:

When you open the last frame of the stack trace, you can see this note:
image

The reason why it looks like it comes from Sentry, is that we are wrapping some APIs (in this case requestAnimationFrame), to extract function name and capture arguments to the function call. The code that's throwing however, is the original function that has been wrapped. You can find parsed arguments in the Additional Data section, and it may help finding the cause of the issue:
image

Let me know if I can help you in any way, cheers! :)

@SaraVieira
Copy link
Contributor Author

Hey!

That does make sense, I do still get sentry code in the one linked above tho :(
CleanShot 2021-01-27 at 16 12 43

@SaraVieira
Copy link
Contributor Author

This also may be just me not knowing how to use sentry be warned

Also sorry for saying "This comes from sentry", I couldn't really find anything that pointed in another direction

@kamilogorek
Copy link

You could try to disable all timers instrumentation and see whether new events that come up will include any more information or less obfuscated stacktrace. Let me know if you decide to give it a shot and you capture any similar events.

import * as Sentry from '@sentry/browser';

Sentry.init({
  // ...
  integrations: [new Sentry.Integrations.TryCatch({
    setTimeout: false,
    setInterval: false,
    requestAnimationFrame: false,
  })]
});

@SaraVieira
Copy link
Contributor Author

Thank you! Made a PR, probably will get merged on Monday and I will keep a track on the errors to see if we get more of the same one.

Thank you!

@kamilogorek
Copy link

btw. I see that you have browsers extensions filtered in the configuration. You can do that straight in the UI in project/org settings :)

image

@SaraVieira
Copy link
Contributor Author

Oh nice! Removed it from the code and will ask ives to add that as I don't have permissions

Thank you!

@github-actions
Copy link

github-actions bot commented May 3, 2021

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

@github-actions github-actions bot added the stale label May 3, 2021
@github-actions
Copy link

This issue has been automatically closed because there wasn't any activity after the previous notice or the stale label wasn't removed.

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