1

Context

when trying to call a firebase cloud function in the emulator from Flutter (tried both on Web & IOS), I always get an internal error if the location is set to anything but the default us-central1.

Error: [firebase_functions/internal] internal
Saif Hakeem
  • 875
  • 8
  • 9

1 Answers1

2

It turns out that when I set up the Cloud Functions emulator, I have to specify the location too.

FirebaseFunctions.instanceFor(region: 'europe-west2').useFunctionsEmulator('localhost', 5001);

Note

That's is different from calling the function.

await FirebaseFunctions.instanceFor(region: 'europe-west2').httpsCallable('testFun3').call();
Saif Hakeem
  • 875
  • 8
  • 9