Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I emulate a Firebase extension?

I just installed a Firebase extension, and can see it in my Console. How do I get my local Functions emulator to use the extension as well?

When I start the emulators using the CLI, I can see that the functions emulator is 'Watching [locally defined path] for Cloud Functions...', but no evidence that the Firebase extension is downloaded or otherwise watched somehow.

like image 870
Joseph Zabinski Avatar asked Nov 13 '20 14:11

Joseph Zabinski


People also ask

What is a Firebase emulator?

The Firebase Local Emulator Suite consists of individual service emulators built to accurately mimic the behavior of Firebase services. This means you can connect your app directly to these emulators to perform integration testing or QA without touching production data.


1 Answers

July 2022: It is now possible to run extensions in the emulator. See the documentation on using the Extensions Emulator to evaluate extensions for full details.


There's currently no built in support for running Extensions on Firebase's Emulator Suite yet.

Luckily Firebase Extensions are mostly "just" predefined Cloud Functions with some installation and configuration data. And since Cloud Functions can be emulated, you can get the same functionality locally with some work.

To run an extension on your local emulator, you will have to get the source of the extension (which is linked from the extension's page), and make the Cloud Functions (and possibly application) code connect to the emulators instead of the cloud-hosted services.

Update: There is a workaround, which of the engineers working on Extensions documented here.

like image 113
Frank van Puffelen Avatar answered Sep 25 '22 23:09

Frank van Puffelen