Firebase-tools: Error: HTTP Error: 403, Unknown Error

Created on 28 Jan 2018  Β·  10Comments  Β·  Source: firebase/firebase-tools

Version info

3.17.4

Steps to reproduce

OS X 10.12.6
node -v

v8.9.3

tree .
``tree . . |-- firebase.json -- public
`-- index.html

1 directory, 2 files

ls -a
``` ls -a
.firebaserc firebase.json   public

Then I run firebase deploy,

image

Expected behavior

Actual behavior

Most helpful comment

Yes, you won't be able to deploy to a project you only have "viewer" permission on. You should be able to deploy by doing:

firebase use example-7630b
firebase deploy

All 10 comments

Please run with --debug and provide the results. Do you have access to the
fir-demo-project project?

On Sun, Jan 28, 2018, 6:59 AM kimown notifications@github.com wrote:

Version info

3.17.4
Steps to reproduce

OS X 10.12.6
node -v

v8.9.3

tree .

.
|-- firebase.json
-- public -- index.html

1 directory, 2 files

ls -a

.firebaserc firebase.json public

Then I run firebase deploy,

[image: image]
https://user-images.githubusercontent.com/7932380/35483562-97d06a20-047e-11e8-9a66-ffb69ed3de04.png
Expected behavior Actual behavior

β€”
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/641, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAAD_kXDHZOyDuR8AwVCt56Q1OW61NDWks5tPItmgaJpZM4RvuUi
.

@mbleigh

firebase deploy --debug

=== Deploying to 'fir-demo-project'...

i  deploying hosting
i  hosting: preparing public directory for upload...
[2018-01-29T01:53:16.132Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/fir-demo-project/uploads/-L3zb_9i-Z15MlRlbtCs?fileCount=1&message=  

 Mon Jan 29 2018 09:53:16 GMT+0800 (CST)
[2018-01-29T01:53:17.738Z] <<< HTTP RESPONSE 403 server=nginx, date=Mon, 29 Jan 2018 01:53:17 GMT, content-type=application/json; charset=utf-8, content-length=89, connection=close, access-control-allow-origin=*, access-control-allow-methods=GET, PUT, POST, DELETE, OPTIONS, strict-transport-security=max-age=31556926; includeSubDomains; preload, x-content-type-options=nosniff
[2018-01-29T01:53:17.738Z] <<< HTTP RESPONSE BODY code=403, message=The caller does not have permission, status=PERMISSION_DENIED

Error: HTTP Error: 403, Unknown Error
[2018-01-29T01:53:17.741Z] Error Context: {
  "body": {
    "code": 403,
    "message": "The caller does not have permission",
    "status": "PERMISSION_DENIED",
    "error": {
      "message": "Unknown Error"
    }
  },
  "response": {
    "statusCode": 403,
    "body": {
      "code": 403,
      "message": "The caller does not have permission",
      "status": "PERMISSION_DENIED",
      "error": {
        "message": "Unknown Error"
      }
    },
    "headers": {
      "server": "nginx",
      "date": "Mon, 29 Jan 2018 01:53:17 GMT",
      "content-type": "application/json; charset=utf-8",
      "content-length": "89",
      "connection": "close",
      "access-control-allow-origin": "*",
      "access-control-allow-methods": "GET, PUT, POST, DELETE, OPTIONS",
      "strict-transport-security": "max-age=31556926; includeSubDomains; preload",
      "x-content-type-options": "nosniff"
    },
    "request": {
      "uri": {
        "protocol": "https:",
        "slashes": true,
        "auth": null,
        "host": "deploy.firebase.com",
        "port": 443,
        "hostname": "deploy.firebase.com",
        "hash": null,
        "search": "?fileCount=1&message=",
        "query": "fileCount=1&message=",
        "pathname": "/v1/hosting/fir-demo-project/uploads/-L3zb_9i-Z15MlRlbtCs",
        "path": "/v1/hosting/fir-demo-project/uploads/-L3zb_9i-Z15MlRlbtCs?fileCount=1&message=",
        "href": "https://deploy.firebase.com/v1/hosting/fir-demo-project/uploads/-L3zb_9i-Z15MlRlbtCs?fileCount=1&message="
      },
      "method": "PUT"
    }
  }
}

firebase list

firebase list
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Name                            β”‚ Project ID / Instance β”‚ Permissions β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Firebase Demo Project (current) β”‚ fir-demo-project      β”‚ Viewer      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ example                         β”‚ example-7630b         β”‚ Owner       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

I think problem is the Viewer permission?

I am following this tutorial:https://firebase.google.com/docs/hosting/quickstart

Yes, you won't be able to deploy to a project you only have "viewer" permission on. You should be able to deploy by doing:

firebase use example-7630b
firebase deploy

@mbleigh

Thanks ^_^

I had a similar issue. I was actually signed into a different Firebase account in my CLI. After running firebase logout and firebase login with the correct Firebase account it worked fine.

@mbleigh 's comment helped me to figure out what happened.
I have already logged in with firebase but using another account.
So I need to log out using: firebase logout
Then firebase login again with the appropriate account.
And after that, I want to use firebase projects:list to list up all projects belong to this user.

I had a similar issue. I was actually signed into a different Firebase account in my CLI. After running firebase logout and firebase login with the correct Firebase account it worked fine.

This worked for me. Thank you!

Had the same issue, but restarting my computer then doing firebase login worked for me. Thanks!

Just retrying worked for me 🀷

I had the same issue. But I had actually not provisioned Functions in the Management Console. All I had to do was go to the console > Cloud Functions and click on Get Started and finish the prompt.

Was this page helpful?
0 / 5 - 0 ratings