Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

added fallback/workaround for unexplained crashes in Firebase console #714

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexp25
Copy link

@alexp25 alexp25 commented Sep 13, 2020

Fallback/workaround for crashes encountered in Firebase Crashlytics from real users, unable to reproduce on device. Use safeMode option to enable when calling login(options). Now the app won't crash anymore (with this flag enabled) and will just do nothing if the error is encountered (should handle this case with e.g. timeout after app resumes from background in Cordova app). Addressing issues 634, 358, 440, 531 and possibly many more.

…, unable to reproduce (NullPointerException)

added flag to enable/disable and test this workaround via options (CordovaArgs), disabled by default
@bhaskar-se
Copy link

Hi @alexp25 & @EddyVerbruggen any update on this?
We are facing the similar issue. App is getting crashed at nl.xservices.plugins.GooglePlus.handleSignInResult.

@alexp25
Copy link
Author

alexp25 commented Jan 25, 2022

@bhaskar-se did you pass safeMode: true option on login(options)? That should prevent unexplained crashes (and the app should just do nothing instead). Also, this workaround was not yet merged, so you may use my fork instead, and see if it fixes the problem.

// savedCallbackContext was null in multiple crash reports, unable to reproduce, using this as fallback
// handle in cordova app e.g. timeouts
if (savedCallbackContext == null) {
return;
Copy link

@bhaskar-se bhaskar-se Jan 25, 2022

Choose a reason for hiding this comment

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

@alexp25 understood the concept here, but one thing if you pay attention is that you are returning from this block if savedCallbackContext is null, and there is no callback for error and no other options to let the caller function know that there is an issue.
Am asking this because savedCallbackContext itself is the callback and the method error is getting called in case of any error.
I doubt this can possibly create another issue which may lead to another potential crash?!

@bhaskar-se
Copy link

bhaskar-se commented Aug 10, 2022

hi @EddyVerbruggen
any update on this PR or the fix?

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

Successfully merging this pull request may close these issues.

2 participants