Skip to content

Firebase npm module incompability with new 0.37 #10958

@oximer

Description

@oximer

Description

Until version 0.36 React native was compatible with Firebase javascript library.
https://www.npmjs.com/package/firebase

When you register a user, Firebase basically persists this information for you.
Now on version 0.37, this information is not available any more.
Thus, the user has to login every time that he opens the application.

There is no release notes that could justify this behavior. It seems to me that this is undesirable side effect.

Reproduction

Add firebase 3.6.0 on your package.json.
Do any simple firebase example.

var firebase = require('firebase/app');
require('firebase/auth');
require('firebase/database');
 
var app = firebase.initializeApp({ ... });
this.FirebaseAuth = this.FirebaseApp.auth();
this.FirebaseAuth.signInWithEmailAndPassword('email@email.com', '12345678')
// ...

then open and close your application
try to

var firebase = require('firebase/app');
require('firebase/auth');
require('firebase/database');
 
var app = firebase.initializeApp({ ... });
this.FirebaseAuth = this.FirebaseApp.auth();
this.FirebaseAuth.currentUser

The current user gonna be null.

Solution

No idea.

Additional Information

This situation is not happening when using version 0.36
I couldn't figure out, based on release notes what affect the firebase behavior.
It affects only iOS.

  • React Native version: 0.37
  • Platform: iOS.
  • Operating System: MacOS.
  • Packages:
      "firebase": "^3.6.0",
      "react": "15.3.2",
      "react-native": "0.37.0",
      "react-native-datepicker": "^1.4.2",
      "react-native-fbsdk": "^0.3.0",
      "react-native-fcm": "^2.3.2",
      "react-native-fetch-blob": "^0.10.0",
      "react-native-google-signin": "^0.8.1",
      "react-native-i18n": "^0.1.1",
      "react-native-image-picker": "^0.23.0",
      "react-native-keyboard-spacer": "^0.3.0",
      "react-native-swipe-list-view": "^0.3.1"
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions