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 authStateChanged after app is reloaded (fixes #1677) #1698

Merged

Conversation

ghsdh3409
Copy link
Contributor

@ghsdh3409 ghsdh3409 commented Nov 20, 2018

Summary

  • It closes onAuthStateChanged not returning any result on iOS Sumulator #1677.
  • onAuthStateChanged sometimes is not fired after app is reloaded on iOS.
    • I checked it on v5.1.0.
  • I found followings on debugging.
    • When the app is reloaded, dealloc sometimes is not called. So, deallocation task does not work.
    • iOS native callback addAuthStateDidChangeListener works well.
    • emitter.bridge is null when JS onAuthStateChanged is not fired.
  • I added deallocation task using RCTInvalidating.

Checklist

  • Supports Android
  • Supports iOS
  • e2e tests added or updated in /tests/e2e/*
  • Updated the documentation in the docs repo
    • LINK TO DOCS PR HERE
  • Flow types updated
  • Typescript types updated

Test Plan

Release Plan

[IOS][BUGFIX] [FirebaseModule] - Fix authStateChanged is not called after app is reloaded


Think react-native-firebase is great? Please consider supporting the project with any of the below:

@CLAassistant
Copy link

CLAassistant commented Nov 20, 2018

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Nov 20, 2018

Codecov Report

Merging #1698 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1698   +/-   ##
=======================================
  Coverage   75.88%   75.88%           
=======================================
  Files          72       72           
  Lines        1837     1837           
=======================================
  Hits         1394     1394           
  Misses        443      443

@ghsdh3409 ghsdh3409 force-pushed the fix-auth-state-changed-after-app-reload branch from 6b3f2a2 to 1b5a964 Compare November 20, 2018 08:09
@Ehesp
Copy link
Member

Ehesp commented Nov 20, 2018

@ghsdh3409 Thanks very much for this. Could you approve the CLA?

@ghsdh3409
Copy link
Contributor Author

@Ehesp
Thanks for letting me know! I approved!

@Salakar
Copy link
Member

Salakar commented Nov 20, 2018

@ghsdh3409 thanks for debugging and fixing this 🎉

@Salakar Salakar self-requested a review November 20, 2018 12:13
@Salakar Salakar merged commit 716b49a into invertase:master Nov 20, 2018
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.

onAuthStateChanged not returning any result on iOS Sumulator
4 participants