Open calitbk opened 7 years ago
Hi there,
Sorry, it's not documented but here's the valid keys for the options to pass to initializeApp
:
googleAppID
bundleID
GCMSenderID
APIKey
clientID
trackingID
androidClientID
databaseURL
storageBucket
deepLinkURLScheme
I tried, but anyway it still didn't work, i got a new error. Could you give me an example
Here is the error
Can you post your code please?
const firebaseConfig = { googleAppID: "1:478133689317:android:027b27xxxxxxxxxx", ---- if it is not android api_key, i don't know what "googleAppId" is and where to get it bundleID: "vn.travel.xxxxxxxxxx", --- android package name clientID: "478133xxxxxx-09lv3c71bm5evhnunedjdggij8ifg3s4.apps.googleusercontent.com", --- get from client-sevices.json - firebase config file androidClientID: "478133xxxxxx-09lv3c71bm5evhnunedjdggij8ifg3s4.apps.googleusercontent.com", --- is it the same with clientID? deepLinkURLScheme: "not available", GCMSenderID: "4781xxxxxx", ----- gcm key trackingID: "not available", APIKey: "AIzaSyDCs7IaB7T1CHg7zxApmPaXixxxxxxxxxx", --- clear authDomain: "xxxxxxx.firebaseapp.com", --- clear databaseURL: "https://xxxxxx.firebaseio.com", --- clear storageBucket: "xxxxxx.appspot.com" --- clear }
const firebaseApp = firebase.initializeApp(firebaseConfig, "1:478133689317:android:027b27xxxxxxxx"); // firebaseApp.database().setPersistenceEnabled(true);
module.exports=firebaseApp;
Here is my code, i don't know what the "empty or null" error means.
Are you then using that app for something - auth maybe?
If you are doing app.auth()
try this for now new Auth(app)
(I think there's a bug where the app isn't ready yet so is missing the name)
You can also check ready status with the app.ready()
promise:
await app.ready();
const auth = app.auth();
maybe i miss some settings. Thanks a lot
Hi, i have installed your library 'rn-firebase-bridge', but when i launched app, i got a error like this:
I do not unsderstand this error. Here is my code: // import * as firebase from 'firebase'; (1) import firebase from 'rn-firebase-bridge'; (2)
// Initialize Firebase const firebaseConfig = { ApplicationId: "vn.travel.localprice", apiKey: "real_api_key", authDomain: "real_auth_domain", databaseURL: "real_database_url", storageBucket: "real_storage_bucket", }; const firebaseApp = firebase.initializeApp(firebaseConfig, "package_name_in_android"); // firebaseApp.database().setPersistenceEnabled(true);
module.exports=firebaseApp;
when i use (1), everything is ok, but use (2) -> got above error.
Help me to solve it, please!