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

firebase deploy hangs after moving config

Open ghost opened this issue 9 years ago • 3 comments

I ran firebase init from this directory:

~/code/myproj/app $ firebase init

I set up hosting only, added some ignore rules, and successfully deployed:

~/code/myproj/app $ cat .firebaserc
{
  "projects": {
    "default": "[redacted]"
  }
}

~/code/myproj/app $ cat firebase.json 
{
  "hosting": {
    "public": "dest",
    "ignore": [
      "photos",
      "dest/photos"
    ]
  }
}

~/code/myproj/app $ firebase deploy

=== Deploying to '[redacted]'...

i  deploying hosting
i  hosting: preparing dest directory for upload...
Uploading: [                                        ] 0%
✔  hosting: dest folder uploaded successfully
✔  hosting: 30 files uploaded successfully
i  starting release process (may take several minutes)...

✔  Deploy complete!

All working fine except I now realise I should have initialised in the project root (~/code/myproj).

So I moved firebase.json and .firebaserc up a level and updated the paths within:

~/code/myproj $ mv app/firebase.json app/.firebaserc ./

~/code/myproj $ cat firebase.json 
{
  "hosting": {
    "public": "app/dest",
    "ignore": [
      "app/photos",
      "app/dest/photos"
    ]
  }
}

~/code/myproj $ cat .firebaserc 
{
  "projects": {
    "default": "[redacted]"
  }
}

Now running firebase deploy hangs indefinitely:

~/code/myproj $ firebase deploy --debug
----------------------------------------------------------------------
Command:      /usr/bin/node /usr/bin/firebase deploy --debug
CLI Version:  3.5.0
Platform:     linux
Node Version: v6.10.0
Time:         Sat Mar 25 2017 11:01:58 GMT+1100 (AEDT)
----------------------------------------------------------------------

> 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/[redacted]  
 Sat Mar 25 2017 11:01:58 GMT+1100 (AEDT)
<<< HTTP RESPONSE 200 server=nginx, date=Sat, 25 Mar 2017 00:01:59 GMT, content-type=application/json; charset=utf-8, content-length=106, 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/[redacted]/tokens  
 Sat Mar 25 2017 11:01:59 GMT+1100 (AEDT)
<<< HTTP RESPONSE 200 server=nginx, date=Sat, 25 Mar 2017 00:02:01 GMT, content-type=application/json; charset=utf-8, content-length=425, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store

=== Deploying to '[redacted]'...

i  deploying hosting
i  hosting: preparing app/dest directory for upload...
>>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/[redacted]/uploads/-Kg1lGkF4P-KdoHm-mBV?fileCount=804&message=  
 Sat Mar 25 2017 11:02:21 GMT+1100 (AEDT)

If I undo the above changes, move the two files back to the original folder, I can once again deploy successfully (from ~/code/myproj/app).

Is there configuration I need to change elsewhere in order to deploy successfully from ~/code/myproj?

Please let me know if there's anything else I can provide to help with this issue.

ghost avatar Mar 25 '17 00:03 ghost

@ribmo Sorry for the very late response! I can't quite figure out what's going on, changing those files should have been all that you needed to do. Are you still experiencing this? @mbleigh do you have any ideas?

laurenzlong avatar Jun 06 '17 17:06 laurenzlong

Just to be thorough, can you try removing ~/.config/configstore/firebase-tools.json, logging in again, and then trying to deploy from the parent dir?

On Tue, Jun 6, 2017 at 10:43 AM Lauren Long [email protected] wrote:

@ribmo https://github.com/ribmo Sorry for the very late response! I can't quite figure out what's going on, changing those files should have been all that you needed to do. Are you still experiencing this? @mbleigh https://github.com/mbleigh do you have any ideas?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/firebase/firebase-tools/issues/290#issuecomment-306563107, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAD_kOf5a7xfRWS1oFhxynwtTB1HNEyks5sBY-4gaJpZM4Mo5MB .

mbleigh avatar Jun 06 '17 17:06 mbleigh

Closing due to inactivity and the original user being deleted.

kevinajian avatar Jan 09 '19 00:01 kevinajian