-
-
Notifications
You must be signed in to change notification settings - Fork 116
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 properties of null (reading 'id') #361
Comments
I am not too familiar with Sentry but it seems that Could you provide a simple code excerpt that generates the error and that I could run on my end? |
I cannot as I cannot reproduce it myself. I just have plenty of these errors as crash reports, but didn't find a way to reproduce them. The full stack trace shown above shows that it's called in Here's my full (and very simple) use of webmidi if it can help:
|
As you can surely understand, without a means to reproduce the problem, it becomes very hard for me to troubleshoot the problem. If you run the small TypeScript example provided in this repo, do you get any errors? |
If I understand correctly, when we call ... but as they are promises, it won't be executed instantly, so the following can happen (and is probably what I see in my error reports): Let's imagine we have several inputs (A,B,C,...)
... so shouldn't the
|
... or maybe something like this:
|
Stéphane, Thank you so much for this analysis. This is really helpful. I made a minor adjustment to the codebase that will probably fix the issue. The fix passes all unit tests but, before I release it, could you try it out in your context to see if it indeed fixes the problem? You can just replace the |
Thank you so much (for this and for the really useful library!). Unfortunately, as I cannot reproduce it directly, I can just wait to see if I have any new crash reports. I would also have to deploy a new build of the app, so the changes won't necessarily be pushed before at least a few days, probably more a couple of weeks. But I'm very confident that your fix should works, your code seem to be fixing this edge case. So don't wait on me :) Again, thank you very much! |
Okay, no worries. I just published release v3.1.6 on NPM. Hopefully it will fix your issue. Feel free to chime in if it didn't. Thx. |
Description
I'm using webmidi.js on a project that is deployed both as a web app and an Electron app. I'm using Sentry for crash reports, and I've got a lot of errors
Cannot read properties of null (reading 'id')
from webmidi.jsEnvironment:
Details
Here's the stack trace from Sentry:
The text was updated successfully, but these errors were encountered: