Verbose logging of Firebase deploy?
Asked Answered
S

3

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.

Strobile answered 21/12, 2018 at 15:55 Comment(8)
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.Byrd
Thanks! Running it nowStrobile
"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????Strobile
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 firebase.community if you want to troubleshoot.Byrd
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.Strobile
Figured out I am actually getting an error now in the logs... Unhandled Promise rejection: document is not defined ; Zone: <root> ; 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)Strobile
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.Flashlight
@Flashlight honestly I don't remember the solution was. I am still using Firebase, but no longer using Angular.Strobile
C
12

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.

Capapie answered 25/8, 2021 at 0:33 Comment(0)
M
8

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

firebase functions:log
Maestas answered 24/2, 2021 at 20:31 Comment(0)
G
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

Georama answered 9/6, 2022 at 21:35 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.