I have a two part question.
-
Is testing with in other environments needed for snaps? As I understand, a snap is supposed to contain all needed dependencies and hence should be portable to all distros supporting snapd. What is the purpose for testing the snapcraft.yaml with CircleCI.
-
How do i debug the error message from CircleCI’s output. What is the error of my Snapcraft.yaml and what is the error from my CircleCI configuration.
This is the last of the error code I received, but I dont know how to continue on tracing through the error output. The snapcraft.yaml file build fine on computer.
Priming magic
Sorry, Snapcraft ran into an error when trying to running through its
lifecycle that generated a trace that has been put in '/tmp/tmpcwued0rq/trace.txt'.
"Submitting this error to the Snapcraft developers is not possible through the CLI
without Raven installed.
If you wish to report this issue, please copy the contents of the previous traceback
and submit manually at https://launchpad.net/snapcraft/+filebug.
Exited with code 1
Thanks for helping
Well, you can ensure if the recipe works or not without doing a cleanbuild at your end.
Try to catch and print this trace in the build log? Also I believe there’s an environmental variable to force Snapcraft to spew out the error traces.
You should also can do a rebuild at the local end using snapcraft cleanbuild
with LXD.
Hey! thanks for the tips.
It’s really alot of new systems to learn… snapcraft, circleci, now LXC or docker. Steep learning curve for anyone new. or just starting to dabble in contributing any code.
But LXC looks like a good option to test with before going to Circle CI. Will work on it. Thanks!
Made a mistake in thinking I need to be verse in LXD. I ran snapcraft cleanbuild
successfully and have not encountered any errors. That trace error I got seem to happen only to my circleci
I don’t know circleci’s setup, but it would be helpful to try to get a copy of the backtrace that it tells you about in the failure. It will be named /tmp/tmp<random>/trace.txt
. You might be able to get it shown in the log by running cat /tmp/tmp*/trace.txt
in your circleci build script when the failure occurs. Something like this might work as the build command:
snapcraft || cat /tmp/tmp*/trace.txt
What this does is when snapcraft exits it checks the return code and runs the cat
if snapcraft exited with an error.
However, snapcraft defaults to waiting for input to acknowledge the message when it asks you whether to upload to the devs or not. That might mean that it will hang there indefinitely until circleci kills the entire build through a timeout…
1 Like