Firebase-tools - "Failed to parse authentication token"

I was wondering if anyone could see if there is anything that I am doing, which is obviously wrong with running the firebase cli jode.js toolkit. I tried several tokens (some are generated by login: ci and some are generated by a normal login), all to no avail. It seems that some commands work (list, init), but I can’t get the data: get the command to work. This seems to be a problem with the "--token" option: if I log in normally ("logging into firebase"), I can run the command "data: get / -f rentette" without any problems.

Any help would be greatly appreciated!

(Below is the output of the failure command).

[~/$] firebase --token "-XXXXXjzTKnX9c_7qO|9546a9bc98f70f0b5b55ceb08ca23156" list
┌──────────────────┬──────┬────────────────────┐
│ Name             │ Plan │ Collaborators      │
├──────────────────┼──────┼────────────────────┤
│ rentette         │ Free │ nick@xxxxx.net │
├──────────────────┼──────┼────────────────────┤

[~/$] firebase --token "-XXXXXjzTKnX9c_7qO|YYYYYYYYYYYYYYYY5ceb08ca23156" data:get / -f rentette --debug
----------------------------------------------------------------------
Command:      /usr/bin/node /home/nhamilton/.npm-packages/bin/firebase --token -XXXXXjzTKnX9c_7qO|YYYYYYYYYYYYYYYY5ceb08ca23156 data:get / -f rentette --debug
Platform:     linux
Node Version: v5.10.1
Time:         Fri Apr 15 2016 11:31:20 GMT+1000 (AEST)
----------------------------------------------------------------------

Error: Could not parse auth token.
Error Context: {
  "body": {
    "error": "Could not parse auth token."
  },
  "response": {
    "statusCode": 400,
    "headers": {
      "content-length": "46",
      "content-type": "application/json; charset=utf-8",
      "cache-control": "no-cache",
      "strict-transport-security": "max-age=31556926; includeSubDomains; preload",
      "connection": "close"
    },
    "request": {
      "uri": {
        "protocol": "https:",
        "slashes": true,
        "auth": null,
        "host": "rentette.firebaseio.com",
        "port": 443,
        "hostname": "rentette.firebaseio.com",
        "hash": null,
        "search": "?auth=-XXXXXjzTKnX9c_7qO%7cYYYYYYYYYYYYYY5ceb08ca23156",
        "query": "auth=-XXXXXjzTKnX9c_7qO%7cYYYYYYYYYYYYYY5ceb08ca23156",
        "pathname": "/.json",
        "path": "/.json?auth=-XXXXXjzTKnX9c_7qO%7cYYYYYYYYYYYYYY5ceb08ca23156",
        "href": "https://rentette.firebaseio.com/.json?auth=-XXXXXjzTKnX9c_7qO%7cYYYYYYYYYYYYYY5ceb08ca23156"
      },
      "method": "GET",
      "headers": {}
    }
  }
}
0
1

, ? - firebase, . : SDK firebase, SDK , Firebase.

0

Source: https://habr.com/ru/post/1680325/


All Articles