Skip to content

Data Connect event listener ignored on emulator #1774

@Bindslev

Description

@Bindslev

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions