21

Is it possible to get verbose logging in Firebase's deploy tool?

I am trying to enable Angular Universal on my site, following this guide: https://hackernoon.com/deploying-angular-universal-v6-with-firebase-c86381ddd445

My app builds just fine, but when executing a firebase deploy, I get this <sarcasm>super helpful</sarcasm> error message:

enter image description here

I would love to know what I am doing wrong, but as it appears Firebase really isn't sure. I checked the log screen under the Firebase console, but it is empty.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
eat-sleep-code
  • 4,753
  • 13
  • 52
  • 98
  • 9
    `firebase --help`? `firebase --debug`? That error looks like something is getting blocked. Like perhaps your network/isp/country is blocking access to the Functions endpoint? Unsure, but maybe the debug output will have clues. – Kato Dec 21 '18 at 15:59
  • Thanks! Running it now – eat-sleep-code Dec 21 '18 at 16:02
  • "Your proposed upload is larger than the maximum object size specified in your Policy Document. " I guess, I am wondering why the functions are 131MB???? – eat-sleep-code Dec 21 '18 at 16:03
  • 2
    Hm, that's odd, but at least informative. Seems likely to be node_modules/ directory that's the culprit? Or maybe it's uploading the wrong directory. Probably need to share your firebase.json and debug output to help find a starting point. Might just try something like `ls -lhR` in the functions directory for more clues. Also probably want to isolate Functions deploy with `firebase --only functions --debug deploy` or similar. Hop on https://firebase.community if you want to troubleshoot. – Kato Dec 21 '18 at 16:07
  • Got a successful deploy, not sure what I gained. :-) Doesn't seem to return the precompiled page, still is dynamically building at runtime (i.e. view Source still shows "Loading" instead of the real pages loaded on there). The whole point of universal was so i would have the precompiled pages for SEO reasons. – eat-sleep-code Dec 21 '18 at 16:36
  • Figured out I am actually getting an error now in the logs... `Unhandled Promise rejection: document is not defined ; Zone: ; Task: Promise.then ; Value: ReferenceError: document is not defined at new CssKeyframesDriver (/user_code/node_modules/@angular/animations/bundles/animations-browser.umd.js:4246:26) at instantiateSupportedAnimationDriver (/user_code/node_modules/@angular/platform-browser/bundles/platform-browser-animations.umd.js:412:88)` – eat-sleep-code Dec 21 '18 at 19:56
  • Did you ever find a solution for this? I'm running into the exact same error using the same tutorial. How did you get the error to display? I'm only getting Error: HTTP Error: 400, Unknown Error in the console when I deploy. – dc922 Nov 17 '19 at 18:10
  • @dc922 honestly I don't remember the solution was. I am still using Firebase, but no longer using Angular. – eat-sleep-code Nov 18 '19 at 22:04

3 Answers3

8

If there is still someone having the same question/ issue, this may help:

firebase functions:log
ADog
  • 89
  • 1
  • 2
8

You can view options for the Firebase CLI tool by running firebase --help:

>> firebase --help
Usage: firebase [options] [command]

Options:
  -V, --version                           output the version number
  -P, --project <alias_or_project_id>     the Firebase project to use for this command
  --account <email>                       the Google account to use for authorization
  -j, --json                              output JSON instead of text, also triggers non-interactive mode
  --token <token>                         supply an auth token for this command
  --non-interactive                       error out of the command instead of waiting for prompts
  -i, --interactive                       force prompts to be displayed
  --debug                                 print verbose debug output and keep a debug log file
  -c, --config <path>                     path to the firebase.json file to use for configuration
  -h, --help                              output usage information
...

As you can see here, you can use the --debug flag on any Firebase command to get more verbose output.

palsch
  • 5,528
  • 4
  • 21
  • 32
0

If you're using the gcloud CLI to deploy functions gcloud functions deploy (which deploys it to the same place as firebase cloud functions), you can use the verbosity flag

--verbosity=debug

or info, warning, error, critical, or none

https://cloud.google.com/sdk/gcloud/reference#--verbosity

JaredEzz
  • 194
  • 2
  • 6