Skip to content

startInstancePubSub  #1571

Closed
Closed

Description

@zhukovnv84

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.  

Activity

  1. added
    type: questionRequest for information or clarification. Not an issue.
    on Dec 20, 2019
  2. jackson-lucas commented on Jan 7, 2020

    @jackson-lucas

    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 :)

  3. fhinkel commented on Jan 15, 2020

    @fhinkel
    Contributor

    👋 @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questionRequest for information or clarification. Not an issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions