← Back to issue list

On Travis (not a real vte), releasing to a branch name during snapcraft push prints a stacktrace

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1761127
Type
issue
State
closed
Author
~didrocks
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2050 (commit ef350b470) to handle Store permission errors cleanly; Travis CI credentials limited to edge caused the original branch-release failure.

Resolution: closed resolved

Reason: The failure was caused by credentials lacking permission for the requested channel, and the Store response triggered a formatting traceback. PR #2050, commit ef350b470, added proper handling for this permission error.

Evaluated by: mr-cal-bot

No scores available.

Issue body

On Travis CI only (working locally, in a real terminal): Running snapcraft docker image: $ snapcraft push *.snap --release=edge/branchname -> stacktrace is printed and snapcraft exit. Note that doesn't happen with --release=edge for instance though. Example from https://travis-ci.org/ubuntu/communitheme-snap-helpers/builds/362055817: Preparing to push '/home/travis/build/ubuntu/communitheme-snap-helpers/communitheme_0.1_amd64.snap' to the store. Using local configuration ('.snapcraft/snapcraft.cfg'), changes will not be persisted. Pushing communitheme_0.1_amd64.snap [] 100% Processing...| Ready to release! Revision 4 of 'communitheme' created. Using local configuration ('.snapcraft/snapcraft.cfg'), changes will not be persisted. Error in sys.excepthook: Traceback (most recent call last):   File "/usr/lib/python3/dist-packages/snapcraft/cli/_errors.py", line 55, in exception_handler     echo.error(str(exception))   File "/usr/lib/python3/dist-packages/snapcraft/internal/errors.py", line 34, in __str__     return self.fmt.format([], **self.__dict__) KeyError: '"status"' Original exception was: Traceback (most recent call last):   File "/usr/bin/snapcraft", line 9, in <module>     load_entry_point('snapcraft==2.40', 'console_scripts', 'snapcraft')()   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point     return get_distribution(dist).load_entry_point(group, name)   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point     return ep.load()   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2229, in load     return self.resolve()   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2235, in resolve     module = __import__(self.module_name, fromlist=['__name__'], level=0)   File "/usr/lib/python3/dist-packages/snapcraft/cli/__main__.py", line 43, in <module>     run(prog_name='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 1060, in invoke     return _process_result(sub_ctx.command.invoke(sub_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/snapcraft/cli/store.py", line 149, in push     snapcraft.push(snap_file, channel_list)   File "/usr/lib/python3/dist-packages/snapcraft/_store.py", line 514, in push     release(snap_name, result['revision'], release_channels)   File "/usr/lib/python3/dist-packages/snapcraft/_store.py", line 610, in release     channels = store.release(snap_name, revision, release_channels)   File "/usr/lib/python3/dist-packages/snapcraft/storeapi/_store_client.py", line 163, in release     self.sca.snap_release, snap_name, revision, channels)   File "/usr/lib/python3/dist-packages/snapcraft/storeapi/_store_client.py", line 85, in _refresh_if_necessary     return func(*args, **kwargs)   File "/usr/lib/python3/dist-packages/snapcraft/storeapi/_sca_client.py", line 176, in snap_release     raise errors.StoreReleaseError(data['name'], response) snapcraft.storeapi.errors.StoreReleaseError: <exception str() failed>

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #2050 (commit ef350b470) to handle Store permission errors cleanly; Travis CI credentials limited to edge caused the original branch-release failure.
stealth/space-bunny-alpha — closed resolved Travis CI credentials limited to `edge` caused a malformed store error and traceback on `snapcraft push --release`. Fixed by merged PR #2050 (commit ef350b470), now printing a proper permission message; reporter confirmed workaround.
stealth/space-bunny-alpha — closed stale Closed without a documented resolution: the Snapcraft 2.40 StoreReleaseError/KeyError traceback for branch releases was not linked to a verified fix or superseding change.
stealth/space-bunny-alpha — closed stale The Travis-only release-to-branch failure was closed without a fix or explanation; its StoreReleaseError traceback was triggered by a response lacking the expected status key.
qwen/qwen3.6-35b-a3b — — Abandoned. Reports a stacktrace crash during snapcraft push to a branch on Travis CI due to a missing status key in the error response. Closed without comments or resolution.
qwen/qwen3.6-35b-a3b — — Abandoned. snapcraft push failed on Travis CI when releasing to a branch, causing a KeyError stacktrace during error handling. No fix, discussion, or linked pull request was recorded.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#2050 (confidence 99%)

    Merged change titled “storeapi: properly handle lacking permission for channel.”

Related issues

No related issues found above the similarity threshold.