← Back to issue list

python snap fails to build no such file or directory in prime/bin

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1812435
Type
issue
State
open
Author
~dwoot
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action: close stale

Reason: The issue is 2782 days old with zero comments, no labels, and no maintainer interaction. The traceback references snapcraft 2.43.1 and the legacy _snap_packaging.py code path, which no longer exists in the current codebase (confirmed by grep). The current codebase already has a proper error check for missing commands (commit 44930f709, PR #3321, 'meta: add error check for command not found'), meaning the underlying problem has been addressed with a clearer error message. The issue is both inactive and no longer applicable to the current version.

Impact: 20 Quick Win: 14.0 Staleness: 95 Complexity: 30 Confidence: 75 Support Request: 70

Issue body

Collecting pip Installing collected packages: pip Successfully installed pip-18.1 Fetching and installing wheel... Collecting wheel Using cached https://files.pythonhosted.org/packages/ff/47/1dfa4795e24fd6f93d5d58602dd716c3f101cfd5a77cd9acbe519b44a0a9/wheel-0.32.3-py2.py3-none-any.whl Saved ./parts/mockpyairpulse/python-packages/wheel-0.32.3-py2.py3-none-any.whl Successfully downloaded wheel Looking in links: /home/dwoot/bluepy/parts/mockpyairpulse/python-packages Collecting wheel Installing collected packages: wheel Successfully installed wheel-0.32.3 Fetching and installing setuptools... Collecting setuptools Using cached https://files.pythonhosted.org/packages/37/06/754589caf971b0d2d48f151c2586f62902d93dc908e2fd9b9b9f6aa3c9dd/setuptools-40.6.3-py2.py3-none-any.whl Saved ./parts/mockpyairpulse/python-packages/setuptools-40.6.3-py2.py3-none-any.whl Successfully downloaded setuptools Looking in links: /home/dwoot/bluepy/parts/mockpyairpulse/python-packages Collecting setuptools Installing collected packages: setuptools Successfully installed setuptools-40.6.3 Building mockpyairpulse Staging mockpyairpulse Priming mockpyairpulse 'grade' property not specified: defaulting to 'stable' Sorry, an error occurred in Snapcraft: Traceback (most recent call last): File "/usr/bin/snapcraft", line 9, in <module> load_entry_point('snapcraft==2.43.1', 'console_scripts', '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 1037, in invoke return Command.invoke(self, 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/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 552, in forward return self.invoke(cmd, **kwargs) 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 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/dwoot/bluepy/prime/bin/mockpyairpulse'

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 20
Quick Win: 14.0
Staleness: 95
Complexity: 30
Confidence: 75
Support Request: 70
close stale 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.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 90
Support Request: 80
close stale Snapcraft build fails during prime step with FileNotFoundError for a missing executable in prime/bin. Issue is over 7 years old with no maintainer interaction.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 92
Support Request: 25
close stale Python snap build fails during prime step due to missing executable in prime/bin. Issue is over 7 years old with no activity or maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 99
Complexity: 20
Confidence: 92
Support Request: 45
close stale Snapcraft build fails during the prime step due to a missing executable in prime/bin. The report is over seven years old with no maintainer response or follow-up.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 30
Confidence: 90
Support Request: 20
close stale Python snap build fails during prime step due to missing executable in prime/bin. Issue is inactive for over 7 years with no maintainer response.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#3321 (confidence 80%)

    Commit 44930f709 'meta: add error check for command not found' addresses the same class of error (missing command in prime) with a proper error message instead of a raw FileNotFoundError traceback.

Related issues

Issue Project State Summary Similarity
#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.
81%
#1795171 snapcraft fail to find built executable under prime $SNAP snapcraft (launchpad) closed Closed without resolution or comments, likely abandoned. The issue reported a FileNotFoundError when Snapcraft failed to expand the $SNAP variable in the prime directory path during build.
79%
#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.
78%
#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.
78%
#1811362 Cannot package Python3 package - missing binary snapcraft (launchpad) open Snapcraft 2.43.1 build fails with FileNotFoundError for bin/mariner in prime during _wrap_exe; app command points to a binary the Python package does not install. 7.6 years old, no maintainer interaction, snapcraft 2.x EOL and code path removed.
75%
#1808043 FileNotFoundError: [Errno 2] No such file or directory: snapcraft (launchpad) open snapcraft 2.43.1 nodejs plugin build fails with FileNotFoundError for app command in prime dir during npm install; no maintainer response, 0 comments, 2820 days old, nodejs plugin removed from modern snapcraft
74%
#1797795 An error occurred building hello world Snapcraft snapcraft (launchpad) open 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.
73%
#1626236 snapcraft newly fails on ubuntu-image snapcraft (launchpad) open snapcraft 2.17 on Ubuntu 16.10 (Yakkety) fails to copy the ubuntu-image CLI script to prime/usr/bin, causing a FileNotFoundError during build. No maintainer activity in ~10 years; affected versions are long EOL and the codebase has been fully restructured since.
71%