-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cloud function while trigger - testing error #1318
Comments
Same issue, followed the documentation to a t and get the error "TypeError: callback is not a function" when running the following part
|
I also face the same issue. I was trying to migrate the code, using this doc https://cloud.google.com/functions/docs/migrating/nodejs-runtimes but ends with no luck. Please. Help. |
Start Compute Engine: var http = require('http'); { var Compute = require('@google-cloud/compute'); I found working solution here https://medium.com/google-cloud/start-stop-compute-engine-instance-from-cloud-function-bf9ae5199609 Thanks HuanTing Chen But still the code provided in GCP docs is not working. |
@djmailhot Could you have a look, you authored the sample. Thank you! |
@jpatokal seems like your code update has a bug. |
Thank you for bringing this to my attention. It looks like the function signature has changed for NodeJS 8, and this was not caught by the unit tests. I'll update this repo shortly, but in the meantime, you can find a fixed version here: |
This should be fixed now. |
Marking as closed - please reopen if this continues to be an issue. |
Getting output while testing the function
stopInstancePubSub
u3sbsgzeovt3
TypeError: callback is not a function at exports.stopInstancePubSub (/srv/functions/index.js:53:5) at Promise.resolve.then (/srv/node_modules/@google-cloud/functions-framework/build/src/invoker.js:330:28) at process._tickCallback (internal/process/next_tick.js:68:7)
Referring the doc/code from here: https://cloud.google.com/scheduler/docs/start-and-stop-compute-engine-instances-on-a-schedule
The text was updated successfully, but these errors were encountered: