firebase / firebase/firebase-functions

Data Connect event listener ignored on emulator

Open
#1,774 6 comments 1 reaction 1 assignee Claimed by @CorieW View on GitHub
feature request needs-attention
Dominant language
TypeScript
Stars
1.1k
Forks
232
Avg merge
20h 46m
Merged PRs (30d)
15

Description

### Related issues

### [REQUIRED] Version info

**node:**
20

**firebase-functions:**
7.0.0

**firebase-tools:**

14.26.0

**firebase-admin:**

13.6.0

### [REQUIRED] Test case

Follow this guide:
https://firebase.google.com/docs/functions/data-connect-events

Create a listener:

````
import { onMutationExecuted } from 'firebase-functions/dataconnect';
import { logger } from 'firebase-functions/v2';

export const someListener = onMutationExecuted(
{
region: 'europe-west1',
},
(event) => {
console.log(event.data);
logger.error(event.data);
}
);
````

Trigger any mutation using firebase data connect in the firebase console.

It should work when deployed - but doesn't work on emulator.

### [REQUIRED] Steps to reproduce

Follow this guide:
https://firebase.google.com/docs/functions/data-connect-events

### [REQUIRED] Expected behavior

I expected the event listener to be triggered on mutation on emulator, but it only works on deployment.
In fact, locally the emulator logs does not even list the listener here:

"functions Loaded functions definitions from source: ..."

### [REQUIRED] Actual behavior

Nothing happens - the trigger isn't registered on emulator and therefore no logs are printed.

### Were you able to successfully deploy your functions?

Yes, there it works fine.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.