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

Error: Argument "updateFunction" is not a valid function. #574

Closed
jineshshah36 opened this issue Mar 8, 2019 · 2 comments
Closed

Error: Argument "updateFunction" is not a valid function. #574

jineshshah36 opened this issue Mar 8, 2019 · 2 comments
Assignees
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jineshshah36
Copy link

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS:
  • Node.js version: 10.15.1
  • npm version:
  • @google-cloud/firestore version: 1.0.2

Steps to reproduce

  1. Call firestore.runTransaction with an async function
  2. You will get the error Error: Argument "updateFunction" is not a valid function.
  3. The issue is that isFunction checks for [object Function] when an async function produces [object AsyncFunction]

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Mar 9, 2019
@dinvlad
Copy link

dinvlad commented Mar 9, 2019

Same issue here, this is breaking our production builds with firebase-admin.

@schmidt-sebastian schmidt-sebastian self-assigned this Mar 10, 2019
@schmidt-sebastian schmidt-sebastian added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels Mar 10, 2019
@schmidt-sebastian
Copy link
Contributor

schmidt-sebastian commented Mar 10, 2019

We can fix this in the next release. Please use Promises instead of async/await until then.

Thanks for letting us know!

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Mar 10, 2019
@google-cloud-label-sync google-cloud-label-sync bot added the api: firestore Issues related to the googleapis/nodejs-firestore API. label Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants