Search code examples
firebasefunctiongoogle-cloud-platformgoogle-cloud-functionscloud

Firebase Cloud Functions Migration from v1 to V2 CORS errors


I have a Firebase project that uses Firebase hosting along with Firebase cloud functions. Up until recently I have been using V1 firebase functions, and just now migrated to v2. I've got them deployed to the cloud, but now I'm getting CORS errors for all my http onCall functions. I never had this problem with V1 functions.

Since I'm using Firebase hosting and Firebase functions all from the same Firebase project, I can't see why there would be a CORS error.

Here's the Error: enter image description here

If anyone knows what the problem might be, I'd greatly appreciate the help.


Solution

  • The onCall functions were deployed in a different region than my firebase project. Once I deployed the onCall functions in the same region as my firebase project, the errors went away.