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

startInstancePubSub #1571

Closed
zhukovnv84 opened this issue Dec 20, 2019 · 2 comments
Closed

startInstancePubSub #1571

zhukovnv84 opened this issue Dec 20, 2019 · 2 comments
Labels
type: question Request for information or clarification. Not an issue.

Comments

@zhukovnv84
Copy link

use this instruction for create scheduled instance, using gcloud

https://cloud.google.com/scheduler/docs/start-and-stop-compute-engine-instances-on-a-schedule

After created functions - instance is not started.
error in cloud fucntion startInstancePubSub -

TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.  
@fhinkel fhinkel added the type: question Request for information or clarification. Not an issue. label Dec 20, 2019
@jackson-lucas
Copy link

I was having the same problem, what I noticed is the cloud function code on the link is different from the code on Github.

The code on link make it seems there is event.data.data, which is false. To fix I used the code from the link but without pubsubMessage constant and passed event.data directly to Buffer.from() like the code on github (https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/functions/scheduleinstance/index.js#L36).

Hope it helps :)

@fhinkel
Copy link
Contributor

fhinkel commented Jan 15, 2020

👋 @zhukovnv84 Thanks for raising the issue. Looks like our documentation got updated to use event.data and should be correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants