Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase deploy throwing unexpected error #756

Closed
SheikhSajid opened this issue Apr 27, 2018 · 7 comments
Closed

Firebase deploy throwing unexpected error #756

SheikhSajid opened this issue Apr 27, 2018 · 7 comments

Comments

@SheikhSajid
Copy link

SheikhSajid commented Apr 27, 2018

Version info

Firebase Version: 3.18.4

Platform Information

Windows 10

Steps to reproduce

firebase deploy --only hosting

Expected behavior

When I run firebase deploy for my hosting, I expect it to work. I was able to deploy cloud functions and it worked fine.

Actual behavior

This is the output from the cmd:

=== Deploying to 'kpr-chat-42e6a'...

i deploying hosting
i hosting: preparing build directory for upload...

Error: An unexpected error has occurred.

Here is what I found in the firebase-debug.log file:

[info] === Deploying to 'kpr-chat-42e6a'...
[info]
[info] i deploying hosting
[info] i hosting: preparing build directory for upload...
[debug] [2018-04-27T20:02:38.076Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/kpr-chat-42e6a/uploads/-LB7gpxQGpxwBSBI0HoY?fileCount=7&message=

Sat Apr 28 2018 02:02:38 GMT+0600 (Bangladesh Standard Time)
[debug] [2018-04-27T20:02:42.131Z] <<< HTTP RESPONSE 404
[debug] [2018-04-27T20:02:42.131Z] <<< HTTP RESPONSE BODY undefined
[debug] [2018-04-27T20:02:42.133Z] TypeError: Cannot read property 'error' of undefined
at module.exports (C:\Users\sheik\AppData\Roaming\npm\node_modules\firebase-tools\lib\responseToError.js:10:13)
at Request._callback (C:\Users\sheik\AppData\Roaming\npm\node_modules\firebase-tools\lib\api.js:47:25)
at Request.self.callback (C:\Users\sheik\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (C:\Users\sheik\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (C:\Users\sheik\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:1085:12)
at Object.onceWrapper (events.js:313:30)
[error]
[error] Error: An unexpected error has occurred.

@mbleigh
Copy link
Contributor

mbleigh commented Apr 27, 2018

This was due to a Firebase Hosting incident that is now closed.

@mbleigh mbleigh closed this as completed Apr 27, 2018
@filipemir
Copy link

I believe this issue is back. I'm no longer able to deploy:

[debug] [2018-10-28T12:01:35.908Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/stonybrook-strings-stg/uploads/-LPuYB9JMFICpnTuZko4?fileCount=597&message=  
  
 Sun Oct 28 2018 08:01:35 GMT-0400 (EDT)
[debug] [2018-10-28T12:01:41.034Z] <<< HTTP RESPONSE 410
[debug] [2018-10-28T12:01:41.034Z] <<< HTTP RESPONSE BODY undefined
[debug] [2018-10-28T12:01:41.035Z] TypeError: Cannot read property 'error' of undefined
    at module.exports (/usr/local/lib/node_modules/firebase-tools/lib/responseToError.js:10:13)
    at Request._callback (/usr/local/lib/node_modules/firebase-tools/lib/api.js:47:25)
    at Request.self.callback (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:186:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:1163:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:313:30)
[error] 
[error] Error: An unexpected error has occurred.

@mbleigh
Copy link
Contributor

mbleigh commented Oct 28, 2018 via email

@itsbrianburton
Copy link

I was experiencing the same problem and discovered that a separate installation of firebase-tools 3.17.6 was being called before the updated firebase-tools 6.0.1 in my global path. If you update firebase-tools but 'firebase -V' reports an earlier version, this is most likely your problem.

The solution was to remove all installations of firebase-tools on my system until the "firebase" gave me a "command not found" error.

Once the errant installation was removed, I globally installed firebase-tools and I could deploy again. Try that if no other solution has worked.

@RiChrisMurphy
Copy link

@itsbrianburton I'm having the same problem as you with firebase-tools 3.17.4, but can't seem to remove the path. How did you end up removing all the installations?

@itsbrianburton
Copy link

@RiChrisMurphy Just repeatedly uninstall firebase-tools until it says that it's no longer installed.
npm remove -g firebase-tools

firebase -V
3.17.6

npm remove -g firebase-tools

firebase -V
6.0.1

npm remove -g firebase-tools
up to date in 4.629s

npm i -g firebase-tools@latest

Alternatively, either run where firebase or which firebase depending on your OS to find where it's installed and go there to remove the module.

@RiChrisMurphy
Copy link

RiChrisMurphy commented Nov 21, 2018

Thanks, I ended up having problems with nvm / homebrew node installations which was the problem. Finally fixed it by manually removing it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants