← Back to issue list

Misleading error messages

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1719968
Type
issue
State
closed
Author
~aleixpol-kde
Labels
—
Created
Updated
Closed

Current evaluation

Build failures no longer emitted two confusing Python tracebacks, following snapcore/snapcraft#1512. Maintainers confirmed the change shipped with the Raven work.

Resolution: closed resolved

Reason: Kalikiana stated that snapcore/snapcraft#1512 addressed the misleading tracebacks. Sergiusens later confirmed the fix was released with the Raven work.

Evaluated by: mr-cal-bot

No scores available.

Issue body

My snapcraft.yaml is wrong and misses a dependency. cmake complains and returns!=0. snapcraft will show 2 massive python tracebacks of when it realised that it's not right. It's not very relevant information to the snapcraft user. -- Performing Test HAVE_WNO_MISSING_FIELD_INITIALIZERS - Success -- Performing Test HAVE_WERROR_UNDEFINED_BOOL_CONVERSION -- Performing Test HAVE_WERROR_UNDEFINED_BOOL_CONVERSION - Failed -- Performing Test HAVE_WERROR_TAUTOLOGICAL_UNDEFINED_COMPARE -- Performing Test HAVE_WERROR_TAUTOLOGICAL_UNDEFINED_COMPARE - Failed CMake Warning at kdevplatform/CMakeLists.txt:20 (find_package): Could not find a package configuration file provided by "Grantlee5" with any of the following names: Grantlee5Config.cmake grantlee5-config.cmake Add the installation prefix of "Grantlee5" to CMAKE_PREFIX_PATH or set "Grantlee5_DIR" to a directory containing one of the above files. If "Grantlee5" provides a separate development package or SDK, be sure it has been installed. -- Could NOT find Boost -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success -- Looking for malloc.h -- Looking for malloc.h - found -- Looking for malloc_trim -- Looking for malloc_trim - found -- Performing Test HAVE_MSG_NOSIGNAL -- Performing Test HAVE_MSG_NOSIGNAL - Success CMake Error at kdevplatform/template/filters/CMakeLists.txt:2 (grantlee_adjust_plugin_name): Unknown CMake command "grantlee_adjust_plugin_name". CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: /root/build_kdevelop/parts/kdevelop/src/kdevplatform/language/Boost_INCLUDE_DIR used as include directory in directory /root/build_kdevelop/parts/kdevelop/src/kdevplatform/language -- Configuring incomplete, errors occurred! See also "/root/build_kdevelop/parts/kdevelop/build/CMakeFiles/CMakeOutput.log". See also "/root/build_kdevelop/parts/kdevelop/build/CMakeFiles/CMakeError.log". Traceback (most recent call last): File "/usr/bin/snapcraft", line 9, in <module> load_entry_point('snapcraft==2.34', 'console_scripts', 'snapcraft')() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point return ep.load() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2229, in load return self.resolve() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2235, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python3/dist-packages/snapcraft/cli/__main__.py", line 19, in <module> run(prog_name='snapcraft') File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/cli/lifecycle.py", line 132, in snap project_options, directory=directory, output=output) File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 349, in snap execute('prime', project_options) File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 130, in execute _Executor(config, project_options).run(step, part_names) File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 225, in run self._run_step(step, part, part_names) File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 262, in _run_step getattr(part, step)() File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler/__init__.py", line 330, in build self.plugin.build() File "/usr/lib/python3/dist-packages/snapcraft/plugins/cmake.py", line 80, in build self.options.configflags, env=env) File "/usr/lib/python3/dist-packages/snapcraft/_baseplugin.py", line 202, in run return common.run(cmd, cwd=cwd, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/internal/common.py", line 63, in run subprocess.check_call(['/bin/sh', f.name] + cmd, **kwargs) File "/usr/lib/python3.5/subprocess.py", line 581, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/bin/sh', '/tmp/tmpqguxexuf', 'cmake', '/root/build_kdevelop/parts/kdevelop/src', '-DCMAKE_INSTALL_PREFIX=', '-DKDE_INSTALL_USE_QT_SYS_PATHS=ON', '-DCMAKE_INSTALL_PREFIX=/usr', '-DCMAKE_BUILD_TYPE=Release', '-DENABLE_TESTING=OFF', '-DBUILD_TESTING=OFF', '-DKDE_SKIP_TEST_SETTINGS=ON']' returned non-zero exit status 1 Stopping local:snapcraft-kindly-crisp-vervet Traceback (most recent call last): File "/home/apol/devel/playground/snapcraft/bin/snapcraft", line 36, in <module> obj=dict(project=snapcraft.ProjectOptions())) File "/usr/lib/python3.6/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3.6/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3.6/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3.6/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/home/apol/devel/playground/snapcraft/snapcraft/cli/lifecycle.py", line 193, in cleanbuild lifecycle.cleanbuild(project_options, remote) File "/home/apol/devel/playground/snapcraft/snapcraft/internal/lifecycle.py", line 338, in cleanbuild metadata=config.get_metadata(), remote=remote).execute() File "/home/apol/devel/playground/snapcraft/snapcraft/internal/lxd.py", line 167, in execute raise e File "/home/apol/devel/playground/snapcraft/snapcraft/internal/lxd.py", line 161, in execute self._container_run(command, cwd=self._project_folder) File "/home/apol/devel/playground/snapcraft/snapcraft/internal/lxd.py", line 114, in _container_run **kwargs) File "/usr/lib/python3.6/subprocess.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['lxc', 'exec', 'local:snapcraft-kindly-crisp-vervet', '--', 'sh', '-c', 'cd /root/build_kdevelop; snapcraft snap --output kdevelop_5.2_amd64.snap']' returned non-zero exit status 1.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Build failures no longer emitted two confusing Python tracebacks, following snapcore/snapcraft#1512. Maintainers confirmed the change shipped with the Raven work.
stealth/space-bunny-alpha — closed resolved Report of raw Python tracebacks on build failure. Original fix PR #1512 closed unmerged; finally addressed by merged PR #2132 (commit 4936eff8c), adding a generic exception for common.run[_output].
stealth/space-bunny-alpha — closed resolved Fixed in canonical/snapcraft#2004 (2308ee4e0), adding specific error handling for plugin command failures instead of exposing raw Python tracebacks.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The report described misleading Python tracebacks when cmake fails due to missing dependencies. With zero comments and years of inactivity, the issue appears abandoned or marked stale.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The report notes that missing dependencies cause snapcraft to output verbose Python tracebacks instead of clear error messages. No fix or follow-up was provided.
qwen/qwen3.6-35b-a3b — — Closed without resolution. Snapcraft outputs verbose Python tracebacks instead of clear errors when cmake fails due to missing dependencies. No comments or fixes were provided, indicating the issue was abandoned.
qwen3.6-35b-a3b-mtp-q6 — — Abandoned due to inactivity. The report highlighted confusing Python tracebacks when CMake fails from missing dependencies, but no error handling improvements were implemented.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#1512 (confidence 99%)

    A maintainer identified this PR as the resolution, and a later comment confirmed its release.

Related issues

Issue Project State Summary Similarity
#2242 Error communication improvements snapcraft merged Merged in #2242 via commit 4cdf0c6c2, printing tracebacks when Raven is unavailable and clarifying that internal errors should be reported to Snapcraft.
77%
#1790752 Improve experience when raven is not installed snapcraft (launchpad) closed Improved missing-raven error UX by showing the full traceback and advising users to include it in bug reports; fixed in snapcore/snapcraft#2242.
72%