firebase-js-sdk icon indicating copy to clipboard operation
firebase-js-sdk copied to clipboard

Firebase Installations returning 404

Open bpfeiffer187 opened this issue 1 year ago • 4 comments

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow with the firebase tag.
  • For general Firebase discussion, use the firebase-talk google group.
  • For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.

[REQUIRED] Step 2: Describe your environment

React JS

Firebase Installations getting 404 repose. As i understand it firebase installations, is called by firebase after the base library is initialized.

It is hitting this url: https://firebaseinstallations.googleapis.com/v1/projects/"projectKey"/installations/"api key"/authTokens:generate.

we get back this console error: FirebaseError: Installations: Generate Auth Token request failed with error "404 NOT_FOUND: Requested entity was not found."

This is only happening in our prod environment i haven't been able to reproduce it locally.

So wondering if anyone else ran into this.

The base firebase library is being initialized from a react js app.

We define it by:

const registerFirebaseApp = (config?: FirebaseOptions): FirebaseApp | undefined => {
  if (!config || isUnitTestMode) {
    return undefined;
  }
  return initializeApp(config, config.appId);
};

export const webFirebaseApp = registerFirebaseApp(
  validateFirebaseConfig({
    apiKey: StaticConfig.firebaseApiKey,
    authDomain: StaticConfig.firebaseAuthDomain,
    projectId: StaticConfig.firebaseProjectId,
    storageBucket: StaticConfig.firebaseStorageBucket,
    messagingSenderId: StaticConfig.firebaseMessagingSenderId,
    appId: StaticConfig.firebaseAppId
  })
);

We Call it:

const webRemoteConfig = registerRemoteConfig(webFirebaseApp);

 useEffect(() => {
    setRemoteConfigValues((currentValues) => ({...currentValues, IsLoading: true, HasError: undefined}));
    Promise.all<IncompleteRemoteConfigValues>([
      fetchRemoteConfig(webRemoteConfig),
      fetchDotEnvFeatureFlagOverrides(!isDevelopmentMode),
      fetchRemoteConfig(mobileRemoteConfig),
      fetchDotEnvFeatureFlagOverrides(isDevelopmentMode)
    ]).then((values) => {
      setRemoteConfigValues({
        ...RemoteConfigDefaults,
        ...values.reduce<IncompleteRemoteConfigValues>(
          (mergedRemoteValues, remoteValues) => ({...mergedRemoteValues, ...remoteValues}),
          {}
        ),
        IsLoading: false
      });
    });
  }, []);

bpfeiffer187 avatar Jan 30 '24 17:01 bpfeiffer187

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Jan 30 '24 17:01 google-oss-bot

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Feb 02 '24 17:02 google-oss-bot

Hi @bpfeiffer187,

Could you check this post in a similar report to see if clearing your IndexedDB cache solves your issue? Thanks!

DellaBitta avatar Feb 09 '24 15:02 DellaBitta

Hey @bpfeiffer187. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 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!

google-oss-bot avatar Feb 16 '24 02:02 google-oss-bot

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

@bpfeiffer187 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.

google-oss-bot avatar Feb 23 '24 02:02 google-oss-bot