-
Notifications
You must be signed in to change notification settings - Fork 266
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
Fix: Avoid error from null value for observer in timeoutDisconnect function #609
Fix: Avoid error from null value for observer in timeoutDisconnect function #609
Conversation
Anything holding this PR back? I have been seeing this error lot of times and getting picked by crashlytics. we should merge this sooon |
@elorzafe please check this out for review |
@elorzafe Thank you. This PR exists for a similar issue. Please spare a few minutes to check it out |
if (!observer) { | ||
return; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KvNGCzA I think this should never happen. If the map is empty, the callback wouldnt been call? Did you experience something that the observer is undefined
. I think the issue is somewhere else. I will keep looking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elorzafe After a subscription is established, I randomly get the following error(s): Undefined is not an object evaluating (_a.observer)
or Cannot read property 'observer' of undefined
These errors appear randomly in my case. I'm suspecting it has to do with something with the subscription timing out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to reproduce this error by randomly switching between networks(WiFi/4G). I have already rollout a build with this patch and I am no longer getting this crash. Thank you
@KvNGCzA @gprasadholla we just published the first fix, next week I will continue working on the other issues and doing a following release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @KvNGCzA ! 🥇
This was addressed by #616 |
Issue #, if available:
#515 #544 #596
Description of changes:
An if statement to make sure that the
observer
exists before it tries to call the properties ofobserver
in timeoutDisconnect function.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.