← Back to issue list

remote build: internal error when build is cancelled on launchpad

View original Github issue

Metadata

Project
snapcraft
Number
#5960
Type
issue
State
open
Author
sed-i
Labels
Status: Triaged Type: Bug
Created
Updated
Closed
—

Current evaluation

remote-build crashes with internal error MissingSchema when a build is cancelled on Launchpad (build_log_url is the string "None"); acknowledged by mr-cal, tracked upstream in craft-application#996 and Jira SNAPCRAFT-1281, still unfixed.

Suggested action: keep open

Reason: Confirmed unfixed in current code: craft-application/services/remotebuild.py:203 still only guards with `if not url:`, so a build_log_url of the literal string "None" (returned by Launchpad for cancelled builds) passes through to requests and raises MissingSchema. Maintainer mr-cal explicitly acknowledged "This is definitely a bug, I've created an upstream issue: canonical/craft-application#996", and the bot created SNAPCRAFT-1281; the issue is labeled Status: Triased / Type: Bug, so it is a validated bug that should stay open until the upstream patch lands and a craft-application version bump pulls it into snapcraft.

Evaluated by: mr-cal-bot

Impact: 40 Quick Win: 22 Complexity: 30 Confidence: 86 Actionability: 78

Issue body

### Check existing issues - [x] I've verified that this bug isn't described by any existing issues. ### Bug description I started a remote-build. 3 out of the builds failed, and I manually cancelled the 4th. ([link](https://launchpad.net/~sed-i/sed-i-craft-remote-build/+snap/snapcraft-nushell-75301ebd25a0f7bfc4127cbebfb72467)) As soon as I cancelled the build, snapcraft returned with the following error: ``` > snapcraft remote-build remote-build is experimental and is subject to change. Use with caution. All data sent to remote builders will be publicly available. Are you sure you want to continue? [y/N]: y snapcraft internal error: MissingSchema("Invalid URL 'None': No scheme supplied. Perhaps you meant https://None?") ``` ### Steps to reproduce 1. Start a multi platform build for a buggy snap. In my case it was an "unbounded variable" - used a variable I didn't set. 2. Let a few build fail, then manually cancel the remaining one. ### Environment Ubuntu 24.04.3 LTS on multipass snapcraft 8.13.2 (16570) latest/stable ### snapcraft.yaml ```yaml I don't think it's specific to a snap ``` ### Log output ```shell 2026-01-17 02:17:26.571 Stopped: amd64, arm64, armhf, s390x; Building: riscv64 2026-01-17 02:17:58.213 Stopped: amd64, arm64, armhf, s390x; Building: riscv64 2026-01-17 02:18:29.557 Stopped: amd64, arm64, armhf, s390x; Building: riscv64 2026-01-17 02:19:01.806 Stopped: amd64, arm64, armhf, s390x; Building: riscv64 2026-01-17 02:19:34.359 Stopped: amd64, arm64, armhf, s390x; Building: riscv64 2026-01-17 02:20:06.421 Stopped: amd64, arm64, armhf, riscv64, s390x 2026-01-17 02:20:06.421 Fetching build artifacts... 2026-01-17 02:20:08.162 Fetching 5 build logs... 2026-01-17 02:20:08.167 snapcraft internal error: MissingSchema("Invalid URL 'None': No scheme supplied. Perhaps you meant https://None?") 2026-01-17 02:20:08.171 Traceback (most recent call last): 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_application/application.py", line 663, in run 2026-01-17 02:20:08.171 return_code = self._run_inner() 2026-01-17 02:20:08.171 ^^^^^^^^^^^^^^^^^ 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/snapcraft/application.py", line 183, in _run_inner 2026-01-17 02:20:08.171 return_code = super()._run_inner() 2026-01-17 02:20:08.171 ^^^^^^^^^^^^^^^^^^^^ 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_application/application.py", line 640, in _run_inner 2026-01-17 02:20:08.171 return_code = dispatcher.run() or os.EX_OK 2026-01-17 02:20:08.171 ^^^^^^^^^^^^^^^^ 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_cli/dispatcher.py", line 564, in run 2026-01-17 02:20:08.171 return self._loaded_command.run(self._parsed_command_args) 2026-01-17 02:20:08.171 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_application/commands/base.py", line 222, in run 2026-01-17 02:20:08.171 result = self._run(parsed_args, **kwargs) or result 2026-01-17 02:20:08.171 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_application/commands/remote.py", line 165, in _run 2026-01-17 02:20:08.171 returncode = self._monitor_and_complete(builds=builds) 2026-01-17 02:20:08.171 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_application/commands/remote.py", line 227, in _monitor_and_complete 2026-01-17 02:20:08.171 logs = builder.fetch_logs(pathlib.Path.cwd()) 2026-01-17 02:20:08.171 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_application/services/remotebuild.py", line 194, in fetch_logs 2026-01-17 02:20:08.171 self.request.download_files_with_progress(log_downloads) 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_application/services/request.py", line 103, in download_files_with_progress 2026-01-17 02:20:08.171 sizes = [next(dl) for dl in downloads] 2026-01-17 02:20:08.171 ^^^^^^^^ 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/craft_application/services/request.py", line 68, in download_chunks 2026-01-17 02:20:08.171 with self.get(url, stream=True) as download: 2026-01-17 02:20:08.171 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/requests/sessions.py", line 602, in get 2026-01-17 02:20:08.171 return self.request("GET", url, **kwargs) 2026-01-17 02:20:08.171 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/requests/sessions.py", line 575, in request 2026-01-17 02:20:08.171 prep = self.prepare_request(req) 2026-01-17 02:20:08.171 ^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/requests/sessions.py", line 484, in prepare_request 2026-01-17 02:20:08.171 p.prepare( 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/requests/models.py", line 367, in prepare 2026-01-17 02:20:08.171 self.prepare_url(url, params) 2026-01-17 02:20:08.171 File "/snap/snapcraft/16570/lib/python3.12/site-packages/requests/models.py", line 438, in prepare_url 2026-01-17 02:20:08.171 raise MissingSchema( 2026-01-17 02:20:08.171 requests.exceptions.MissingSchema: Invalid URL 'None': No scheme supplied. Perhaps you meant https://None? 2026-01-17 02:20:08.171 Full execution log: '/home/ubuntu/.local/state/snapcraft/log/snapcraft-20260117-010959.810411.log' ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 40
Quick Win: 22
Complexity: 30
Confidence: 86
Actionability: 78
keep open remote-build crashes with internal error MissingSchema when a build is cancelled on Launchpad (build_log_url is the string "None"); acknowledged by mr-cal, tracked upstream in craft-application#996 and Jira SNAPCRAFT-1281, still unfixed.
qwen/qwen3.6-35b-a3b
Impact: 50
Quick Win: 32
Complexity: 20
Confidence: 70
Actionability: 80
keep open Remote build crashes with MissingSchema error when cancelled on Launchpad due to None build_log_url; upstream issue created in craft-application
qwen/qwen3.8-27b
Impact: 50
Quick Win: 30
Staleness: 55
Complexity: 40
Confidence: 75
Support Request: 5
keep open Remote build crashes with MissingSchema when a build is cancelled on Launchpad: fetch_logs tries to download a log URL that is the string 'None'. Triaged by maintainer, upstream fix tracked in craft-application#996.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 35
Confidence: 90
Support Request: 5
keep open Remote build crashes with a MissingSchema error when manually cancelled on Launchpad. Maintainer acknowledged the bug and linked an upstream issue, but the thread has been inactive for over five months.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 30
Confidence: 90
Support Request: 5
keep open Remote build crashes with a MissingSchema error when a user manually cancels a build on Launchpad. Triaged by maintainers, upstream issue created, awaiting fix.

Update history

No update history recorded yet.

Related work

  • Blocked By: canonical/craft-application#996 (confidence 92%)

    Upstream issue created by maintainer mr-cal; the faulty `if not url` check lives in craft-application, not the snapcraft repo, so the fix must land there first

Related issues

Issue Project State Summary Similarity
#5517 remote build: internal error from 400 response snapcraft open Remote builds expose an internal error when Launchpad returns HTTP 400 while pushing the repository; the triaged bug remains open and likely requires a Craft Application fix.
72%
#996 RemoteBuild raises uncaught MissingSchema error craft-application open RemoteBuild raises uncaught MissingSchema error when build_log_url is the string 'None' instead of None for cancelled builds
72%
#2642 remote-build: detect early build errors snapcraft merged Merged PR #2642 by cjp256: remote-build now detects early Launchpad build errors (e.g. missing snapcraft.yaml) instead of misreporting a busy builder; landed as commit 73fd95e86.
71%
#4821 remote build: hangs when logging into Launchpad snapcraft closed Partly mitigated by Launchpad retries in craft-application; the CI login hang was closed as unsupported, with snapcraft.io recommended for CI builds.
70%