Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firestore triggers broken in emulator #1417

Closed
aputinski opened this issue Jun 19, 2019 · 11 comments · Fixed by #1411
Closed

Firestore triggers broken in emulator #1417

aputinski opened this issue Jun 19, 2019 · 11 comments · Fixed by #1411
Assignees

Comments

@aputinski
Copy link
Contributor

[REQUIRED] Version info

node: 10.15.3

firebase-functions: 3.0.0

firebase-tools: 7.0.0

firebase-admin: 8.0.0

[REQUIRED] Test case

https://github.com/aputinski/firebase-functions-test-case

[REQUIRED] Steps to reproduce

See README in repo above

[REQUIRED] Expected behavior

functions: Beginning execution of "onWrite"
functions: Finished "onWrite" in ~1s

[REQUIRED] Actual behavior

TypeError: Cannot read property 'eventType' of undefined

It looks like the data and context are being combined into the first argument

https://github.com/firebase/firebase-functions/blob/master/src/cloud-functions.ts#L242

Were you able to successfully deploy your functions?

N/A

@google-oss-bot
Copy link
Contributor

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@thechenky
Copy link
Contributor

Hi @aputinski do your functions run correctly when you deploy them?

@thechenky thechenky self-assigned this Jun 19, 2019
@aputinski
Copy link
Contributor Author

Yes. This is just for the emulator.

@thechenky
Copy link
Contributor

Gotcha, thanks. I'm going to transfer this issue to the firebase-tools repo as emulation is done in the Firebase CLI.

@thechenky thechenky transferred this issue from firebase/firebase-functions Jun 19, 2019
@aputinski
Copy link
Contributor Author

Thanks!

@thechenky
Copy link
Contributor

@samtstern FYI, I think this is similar to the issue with RTDB triggers in emulation we discussed yesterday. Let me know how I can help!

@samtstern
Copy link
Contributor

@aputinski this comes from using firebase-functions 3.x with the current emulators. We're working on a fix already, thank you for reporting!

@aputinski
Copy link
Contributor Author

So if I use firebase-functions@2.3.1 with firebase-tools@7.0.0 everything will work?

@samtstern
Copy link
Contributor

@aputinski yes I think it would.

@abeisgoat
Copy link
Contributor

@aputinski I have nothing to contribute, but hi Adam! Glad to see you're still using Firebase after all these years :)

@aputinski
Copy link
Contributor Author

@abeisgoat I'll always be a Firebaser 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants