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

Unable to deploy behind a proxy

Open ymainier opened this issue 10 years ago • 169 comments

Hi,

I'm following the firebase web tutorial (https://codelabs.developers.google.com/codelabs/firebase-web/). Everything works fine for the 8 first steps, but in step 9 I have a problem : the command firebase deploy hangs indefinitely. I have this behavior while being behind a proxy (http_proxy and https_proxy are set in the env).

Is there a way to deploy behind a proxy ? This seems related to issue #36

Yann


Here is the output of firebase deploy --debug

----------------------------------------------------------------------
Command:      node /Users/ymainier/.nvm/versions/node/v0.12.1/bin/firebase deploy --debug
CLI Version:  3.0.0
Platform:     darwin
Node Version: v0.12.1
Time:         Wed May 25 2016 16:46:59 GMT+0200 (CEST)
----------------------------------------------------------------------

> command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase"]
>>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/friendlychat-dd6a6 
<<< HTTP RESPONSE 200 server=nginx, date=Wed, 25 May 2016 14:47:57 GMT, content-type=application/json; charset=utf-8, content-length=124, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
>>> HTTP REQUEST GET https://admin.firebase.com/v1/database/friendlychat-dd6a6/tokens 
<<< HTTP RESPONSE 200 server=nginx, date=Wed, 25 May 2016 14:47:57 GMT, content-type=application/json; charset=utf-8, content-length=433, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store

ymainier avatar May 26 '16 06:05 ymainier

This is a known issue. We'd like to figure out a workaround, but it may take some time. I'll leave the issue open to track.

mbleigh avatar May 27 '16 00:05 mbleigh

I have the same problem, the firebase team just write me this:

"Not possible at the moment, tracking here: https://github.com/firebase/firebase-tools/issues/155 but no timeline on a fix."

Actually referring me to this page XP

Hope this will be fix soon, since many of us developers use this tools at work

summers173 avatar Jun 01 '16 14:06 summers173

I have the same problem. Makes it hard to eval firebase in many work environments. :( Also, I have a problem via my satellite inet at home (opening separate issue for that) :(_

aprice2704 avatar Jul 08 '16 05:07 aprice2704

Same Problem here ! Also this problem is there with all firebase functions on android except authentication.

rohitsuratekar avatar Jul 24 '16 05:07 rohitsuratekar

Wel I managed to get it working on my work, but I just can't login,

I also tried doing the ``firebase login --no-localhostbut that gave just aError: Authentication Error.`

cskiwi avatar Aug 01 '16 06:08 cskiwi

same problem ..

yuxizhe avatar Sep 07 '16 03:09 yuxizhe

I've came to this problem twice ..

echopi avatar Oct 04 '16 05:10 echopi

The timeout occurs when the Firebase node module makes a connection using faye-websockets, which does not make use of http_proxy and associated environment variables.

There is a comment on StackOverflow that describes how to hard-code the proxy config in faye-websockets as a work-around.

Not elegant, but at least I can deploy now :)

sel avatar Oct 12 '16 15:10 sel

Firebase login failed
https://github.com/firebase/firebase-tools/issues/250
https://github.com/firebase/firebase-tools/issues/240
https://github.com/firebase/firebase-tools/issues/249

xgqfrms-GitHub avatar Jan 11 '17 13:01 xgqfrms-GitHub

Same issue here. All the other firebase commands seem to work just fine. "firebase deploy" is the only one getting stuck. At the very least a proper error message would be nice.

T:\ng\firebaseutil>firebase deploy --debug
----------------------------------------------------------------------
Command:      C:\Program Files\nodejs\node.exe C:\Users\myusername\AppData\Roaming\npm\node_modules\firebase-tools\bin\firebase deploy --debug
CLI Version:  3.2.1
Platform:     win32
Node Version: v7.3.0
Time:         Wed Jan 25 2017 11:04:37 GMT-0500 (Eastern Standard Time)
----------------------------------------------------------------------

> command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase"]
>>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/myprojectname-b5558
<<< HTTP RESPONSE 200 via=IG Proxy, date=Wed, 25 Jan 2017 16:04:38 GMT, server=nginx, connection=Close, content-type=application/json; charset=utf-8, cache-control=no-cache, no-store, content-length=103, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains
>>> HTTP REQUEST GET https://admin.firebase.com/v1/database/myprojectname-b5558/tokens
<<< HTTP RESPONSE 200 via=IG Proxy, date=Wed, 25 Jan 2017 16:04:38 GMT, server=nginx, connection=Close, content-type=application/json; charset=utf-8, cache-control=no-cache, no-store, content-length=423, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains```
<<stuck right here>>

tolgabalci avatar Jan 25 '17 16:01 tolgabalci

when I "firebase login" ,there is the problem..I solved by "firebase login --no-localhost" for now. But "firebase init"and "firebase deploy" I can't fix it. Always "Authentication Error"

yunfengsa avatar Mar 17 '17 12:03 yunfengsa

same problem..

chinsyo avatar Mar 24 '17 01:03 chinsyo

One year and still no fix?

Come on, evil googol..

henriquedesousa avatar Mar 27 '17 11:03 henriquedesousa

Same issue here. Here is the command I'm calling and get same error:

firebase database:set /object_name

Ernesto-Valdes avatar Mar 28 '17 20:03 Ernesto-Valdes

Same issue here!!!!

"Error: Authentication Error: Your credentials are no longer valid. Please run firebase login --reauth For CI servers and headless environments, generate a new token with firebase login:ci"

tingxins avatar Apr 10 '17 07:04 tingxins

is there no way to deploy behind proxy?

it is my log

[debug] ----------------------------------------------------------------------
[debug] Command:      C:\Program Files\nodejs\node.exe C:\Users\SDS\AppData\Roaming\npm\node_modules\firebase-tools\bin\firebase deploy
[debug] CLI Version:  3.6.1
[debug] Platform:     win32
[debug] Node Version: v7.8.0
[debug] Time:         Mon Apr 17 2017 13:35:27 GMT+0900 (대한민국 표준시)
[debug] ----------------------------------------------------------------------
[debug] 
[debug] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token { refresh_token: '1/cLqub4wdfbPJfm6Rswlzb8L2uA7zXG1SrmTLx17kZ1w',
  client_id: '563584335869-fgrhgmd47bqne........................apps.googleusercontent.com',
  client_secret: 'j9iVZfS8kkCEFU.........',
  grant_type: 'refresh_token',
  scope: 'email https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase openid' } 
 Mon Apr 17 2017 13:35:27 GMT+0900 (대한민국 표준시)
[debug] <<< HTTP RESPONSE 200
[debug] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/sample-b36e9  
 Mon Apr 17 2017 13:35:29 GMT+0900 (대한민국 표준시)
[debug] <<< HTTP RESPONSE 200
[debug] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/sample-b36e9/tokens  
 Mon Apr 17 2017 13:35:30 GMT+0900 (대한민국 표준시)
[debug] <<< HTTP RESPONSE 200

@tingxins hi, did you tried after below command?

set "NODE_TLS_REJECT_UNAUTHORIZED=0"

enif-lee avatar Apr 17 '17 04:04 enif-lee

Firebase devs please solve this issue, it a serious dev delay up to date.

ChampIsMe avatar May 28 '17 19:05 ChampIsMe

Why is it not solved until now?

zakali22 avatar Jun 04 '17 17:06 zakali22

one year

oneingfw avatar Jun 13 '17 04:06 oneingfw

It still happens and keeps bothering me... Maybe I will give up firebase because I am in China...

Symbolk avatar Jun 28 '17 14:06 Symbolk