2
votes

I've got a Python Google Cloud Function called "artificiellt_osterbotten" (not a Firebase function), and I want to trigger it through Firebase Hosting. This is my firebase.json file:

{
  "hosting": {
    "public": "public",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
    "rewrites": [
      {
        "source": "/artificiellt_osterbotten",
        "function": "artificiellt_osterbotten"
      }
    ]
  }
}

The route seems to be working, but all I'm getting is a 404. I'm assuming this has to do with a disconnect between Firebase and GCP. The function does show up in the Firebase console, however.

Anyone got any idea as to what's the issue here? Is it even possible to trigger GCP Cloud Functions from Firebase Hosting?

I have upgraded my Firebase plan to Blaze.

1
Thanks, but it wasn't the issue - I'll put it down belowFrank Sandqvist

1 Answers

1
votes

Turns out, I just had to have the function located in us-central1 for it to work. Wish it could have warned me in the CLI, would have saved me a few hours!

For future readers, there is an open issue that firebase is working on about this and it appears either a warning will be issued, or multi region support will happen.