0
votes

I was wondering if someone could see if there is anything that I am doing that is obviously wrong with running the firebase cli jode.js tool. I've tried a few tokens (some generated by the login:ci and some generated by a normal login), all to no avail. It seems that some commands are working (list, init), but I cannot get the data:get command to work. This seems to be a problem with the "--token" option: if I login normally ("firebase login") I am able to execute the "data:get / -f rentette" command without any problem.

Any help would be much appreciated!!

(Below is the output of the failing command).

[~/$] firebase --token "-XXXXXjzTKnX9c_7qO|9546a9bc98f70f0b5b55ceb08ca23156" list
┌──────────────────┬──────┬────────────────────┐
│ Name             │ Plan │ Collaborators      │
├──────────────────┼──────┼────────────────────┤
│ rentette         │ Free │ [email protected] │
├──────────────────┼──────┼────────────────────┤

[~/$] 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": {}
    }
  }
}
1

1 Answers

0
votes

May I know that where is your token coming from? If you still use legacy firebase authentication token, please update your token. Cause right now we updated firebase auth SDK, so the old token should be generated by the new auth SDK, otherwise it won't work on new Firebase.