Firebase-js-sdk: [Messaging] FirebaseError: Installations: Missing App configuration values. (installations/missing-app-config-values)

Created on 21 Oct 2019  路  14Comments  路  Source: firebase/firebase-js-sdk


[REQUIRED] Describe your environment

  • Operating System version: Mac OS 10.15
  • Browser version: Firefox 69.0.3
  • Firebase SDK version: 7.2.1
  • Firebase Product: messaging

[REQUIRED] Describe the problem

After updating from [email protected] to [email protected] and following the instructions (https://firebase.google.com/support/release-notes/js#version_700_-_september_26_2019) for upgrading to 7.0.0, I'm finding that Firebase Cloud Messaging isn't working at all. Specifically, the getToken call is hanging. On Chrome, it fails silently - it doesn't throw any errors of any sort. On Firefox, I see the following error get thrown:

FirebaseError: "Installations: Missing App configuration values. (installations/missing-app-config-values)."
    node_modules firebase/util/dist/index.cjs.js?:602
    node_modules firebase/util/dist/index.cjs.js?:634
    node_modules firebase/installations/dist/index.esm.js?:98
    node_modules firebase/installations/dist/index.esm.js?:1119
    node_modules firebase/app/dist/index.cjs.js?:190
    node_modules firebase/app/dist/index.cjs.js?:457
    node_modules firebase/messaging/dist/index.esm.js?:424
    step webpack:///./node_modules/tslib/tslib.es6.js?:120
    verb webpack:///./node_modules/tslib/tslib.es6.js?:101
    __awaiter webpack:///./node_modules/tslib/tslib.es6.js?:94
    __awaiter webpack:///./node_modules/tslib/tslib.es6.js?:90
    node_modules firebase/messaging/dist/index.esm.js?:419
    node_modules firebase/messaging/dist/index.esm.js?:289
    step webpack:///./node_modules/tslib/tslib.es6.js?:120
    verb webpack:///./node_modules/tslib/tslib.es6.js?:101
    __awaiter webpack:///./node_modules/tslib/tslib.es6.js?:94
    __awaiter webpack:///./node_modules/tslib/tslib.es6.js?:90
    node_modules firebase/messaging/dist/index.esm.js?:285
    node_modules firebase/messaging/dist/index.esm.js?:1155
    step webpack:///./node_modules/tslib/tslib.es6.js?:120
    verb webpack:///./node_modules/tslib/tslib.es6.js?:101
    __awaiter webpack:///./node_modules/tslib/tslib.es6.js?:94
    __awaiter webpack:///./node_modules/tslib/tslib.es6.js?:90
    node_modules firebase/messaging/dist/index.esm.js?:1151
    node_modules firebase/messaging/dist/index.esm.js?:1064
    step webpack:///./node_modules/tslib/tslib.es6.js?:120
    verb webpack:///./node_modules/tslib/tslib.es6.js?:101
    fulfilled webpack:///./node_modules/tslib/tslib.es6.js?:91

Screen Shot 2019-10-21 at 2 17 11 PM

Downgrading back to [email protected] fixes the issue in Firefox, but Chrome still hangs for some reason so I suspect that might be an unrelated issue.

Steps to reproduce:

Relevant Code:

Someone at angularfire provided code for reproducing this issue: https://github.com/angular/angularfire/issues/2220

I don't use angularfire, but their issue is identical to mine.

messaging closed-by-bot needs-info

Most helpful comment

Hi @mmermerkaya I've added the appId to my configuration object:

firebase.initializeApp({
            apiKey: process.env.FIREBASE_CONFIG_API_KEY,
            authDomain: process.env.FIREBASE_CONFIG_AUTH_DOMAIN,
            databaseURL: process.env.FIREBASE_CONFIG_DATABASE_URL,
            projectId: process.env.FIREBASE_CONFIG_PROJECT_ID,
            storageBucket: process.env.FIREBASE_CONFIG_STORAGE_BUCKET,
            messagingSenderId: process.env.FIREBASE_CONFIG_MESSAGING_SENDER_ID,
            appId: process.env.FIREBASE_CONFIG_WEB_APP_ID,
          });

I logged the object I'm passing in and can confirm that everything is being passed in correctly.

That said, the documentation explicitly states:

No other migration tasks are required; once the API is enabled, pre-7.0.0 apps will continue to function normally.

If this was the solution, I think the Firebase team would need to be much clearer that there are other tasks necessary for a successful migration to 7.0.

All 14 comments

I am also getting same issue in angular pwa

Thanks for the report. I'll investigate why and how it fails silently on Chrome, that should not happen.

As to why you're getting this error, you are probably missing an appId in your app configuration values (this is the case in the reproduction code you linked to).

Please see this answer on how to get your app config object: https://support.google.com/firebase/answer/7015592

Hi @mmermerkaya I've added the appId to my configuration object:

firebase.initializeApp({
            apiKey: process.env.FIREBASE_CONFIG_API_KEY,
            authDomain: process.env.FIREBASE_CONFIG_AUTH_DOMAIN,
            databaseURL: process.env.FIREBASE_CONFIG_DATABASE_URL,
            projectId: process.env.FIREBASE_CONFIG_PROJECT_ID,
            storageBucket: process.env.FIREBASE_CONFIG_STORAGE_BUCKET,
            messagingSenderId: process.env.FIREBASE_CONFIG_MESSAGING_SENDER_ID,
            appId: process.env.FIREBASE_CONFIG_WEB_APP_ID,
          });

I logged the object I'm passing in and can confirm that everything is being passed in correctly.

That said, the documentation explicitly states:

No other migration tasks are required; once the API is enabled, pre-7.0.0 apps will continue to function normally.

If this was the solution, I think the Firebase team would need to be much clearer that there are other tasks necessary for a successful migration to 7.0.

Sorry, to clarify, I'm still having the same error even after passing in the appId.

I've been getting the same error too after the recent update. My firebaseConfig is fine, similar to @alexplumb's config above.

Hi there any solution ? Yesterday worked to me Today does not work and I got the same error...in getToken()

Hi There fixed to me... I just add appId on my configuration, and works!!!

Changing appID to appId resolved it for me.

Looks like it's fixed for most people. If you're still experiencing this issue please try initializing your app with the config object that you can get from Firebase Console.


Hey @alexplumb. We need more information to resolve this issue but there hasn't been an update in 7 days. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!


Since there haven't been any recent updates here, I am going to close this issue.

@alexplumb if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

We had this same issue and there seems to be an undocumented breaking change in this commit:

Previously, having {messagingSenderId: 'idgoeshere'} was sufficient config for firebase messaging:
https://github.com/firebase/firebase-js-sdk/commit/932d7bea1568e6923bdd617d3830404f5578af84#diff-0cdfe633d7740a89cc1b6a290f988ff9L63

Now, all of these (apiKey, projectId, appId) are needed too: https://github.com/firebase/firebase-js-sdk/commit/932d7bea1568e6923bdd617d3830404f5578af84#diff-f169866494446eb62e44e7b87d1cdad2R22-R35

Related change in makeFakeApp:
https://github.com/firebase/firebase-js-sdk/commit/932d7bea1568e6923bdd617d3830404f5578af84#diff-5218164d4e5d5842b5c029b4a8080b4aR21-R30

I recommend adding a note about that in to the migration docs: https://firebase.google.com/support/release-notes/js

@Feiyang1

As mentioned by @vkentta, this need appId in firebase/init, but currently has no:

Hi @all, we have retrospectively added a section in our 7.0.0 release notes which asks you to check your app config. Hope it clears the confusion going forward!

Was this page helpful?
0 / 5 - 0 ratings