← Back to issue list

Error when building snap package in priming stage

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1794636
Type
issue
State
closed
Author
~logantcp
Labels
error priming
Created
Updated
Closed

Current evaluation

User error: the app's `command:` binary was never installed into prime/, causing FileNotFoundError in _wrap_exe. Reporter copied the built folder/file into prime/ themselves; no Snapcraft fix.

Resolution: closed not a bug

Reason: The reporter diagnosed and fixed it themselves in their own snapcraft.yaml/parts: their last comment (2018-09-27) states they had to copy the folder and file they created into the prime folder, which resolved the FileNotFoundError. The failure was caused by a part that did not install the bloxermcpc executable into prime/, not by a Snapcraft defect, so no code change was made.

Evaluated by: mr-cal-bot

No scores available.

Issue body

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 1043, in invoke return Command.invoke(self, 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/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/cli/_runner.py", line 93, in run ctx.forward(lifecyclecli.commands["snap"]) File "/usr/lib/python3/dist-packages/click/core.py", line 553, in forward return self.invoke(cmd, **kwargs) 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 136, in snap project = _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/logan/bloxermcpc/prime/bin/bloxermcpc'

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug User error: the app's `command:` binary was never installed into prime/, causing FileNotFoundError in _wrap_exe. Reporter copied the built folder/file into prime/ themselves; no Snapcraft fix.
stealth/space-bunny-alpha — closed not a bug Reporter resolved the priming error by copying the missing bloxermcpc executable into prime/; no Snapcraft code fix was reported.
stealth/space-bunny-alpha — closed stale Snapcraft 2.43.1 priming failed because prime/bin/bloxermcpc was absent; the report closed without a recorded fix or maintainer explanation.
qwen/qwen3.6-35b-a3b — — Closed without resolution or comments. Snapcraft raised a FileNotFoundError during the priming stage when wrapping an executable missing from the prime directory. The issue appears abandoned.
qwen/qwen3.6-35b-a3b — — The issue reported a FileNotFoundError during the priming stage of building a snap package. It was closed without a clear resolution, likely abandoned or superseded by newer versions.
qwen/qwen3.6-35b-a3b — — Closed without resolution. Reported a FileNotFoundError during Snapcraft's priming stage when wrapping a missing executable. Zero comments and seven years of inactivity indicate it was abandoned or superseded.
qwen3.6-35b-a3b-mtp-q6 — — Abandoned. Closed without resolution after reporting a FileNotFoundError for a missing executable during Snapcraft's priming stage, which crashed the build. No fix or follow-up comments were provided.

Update history

Date Change
created

Related work

  • Related To: snapcraft#3139 (confidence 30%)

    Later Snapcraft versions raise a friendly CommandNotFoundError ('referenced command not found in snap') instead of a raw FileNotFoundError traceback, improving diagnostics for this same class of user packaging mistake, but this bug was not the fix.

Related issues

Issue Project State Summary Similarity
#1812435 python snap fails to build no such file or directory in prime/bin snapcraft (launchpad) open Snapcraft 2.43.1 fails while priming because apps.command references a missing prime/bin/mockpyairpulse; the supplied YAML lacks evidence about the source package's entry point.
76%
#1795171 snapcraft fail to find built executable under prime $SNAP snapcraft (launchpad) closed Launchpad #1795171: crash was user error — app command used literal $SNAP/bin/ags. Maintainer @ogra gave the correct YAML (command: bin/ags), reporter confirmed; report later expired for 60 days inactivity.
72%
#1807117 FileNotFoundError: [Errno 2] No such file or directory: '/home/alpha/Desktop/updatedfileSM/testapp/prime/bin/hello' snapcraft (launchpad) closed Resolved: current Snapcraft reports missing command files without exposing a raw FileNotFoundError traceback; the failing build referenced a nonexistent prime/bin/hello.
72%