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

[BUG] TypeError: Cannot read properties of null (reading 'info') #263

Closed
m-bp opened this issue May 6, 2024 · 5 comments
Closed

[BUG] TypeError: Cannot read properties of null (reading 'info') #263

m-bp opened this issue May 6, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@m-bp
Copy link

m-bp commented May 6, 2024

Code to reproduce the issue:

I am unable to reproduce this issue locally but I have the following code:

device.on('unregistered', () => {
  device.disconnectAll()
  device.destroy()
})

Sometimes when one of my users gets disconnected the following error will show up:

TypeError: Cannot read properties of null (reading 'info')

Coming from here.

Seconds after the device has been destroyed.

It makes perfect sense. The promise is started right before being destroyed and by the time it's resolved the object is null.

@m-bp m-bp added the bug Something isn't working label May 6, 2024
@charliesantos
Copy link
Collaborator

Thanks for submitting @m-bp . After this happens, do you see any issues on future calls? Or this the error benign?

@m-bp
Copy link
Author

m-bp commented May 13, 2024

It's usually just this error and nothing seems to break. I cannot confirm 100%, however, as I cannot reproduce it myself.

@charliesantos
Copy link
Collaborator

Thanks @m-bp . I'll close this for now but I'll put it under our radar as we cannot do anything right now. Feel free to follow up if you find any new information.

@m-bp
Copy link
Author

m-bp commented May 20, 2024

@charliesantos I don't see why it wouldn't be possible to add a couple of null checks inside the promises' callbacks to prevent this error from happening?

@charliesantos
Copy link
Collaborator

We definitely can @m-bp . I can submit an internal ticket to track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants