snapcraftctl fails, but exit status is zero
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
Closed without a fix. snapcraftctl incorrectly returned exit status 0 despite npm failures, requiring a manual workaround. The report was abandoned with no comments or resolution.
Suggested action: —
No scores available.
Issue body
I'm porting the grafana snap to core20, and there is an override-build section for the grafana-ui part, which I had to switch to use npm, where `snapcraftctl build` is clearly failing, but still exiting with status 0.
I added some debugging output and this is the summary (see https://pastebin.ubuntu.com/p/5C2hWcYB3b/ for better formatting):
snapcraft yaml snippet:
override-build: |
set -x
# https://forum.snapcraft.io/t/issue-with-nodejs-plugin-when-using-base-keyword/11109/8
#echo "unsafe-perm = true" > ~/.npmrc
rm -rf ~/.npmrc
snapcraftctl build
result=$?
echo "result=$result"
echo "exiting now"
/bin/false
export PYTHON=/usr/bin/python2
...
building with --use-lxd:
Launching a container.
Waiting for container to be ready
Waiting for network to be ready...
snap "snapd" has no updates available
snap "core20" has no updates available
Skipping pull grafana (already ran)
Skipping pull grafana-ui (already ran)
Skipping pull snap-wrappers (already ran)
Skipping build grafana (already ran)
Building grafana-ui
+ rm -rf /root/.npmrc
+ snapcraftctl build
+ [ ! -f /root/parts/grafana-ui/install/bin/node ]
+ tar xzf - -C /root/parts/grafana-ui/install/ --strip-components=1
+ curl -s https://nodejs.org/dist/v12.18.3/node-v12.18.3-linux-x64.tar.gz
+ npm pack .
+ tail -1
npm notice
npm notice 📦 grafana@7.0.4
npm notice === Tarball Contents ===
npm notice 210B .babelrc
....
....
npm notice 7.3kB public/app/features/datasources/state/actions.ts
npm notice 28.9kB public/app/features/explore/state/actions.ts
npm notice+ npm install -g --prefix /root/parts/grafana-ui/install grafana-7.0.4.tgz
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
> core-js@2.6.11 postinstall /root/parts/grafana-ui/install/lib/node_modules/grafana/node_modules/empower-core/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
sh: 1: node: Permission denied
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/grafana/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @welldone-software/why-did-you-render@4.0.6 requires a peer of react@>=16.13 but none is installed. You must install peer dependencies yourself.
npm WARN slate-react-placeholder@0.2.9 requires a peer of slate-react@>=0.22.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! core-js@2.6.11 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the core-js@2.6.11 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-10-07T19_03_58_004Z-debug.log
Failed to build 'grafana-ui'.
Recommended resolution:
Check the build logs and ensure the part's configuration and sources are correct.
+ result=0
+ echo result=0
+ echo exiting now
+ /bin/false
result=0
exiting now
You can see I'm hitting the problem described in https://forum.snapcraft.io/t/issue-with-nodejs-plugin-when-using-base-keyword/11109/8, but snapcraftctl doesn't signal it and the build would continue were it not for my /bin/false statement to force a stop.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without a fix. snapcraftctl incorrectly returned exit status 0 despite npm failures, requiring a manual workaround. The report was abandoned with no comments or resolution. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without comments or resolution, likely abandoned. The reported bug where snapcraftctl returns exit code zero despite build failures was not addressed or fixed. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. The report detailed snapcraftctl build returning exit status zero despite underlying npm failures. No fix or developer comments were provided. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4142 snapcraft remote-build exits with return code 0 even when some snaps failed to build for a given arch | snapcraft | closed | Closed without comments or resolution, indicating the request was abandoned. No official fix or merge details were provided. | |
| #1800119 snapcraft cleanbuild | snapcraft (launchpad) | closed | Closed without resolution. The report details a PermissionError during snapcraft cleanbuild caused by restricted access to the .aptitude directory. With zero comments and no fix applied, the issue was abandoned or marked stale. | |
| #1973146 snapcraftctl build fails with message "expected string or bytes-like object" | snapcraft (launchpad) | closed | Closed without comments or resolution details. Likely abandoned due to inactivity. No fix was implemented or documented for the snapcraftctl build TypeError. | |
| #1723965 snapcraft doesn't work | snapcraft (launchpad) | closed | Closed without resolution or comments, indicating abandonment. The reported snap command failure and GL driver errors remain unresolved. | |
| #1663625 No script named 'snapcraft' | snapcraft (launchpad) | closed | A report of snapcraft failing after apt installation was closed without resolution or comments, indicating the matter was abandoned. | |
| #1973197 snapcraft 7.x not running override-build | snapcraft (launchpad) | closed | snapcraft 7.x failing to execute override-build was closed without a fix or resolution. Zero comments were posted, indicating the report was abandoned. | |
| #1594876 snapcraft tests leave many ssh defunct processes | snapcraft (launchpad) | closed | Snapcraft tests generated defunct SSH processes. The report was closed without a documented fix, resolution, or linked pull request, indicating the issue was abandoned or resolved internally without tracking. | |
| #2044389 snapcraft clean failed but exit 0 | snapcraft (launchpad) | open | snapcraft clean returns exit code 0 despite reporting an error about missing instance. Reported for version 7.5.3, no maintainer response in 2.7 years. | |
| #1615060 snapcraft clean is incomplete | snapcraft (launchpad) | closed | Reporting that snapcraft clean skips local .snap files was closed without comments or resolution, indicating the report was abandoned or left unresolved. | |
| #1873349 snapcraft sometimes generates invalid stage-packages entries in manifest.yaml | snapcraft (launchpad) | closed | Closed without resolution. The report detailed invalid duplicate stage-packages entries in manifest.yaml causing USN notification failures. With zero comments and no applied fix, the issue was abandoned. |