snapcraft hides error traces
Bug #1790455 reported by
Michał Sawicz
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Snapcraft | Status tracked in Trunk | |||||
Legacy |
Fix Committed
|
Medium
|
Kyle Fazzari | |||
Trunk |
Fix Released
|
Medium
|
Kyle Fazzari |
Bug Description
When snapcraft encounters an error, it displays this:
--
Sorry, Snapcraft ran into an error when trying to running through its
lifecycle that generated a trace that has been put in '/tmp/tmpoa2izs
You can anonymously report this issue to the snapcraft developers.
No other data than this traceback and the version of snapcraft in
use will be sent.
Would you like send this error data? (Yes/No/Always) [no]:
--
In CI, however, this is unhelpful, and waits indefinitely (I think travis does allocate a terminal, so checking for that alone might not be enough. A '--non-interactive' option or so could help.
Related wishlist bug: https:/
Changed in snapcraft: | |
assignee: | nobody → Kyle Fazzari (kyrofa) |
importance: | Undecided → Medium |
milestone: | none → 2.44 |
status: | New → Triaged |
Changed in snapcraft: | |
status: | Triaged → Fix Committed |
To post a comment you must log in.
Looking at the exception handler, it looks like there are two ways you could avoid the prompt:
1. set SNAPCRAFT_ ENABLE_ ERROR_REPORTING =0 to disable the Sentry error reporting completely.
2. set SNAPCRAFT_ ENABLE_ SILENT_ REPORT= 1 to leave Sentry error reporting enabled, and send without prompting.
In either case, it still ends up writing the traceback to /tmp, which is going to disappear when the CI job completes. That's not particularly useful in determining what the failure actually is.
I've run into the same issue (minus the interactive prompts) in Snapcraft's own CI, so it'd be nice if there was an environment variable to get it to print full tracebacks in cases like this.