My code
Hey!
I'm using the Firebase Emulator to emulate Firebase's Firestore, Functions and Authentication. By following the documentation, Enqueue functions with Cloud Tasks, I created a task queue named removeGroupCode():
exports.removeGroupCode = functions.tasks
.taskQueue({
.
.
.
})
.onDispatch(async (data) => {
.
.
.
}
});
The problem
This removeGroupCode() function works fine both in production and in the local emulator. But for some reason it just doesn't get called when I'm calling it from another function in the local emulator:
exports.generateInviteCode = functions.https.onCall(async (data, context) => {
.
.
.
const queue = getFunctions(app).taskQueue("removeGroupCode");
await queue.enqueue(
{groupCode: groupCode},
{scheduleDelaySeconds: 30, dispatchDeadlineSeconds: 60},
);
return {groupCode: groupCode};
});
Note: The above code also works fine in production, but I still would like it to work in the emulated environment for testing purposes.
Question
Could it be that for some reason the Firebase Emulator ignores this call because this isn't a feature in the library yet? Or am I missing here?