← Back to issue list

'snapcraft push' dies with traceback if credentials are invalid

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1758859
Type
issue
State
open
Author
~romain-janvier
Labels
—
Created
Updated
Closed
—

Current evaluation

'snapcraft push' emitted a raw UnicodeDecodeError traceback when legacy snapcraft.cfg store credentials were malformed; current code catches decoding failures and raises a handled LegacyCredentialsParseError.

Suggested action: close resolved

Reason: The exact reported failure mode is now handled in snapcraft/store/_legacy_account.py: base64 decode of malformed credential content is wrapped in `except (binascii.Error, UnicodeDecodeError)` and re-raised as errors.LegacyCredentialsParseError (a SnapcraftError, so a clean message instead of a traceback), and commit 3784560f3 "fix(store): catch credential decoding errors" added the regression test test_store_credentials_unicode_decode_error. Maintainer ~kyrofa explicitly noted "We need to handle that error better", which is what that commit delivers, so the issue's requested improvement has landed.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 17 Complexity: 25 Confidence: 88 Actionability: 75

Issue body

Hello, We are using travis to build and upload snap package for CloudCompare (https://github.com/CloudCompare/CloudCompare) the last step fail with an UnicodeDecodeError. I don't know if it's specific to our setup or a bug in snapcraft. here is the full raw travis log https://api.travis-ci.org/v3/job/358151797/log.txt the used .travis.yml file https://github.com/CloudCompare/CloudCompare/blob/beta_builds_debug/.travis.yml

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 30
Quick Win: 17
Complexity: 25
Confidence: 88
Actionability: 75
close resolved 'snapcraft push' emitted a raw UnicodeDecodeError traceback when legacy snapcraft.cfg store credentials were malformed; current code catches decoding failures and raises a handled LegacyCredentialsParseError.
stealth/space-bunny-alpha
Impact: 30
Quick Win: 24
Complexity: 12
Confidence: 96
Actionability: 90
close resolved Malformed legacy Store credentials caused snapcraft push to emit a UnicodeDecodeError; current code converts decoding failures into a handled credential-parse error.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 5
Complexity: 40
Confidence: 40
Actionability: 30
needs triage snapcraft push crashes with UnicodeDecodeError on invalid credentials; untriaged, no maintainer response
qwen/qwen3.8-27b
Impact: 20
Quick Win: 14
Staleness: 95
Complexity: 30
Confidence: 72
Support Request: 15
close stale snapcraft push crashes with UnicodeDecodeError traceback on invalid credentials, reported in 2018 via Travis CI for CloudCompare; no labels, no comments, no maintainer interaction in 8+ years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 15
Confidence: 90
Support Request: 75
close stale Report of snapcraft push failing with UnicodeDecodeError during Travis CI upload due to invalid credentials. Issue is over 8 years old with no comments, labels, or maintainer engagement.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 20
close stale Report of UnicodeDecodeError during snapcraft push due to invalid credentials, with Travis CI logs and config. No activity or maintainer response in over 8 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 25
Confidence: 90
Support Request: 30
close stale UnicodeDecodeError traceback during snapcraft push reported for Travis CI. Issue lacks reproduction steps, has no maintainer response, and has been inactive for over 8 years.

Update history

Date Change
created

Related work

  • Likely Fixed By: 3784560f3 (confidence 90%)

    Commit 'fix(store): catch credential decoding errors' in the snapcraft repo wraps the base64/UTF-8 decode of legacy credentials and raises LegacyCredentialsParseError instead of a raw UnicodeDecodeError; covered by a unit test in tests/unit/store/test_legacy_account.py.

Related issues

No related issues found above the similarity threshold.