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

Fix: Avoid error from null value for observer in timeoutDisconnect function #609

Conversation

KvNGCzA
Copy link
Contributor

@KvNGCzA KvNGCzA commented Dec 21, 2020

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 of observer 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.

@gprasadholla
Copy link

Anything holding this PR back? I have been seeing this error lot of times and getting picked by crashlytics. we should merge this sooon

@KvNGCzA
Copy link
Contributor Author

KvNGCzA commented Dec 30, 2020

@elorzafe please check this out for review

@KvNGCzA
Copy link
Contributor Author

KvNGCzA commented Jan 8, 2021

@elorzafe Thank you. This PR exists for a similar issue. Please spare a few minutes to check it out

Comment on lines +699 to +702
if (!observer) {
return;
}

Copy link
Contributor

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

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.

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

@elorzafe
Copy link
Contributor

elorzafe commented Jan 8, 2021

@KvNGCzA @gprasadholla we just published the first fix, next week I will continue working on the other issues and doing a following release.

Copy link
Contributor

@elorzafe elorzafe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @KvNGCzA ! 🥇

@manueliglesias
Copy link
Contributor

This was addressed by #616

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

Successfully merging this pull request may close these issues.

None yet

5 participants