Skip to content

Race condition when trying to use more than one cloud tasks instance #3059

@amfc

Description

@amfc

Environment is irrelevant, but I'm using ubuntu 25.04 with firebase admin 13.6.0, cloud tasks, node 20 and npm 10.8.2.

When using multiple Firebase apps (e.g., one for emulator, one for production), there's a race condition because CLOUD_TASKS_EMULATOR_HOST is read on every operation instead of being cached in the constructor like Auth and Storage.

This makes it impossible to safely use an emulator app and a production app in the same process as when you connect to an emulator all calls go there.

It's trivial to fix, I'll provide a patch.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions