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

Cannot read property 'name' of undefined #86

Open
spoterala opened this issue Jul 20, 2021 · 2 comments
Open

Cannot read property 'name' of undefined #86

spoterala opened this issue Jul 20, 2021 · 2 comments

Comments

@spoterala
Copy link

I've got an error like in title. It's in function computeStackTrace in last return when tries to get ex.name.

It is called by function traceKitWindowOnUnhandledRejection (and I don't have more stacktrace).

Could you tell me why I got this error?

@niemyjski
Copy link
Collaborator

This is a function that is wired up to https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onunhandledrejection and handles this type of event. Sounds like that event can be null. Can you let us know how you reproduced it and with the specifics of what browser/os you were using with specific versions.

@spoterala
Copy link
Author

I'm sorry, but I've seen that error only once and had some trouble getting it.

Steps to get this error:

  1. Call reject() in a Promise
  2. PromiseRejectionEvent is triggered
  3. The event is caught by traceKitWindowOnUnhandledRejection in TraceKit
  4. e.reason is undefined
  5. computeStackTrace gets undefied as a first argument

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

No branches or pull requests

2 participants