snapcraftctl build fails with message "expected string or bytes-like object"
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
Closed without comments or resolution details. Likely abandoned due to inactivity. No fix was implemented or documented for the snapcraftctl build TypeError.
Suggested action: —
No scores available.
Issue body
This snippet
override-build: |
git config user.email "<email address hidden>"
git config user.name "snapcraft"
git am "$SNAPCRAFT_PROJECT_DIR"/snap-patch/networkmanager/*.patch
# remove configure to trigger autotools
rm ./configure
# xx
snapcraftctl build
fails with
...
Applying: Fix memory leaks introduced in snap patches
+ rm ./configure
+ snapcraftctl build
expected string or bytes-like object
This is when building https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager/tree/snap/snapcraft.yaml?h=snap-1.10 with
snapcraft latest/stable: 6.1 2022-03-24 (7201) 54MB classic
Backtrace:
expected string or bytes-like object
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]: View
View
Traceback (most recent call last):
File "/snap/snapcraft/7201/bin/snapcraft", line 8, in <module>
sys.exit(run())
File "/snap/snapcraft/7201/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
return self.main(*args, **kwargs)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/snap/snapcraft/7201/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/cli/lifecycle.py", line 387, in snap
_execute(steps.PRIME, parts=tuple(), pack_project=True, output=output, **kwargs)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/cli/lifecycle.py", line 102, in _execute
lifecycle.execute(step, project_config, parts)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 145, in execute
executor.run(step, part_names)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 199, in run
self._handle_step(part_names, part, step, current_step, cli_config)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 213, in _handle_step
getattr(self, "_run_{}".format(current_step.name))(part)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 255, in _run_pull
self._run_step(step=steps.PULL, part=part, progress="Pulling")
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 353, in _run_step
self._prepare_step(step=step, part=part)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 338, in _prepare_step
self._handle_part_dependencies(step=step, part=part)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 333, in _handle_part_dependencies
self.run(prerequisite_step, dependency_names)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 199, in run
self._handle_step(part_names, part, step, current_step, cli_config)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 213, in _handle_step
getattr(self, "_run_{}".format(current_step.name))(part)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 266, in _run_build
self._run_step(step=steps.BUILD, part=part, progress="Building")
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/lifecycle/_runner.py", line 356, in _run_step
getattr(part, step.name)()
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 600, in build
self._do_build()
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 692, in _do_build
self._do_runner_step(steps.BUILD)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 281, in _do_runner_step
return getattr(self._runner, "{}".format(step.name))()
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 91, in build
self._run_scriptlet(
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 189, in _run_scriptlet
raise error
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 178, in _run_scriptlet
self._handle_builtin_function(
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 233, in _handle_builtin_function
function(**function_args)
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/plugins/v1/autotools.py", line 109, in build
self.run(["env", "NOCONFIGURE=1", script])
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/plugins/v1/_plugin.py", line 190, in run
cmd_string = " ".join([shlex.quote(c) for c in cmd])
File "/snap/snapcraft/7201/lib/python3.8/site-packages/snapcraft/plugins/v1/_plugin.py", line 190, in <listcomp>
cmd_string = " ".join([shlex.quote(c) for c in cmd])
File "/snap/snapcraft/7201/usr/lib/python3.8/shlex.py", line 325, in quote
if _find_unsafe(s) is None:
TypeError: expected string or bytes-like object
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without comments or resolution details. Likely abandoned due to inactivity. No fix was implemented or documented for the snapcraftctl build TypeError. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without documented resolution. The issue reported a TypeError in snapcraftctl build caused by shlex.quote receiving a non-string type. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. Fixed a TypeError in snapcraftctl build where shlex.quote failed on non-string command arguments. Resolved by ensuring proper type handling during command execution. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1448 snapcraft build using manifest.yaml | snapcraft | closed | Closed without discussion or comments. The issue appears abandoned or superseded by newer snapcraft build workflows. No resolution or merge details were recorded. | |
| #1746359 snapcraft cleanbuild --debug should provide guidance on build failure | snapcraft (launchpad) | closed | Closed as abandoned due to inactivity. The requested debug shell guidance for snapcraft cleanbuild was never implemented. | |
| #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. | |
| #1980686 snapcraft build won't allow `verbose` flag | snapcraft (launchpad) | closed | Closed without resolution. The snapcraft build -v and --verbose flag rejection remained unfixed and was likely abandoned due to lack of discussion or maintainer response. | |
| #1626625 snapcraft can't run tests as part of building a snap | snapcraft (launchpad) | closed | Closed without implementation. The request to add test execution rules to snapcraft received no comments and was abandoned or superseded by newer snapcraft testing features. | |
| #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. | |
| #1898922 snapcraftctl fails, but exit status is zero | snapcraft (launchpad) | closed | 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. | |
| #1524374 Snap fails to build with "Bad Variable Name" | snapcraft (launchpad) | closed | Closed without resolution or comments. Likely abandoned or superseded by newer snapcraft versions. The v0.5 binary wrapping logic causing the export error is obsolete. | |
| #1808514 Snapcraft build should fail if using classic and base at the same time | snapcraft (launchpad) | closed | Closed without comments or resolution. Likely abandoned due to inactivity, with no fix, merge, or official decision documented. | |
| #2008777 timeout if doing snapcraft pull and build seperately | snapcraft (launchpad) | closed | A report detailing a hang when running snapcraft pull and build separately was closed without comments or resolution, indicating it was abandoned. No fix or workaround was provided. |