firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Cli output as Json throws error

Open tamalsaha opened this issue 10 years ago • 4 comments

Json output using -j flag throws error. Example command below:

firebase data:push /time -P myfb -d '{"syn":{".sv":"timestamp"}}' -j { "status": "error", "error": "Converting circular structure to JSON" }

tamalsaha avatar Jan 05 '16 22:01 tamalsaha

$ echo 'true' | firebase --json --debug database:push /sandbox
----------------------------------------------------------------------
Command:      /usr/local/Cellar/node/6.3.0/bin/node /usr/local/bin/firebase --json --debug database:push /sandbox
CLI Version:  3.0.4
Platform:     darwin
Node Version: v6.3.0
Time:         Thu Jul 28 2016 14:45:40 GMT-0700 (PDT)
----------------------------------------------------------------------

{
  "status": "error",
  "error": "Converting circular structure to JSON"
}

I'm seeing this too, six months later. I guess nobody uses the --json option?

jlgale avatar Jul 28 '16 21:07 jlgale

Database commands output json without the flag

On Thu, Jul 28, 2016, 2:47 PM James Gale [email protected] wrote:

$ echo 'true' | firebase --json --debug database:push /sandbox

Command: /usr/local/Cellar/node/6.3.0/bin/node /usr/local/bin/firebase --json --debug database:push /sandbox CLI Version: 3.0.4 Platform: darwin Node Version: v6.3.0

Time: Thu Jul 28 2016 14:45:40 GMT-0700 (PDT)

{ "status": "error", "error": "Converting circular structure to JSON" }

I'm seeing this too, six months later. I guess nobody uses the --json option?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/firebase/firebase-tools/issues/121#issuecomment-236035305, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAD_t79v-7RjD217TDGebZ58TYKfRJVks5qaSNfgaJpZM4G_Lsd .

mbleigh avatar Jul 28 '16 22:07 mbleigh

Hmmm, without the --json flag, the version I have outputs this:

Data pushed successfully

View data at: https://console.firebase.google.com/project/XXXXXXXXXX/database/data/sandbox/-KNnR16jghJzU4fn9-66

jlgale avatar Jul 29 '16 00:07 jlgale

This works now

Memeriaj avatar Jan 09 '19 01:01 Memeriaj