← Back to issue list

An error occurred building hello world Snapcraft

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1797795
Type
issue
State
open
Author
~pop-alx
Labels
Created
Updated
Closed

Current evaluation

Snapcraft 2.43.1 prime crashes with FileNotFoundError when app command points to bin/hello, but only gnu-bash part is built so the binary doesn't exist. User configuration error, 7.9 years old, 0 comments, no labels.

Suggested action: close not a bug

Reason: The user's snapcraft.yaml defines an app with 'command: bin/hello' but the only part built is gnu-bash (which produces bin/bash, not bin/hello). No part builds the hello binary, so prime/bin/hello correctly does not exist. This is a user configuration error, not a snapcraft bug. The issue is 2878 days old with 0 comments and no maintainer engagement.

Impact: 10 Quick Win: 9.0 Staleness: 95 Complexity: 10 Confidence: 75 Support Request: 85

Issue body

I am trying to build hello world snap. The snapcraft.yaml is: name: hello version: '2.10' summary: GNU Hello, the "hello world" snap description: | GNU hello prints a friendly greeting. grade: devel confinement: devmode apps: hello: command: bin/hello bash: command: bash parts: gnu-bash: source: http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz plugin: autotools configflags: ["--infodir=/var/bash/info"] When I try to build the snap I got the next error: popalex@ubuntu18-esb:~/mysnaps/hello$ snapcraft prime Skipping pull gnu-bash (already ran) Skipping build gnu-bash (already ran) Skipping stage gnu-bash (already ran) Skipping prime gnu-bash (already ran) Sorry, an error occurred in Snapcraft: Traceback (most recent call last): File "/usr/bin/snapcraft", line 11, in <module> load_entry_point('snapcraft==2.43.1+18.4', 'console_scripts', 'snapcraft')() File "/usr/lib/python3/dist-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/cli/lifecycle.py", line 115, in prime _execute(steps.PRIME, parts, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/cli/lifecycle.py", line 35, in _execute lifecycle.execute(step, project_config, parts) File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_runner.py", line 90, in execute executor.run(step, part_names) File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_runner.py", line 196, in run self._create_meta(step, processed_part_names) File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle/_runner.py", line 359, in _create_meta self.config.validator.schema, File "/usr/lib/python3/dist-packages/snapcraft/internal/meta/_snap_packaging.py", line 109, in create_snap_packaging packaging.write_snap_yaml() File "/usr/lib/python3/dist-packages/snapcraft/internal/meta/_snap_packaging.py", line 312, in write_snap_yaml snap_yaml = self._compose_snap_yaml() File "/usr/lib/python3/dist-packages/snapcraft/internal/meta/_snap_packaging.py", line 468, in _compose_snap_yaml snap_yaml["apps"] = self._wrap_apps(self._config_data["apps"]) File "/usr/lib/python3/dist-packages/snapcraft/internal/meta/_snap_packaging.py", line 567, in _wrap_apps self._wrap_app(app, apps[app]) File "/usr/lib/python3/dist-packages/snapcraft/internal/meta/_snap_packaging.py", line 575, in _wrap_app app[k] = self._wrap_exe(app[k], "{}-{}".format(k, name)) File "/usr/lib/python3/dist-packages/snapcraft/internal/meta/_snap_packaging.py", line 546, in _wrap_exe with open(exepath, "rb") as exefile: FileNotFoundError: [Errno 2] No such file or directory: '/home/popalex/mysnaps/hello/prime/bin/hello' We would appreciate it if you created a bug report at https://launchpad.net/snapcraft/+filebug with the above text included.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 10
Quick Win: 9.0
Staleness: 95
Complexity: 10
Confidence: 75
Support Request: 85
close not a bug Snapcraft 2.43.1 prime crashes with FileNotFoundError when app command points to bin/hello, but only gnu-bash part is built so the binary doesn't exist. User configuration error, 7.9 years old, 0 comments, no labels.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 95
Support Request: 20
close stale Snapcraft build fails with FileNotFoundError during prime stage. Issue is 7.8 years old, uses deprecated snapcraft 2.43.1, and has no maintainer interaction.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 90
Support Request: 20
close stale Reports a FileNotFoundError during snapcraft prime due to missing bin/hello. Issue remains untriaged and inactive for over 7 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 20
Confidence: 92
Support Request: 30
close stale Report of a FileNotFoundError during snapcraft prime with v2.43.1 due to a missing prime/bin/hello file. The issue has been inactive for over 7 years with no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 100
Complexity: 10
Confidence: 95
Support Request: 95
close stale User reports a FileNotFoundError during snapcraft prime with snapcraft 2.43.1. No maintainer response, inactive for over 7 years, and the reported version is long deprecated.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft (launchpad)#1797378 (confidence 60%)

    Similar FileNotFoundError during prime when app command points to a file not copied to prime/bin/, but different root cause (prettier.js vs prettier).

Related issues

Issue Project State Summary Similarity
#1884683 snapcraft fail app snapcraft (launchpad) open Snapcraft 2.43.1+18.4 crashes with FileNotFoundError when an app's command points to /bin/Sastreria, which is missing from the prime directory. No comments or labels; the affected 2.x version is long EOL and the code path no longer exists.
75%
#1830520 Sorry, an error occurred in Snapcraft: snapcraft (launchpad) open Snapcraft 2.43.1 (2019) crashed with FileNotFoundError wrapping app command spx_service missing from the prime dir during a Launchpad build. No maintainer activity in 7+ years; the 2.x code path no longer exists and the root cause is user snapcraft.yaml config.
73%
#1812435 python snap fails to build no such file or directory in prime/bin snapcraft (launchpad) open Snapcraft 2.43.1 crashes with FileNotFoundError when an app's command is missing from prime/bin during snap packaging. Reported 2782 days ago with no comments, labels, or maintainer response. The legacy code path no longer exists in the current codebase.
73%
#1797378 Built executable is not copied to prime/bin/ snapcraft (launchpad) open Snapcraft 2.43.1+18.4 crashes during prime with FileNotFoundError when an app's command points to a file (prettier) that was not copied to prime/bin/; build/bin/ only contained prettier.js. Reported 8 years ago, no maintainer activity, 0 comments, unlabelled.
73%