FirebaseError: Firebase: Error (auth/invalid-api-key) on site deployed on Netlify

Uncaught FirebaseError: Firebase: Error (auth/invalid-api-key).
    at Ua (assert.ts:128:10)
    at Va (assert.ts:153:30)
    at register.ts:67:11
    at e.instanceFactory (register.ts:66:17)
    at e.value (provider.ts:318:33)
    at e.value (provider.ts:242:27)
    at qa (initialize.ts:66:25)
    at index.ts:44:10
    at firebaseConfig.ts:19:14
    at index.tsx:16:1

I am getting this error in the console of my react.js site that is deployed on netlify. I’ve checked the API keys entered in the environment variables thrice but it is just not working. The API keys are working fine locally on my machine thus it seems to be an issue with netlify.

Site link- https://serverflow.netlify.app/

Github link- GitHub - Pranav016/serverflow: Serverflow is a platform where Software Engineers and Developers come to solve their doubts and contribute to the open-source community.

Hey @Pranav016,

Are you still having issues? I checked your website now and didn’t see any Firebase API error.

Yes. I am Having same issue. though all working well locally.

site link: https://sawari-spark-shufol.netlify.app/

How do we reproduce the error? The website seems to be working fine.