Comment 1 for bug 1828600

Revision history for this message
Matias Bordese (matiasb) wrote :

This seems to be an encoding issue related to terminal, click, snapcraft and store interaction:
https://pastebin.canonical.com/p/5BdCDTTGsf/

Specifically, store code is exploding when trying to deal with a string with surrogate escapes[1], that ideally snapcraft shouldn't be propagating to the server, handling the issue as soon as possible[2].

We could also validate store-side the given channels payload are ASCII-only values in the handler (although note that the real issue is there for any payload we get from clients including surrogate escapes). Note branch name validation is already done at the model level, this is failing in an intermediate step while inferring risk/branch from the given string.

[1] https://click.palletsprojects.com/en/7.x/python3/#python-2-and-3-differences
[2] http://lucumr.pocoo.org/2013/7/2/the-updated-guide-to-unicode/#different-types-of-unicode-strings