GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Google Cloud Functions Cloud Datastore sample error · Issue #929 · GoogleCloudPlatform/nodejs-docs-samples

Google Cloud Functions Cloud Datastore sample error #929

New issue
Copy link
New issue
Copy link
Closed
Closed
Google Cloud Functions Cloud Datastore sample error#929
Copy link

Description

@jamie-chapman
jamie-chapman
opened on Nov 23, 2018
Issue body actions

The tutorial in https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/functions/datastore

Example appears to not accept the sample JSON object in the function "gcloud functions call set --data '{"kind":"Task","key":"sampletask1","value":{"description":"Buy milk"}}'".

The error below is given.

ERROR: (gcloud.functions.call) Invalid value for [--data]: Is not a valid JSON: No JSON object could be decoded

Activity

  1. jamie-chapman
    changed the title [-]Google Cloud Functions Cloud Datastore sample[/-] [+]Google Cloud Functions Cloud Datastore sample error[/+] on Nov 23, 2018
  2. fhinkel commented on Nov 26, 2018

    @fhinkel
    fhinkel
    on Nov 26, 2018
    Contributor
    More actions

    Hi 👋 . Thanks for reporting the issue. I can't reproduce the error. Are you using the newest gcloud version (Google Cloud SDK 226.0.0)?

    gcloud functions call set --data '{"kind":"Task","key":"sampletask1","value":{"description":"Buy milk"}}'
    executionId: **********
    result: Entity Task/sampletask1 saved.
  3. jamie-chapman commented on Nov 26, 2018

    @jamie-chapman
    jamie-chapman
    on Nov 26, 2018
    Author
    More actions

    Hi! Yes I am using version 226.0.0
    gcloud --version Google Cloud SDK 226.0.0 alpha 2018.11.09 bq 2.0.38 core 2018.11.16 gsutil 4.34

    Also using Node version v10.13.0 and Windows 10 version 1709, OS Build 16299.785

  4. fhinkel commented on Nov 26, 2018

    @fhinkel
    fhinkel
    on Nov 26, 2018
    Contributor
    More actions

    Could you post the full command that you tried? Everything worked fine for me when I copied the instructions. Do you have the API enabled?

  5. jamie-chapman commented on Nov 29, 2018

    @jamie-chapman
    jamie-chapman
    on Nov 29, 2018
    Author
    More actions

    Yes the API is enabled, I have since successfully created some Cloud functions that read JSON data and create an entity in Datastore.
    Here's a trace of the commands I used for the example:
    \nodejs-docs-samples-master\nodejs-docs-samples-master\functions\datastore
    gcloud functions deploy get --trigger-http
    gcloud functions deploy set --trigger-http
    gcloud functions deploy del --trigger-http
    gcloud functions call set --data '{"kind":"Task","key":"sampletask1","value":{"description":"Buy milk"}}'

    ERROR: (gcloud.functions.call) Invalid value for [--data]: Is not a valid JSON: No JSON object could be decoded

  6. fhinkel commented on Nov 29, 2018

    @fhinkel
    fhinkel
    on Nov 29, 2018
    Contributor
    More actions

    Strange, following the same example I can't reproduce the error. But you're able to create other cloud functions?

  7. fhinkel
    closed this as completedon Dec 14, 2018
  8. ace-n
    added a commit that references this issue on Nov 16, 2022

    chore(main): release 5.0.3 (#929)

    0b21815
  9. telpirion
    added a commit that references this issue on Nov 16, 2022

    chore: release 2.3.7 (#929)

    916678f
  10. ace-n
    added a commit that references this issue on Nov 17, 2022

    chore(main): release 5.0.3 (#929)

    c10e749
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.