snapcraft hides error traces

Bug #1790455 reported by Michał Sawicz
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Status tracked in Trunk
Fix Committed
Kyle Fazzari
Fix Released
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/tmpoa2izsq_/trace.txt'.
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:

Revision history for this message
James Henstridge (jamesh) wrote :

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.

Revision history for this message
Michał Sawicz (saviq) wrote :

In theory I could cat /tmp/*/trace.txt to get the output, so maybe that's good enough for now.

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.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.