Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to publish a release in CI fails with UnicodeDecodeError #5161

Open
Nokel81 opened this issue Nov 29, 2024 · 0 comments
Open

Trying to publish a release in CI fails with UnicodeDecodeError #5161

Nokel81 opened this issue Nov 29, 2024 · 0 comments

Comments

@Nokel81
Copy link

Nokel81 commented Nov 29, 2024

Bug Description

Trying to upload a new snap version using the snapcraft CLI in our CI (Github ubunutu-latest) fails with UnicodeDecodeError, but trying to upload the same snap locally on my own ubuntu machine was successful.

To Reproduce

  1. Run snapcraft upload --verbose --release=edge /home/runner/work/my-app.snap
  2. See error

Environment

Ubuntu 22.04 LTS

snapcraft.yaml

N/A

Relevant log output

Starting snapcraft, version 8.4.4
Logging execution to '/home/runner/.local/state/snapcraft/log/snapcraft-20241129-170703.651006.log'
snapcraft internal error: UnicodeDecodeError('utf-8', b'zf\xa2\x96\xc9\x9a\x96\xda\'\x9a*\xda\x9e\xd8\xacr\x89\xae\xb1\xea\xe7jg\xac\x99\xa9m\xa2x\x9d\xe3%\xaa\xf79\xb1ns\xcb<`l\x06\x10\x14M\x03!\'\xb4\x1e\xee\xe5\xb6\xa5\xea\xe6\x8a\xcb"\xa2{)i\xc9\x1a\x81\xe6\x9cq\xeb,\xa5\xa7$j\x07\xa6jv\xa0z\x96\x9c\x91\xa8\x1e\x99\xebk\x89\xcb)i\xc9\x1a\x81\xean\xb2\x1aZrF\xa0z\xb7\xa0\x8a\xcb^\xae\x96\x9c\x91\xa8\x1e\xad\xe9^j\xc7\xa9i\xc9\x1a\x81\xeb\xa9u\xab^r\x16\xa7\x9d\xe9l\x9e\x8a\xde\xb2\xda\xe2r\xd8\xa8\x9e\xc7\xb1\xa6*\xde\xb3m6\xe7]t\xf1=z\xd3\xcd\xf7\xd3M\x19', 2, 3, 'invalid start byte')

Full output log

2024-11-29 19:13:45.262 Starting snapcraft, version 8.4.4
2024-11-29 19:13:45.262 Log verbosity level set to BRIEF
2024-11-29 19:13:45.262 Preparing application...
2024-11-29 19:13:45.262 snapcraft 8.4.4
2024-11-29 19:14:46.273 Starting snapcraft, version 8.4.4
2024-11-29 19:14:46.273 Log verbosity level set to BRIEF
2024-11-29 19:14:46.273 Preparing application...
2024-11-29 19:14:46.274 Configuring application...
2024-11-29 19:14:46.275 Setting up ConfigService
2024-11-29 19:14:46.284 Build plan: platform=None, build_for=None
2024-11-29 19:14:46.284 Running snapcraft upload on host
2024-11-29 19:14:46.285 snapcraft internal error: UnicodeDecodeError('utf-8', b'zf\xa2\x96\xc9\x9a\x96\xda\'\x9a*\xda\x9e\xd8\xacr\x89\xae\xb1\xea\xe7jg\xac\x99\xa9m\xa2x\x9d\xe3%\xaa\xf79\xb1ns\xcb<`l\x06\x10\x14M\x03!\'\xb4\x1e\xee\xe5\xb6\xa5\xea\xe6\x8a\xcb"\xa2{)i\xc9\x1a\x81\xe6\x9cq\xeb,\xa5\xa7$j\x07\xa6jv\xa0z\x96\x9c\x91\xa8\x1e\x99\xebk\x89\xcb)i\xc9\x1a\x81\xean\xb2\x1aZrF\xa0z\xb7\xa0\x8a\xcb^\xae\x96\x9c\x91\xa8\x1e\xad\xe9^j\xc7\xa9i\xc9\x1a\x81\xeb\xa9u\xab^r\x16\xa7\x9d\xe9l\x9e\x8a\xde\xb2\xda\xe2r\xd8\xa8\x9e\xc7\xb1\xa6*\xde\xb3m6\xe7]t\xf1=z\xd3\xcd\xf7\xd3M\x19', 2, 3, 'invalid start byte')
2024-11-29 19:14:46.290 Traceback (most recent call last):
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/store/_legacy_account.py", line 41, in _load_potentially_base64_config
2024-11-29 19:14:46.290     parser.read_string(config_content)
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/usr/lib/python3.10/configparser.py", line 725, in read_string
2024-11-29 19:14:46.290     self.read_file(sfile, source)
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/usr/lib/python3.10/configparser.py", line 720, in read_file
2024-11-29 19:14:46.290     self._read(f, source)
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/usr/lib/python3.10/configparser.py", line 1087, in _read
2024-11-29 19:14:46.290     raise MissingSectionHeaderError(fpname, lineno, line)
2024-11-29 19:14:46.290 configparser.MissingSectionHeaderError: File contains no section headers.
2024-11-29 19:14:46.290 file: '<string>', line: 1
2024-11-29 19:14:46.290 '***\n'
2024-11-29 19:14:46.290 
2024-11-29 19:14:46.290 During handling of the above exception, another exception occurred:
2024-11-29 19:14:46.290 Traceback (most recent call last):
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/lib/python3.10/site-packages/craft_application/application.py", line 568, in run
2024-11-29 19:14:46.290     return_code = self._run_inner()
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/application.py", line 215, in _run_inner
2024-11-29 19:14:46.290     return_code = super()._run_inner()
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/lib/python3.10/site-packages/craft_application/application.py", line 549, in _run_inner
2024-11-29 19:14:46.290     return_code = dispatcher.run() or os.EX_OK
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/lib/python3.10/site-packages/craft_cli/dispatcher.py", line 487, in run
2024-11-29 19:14:46.290     return self._loaded_command.run(self._parsed_command_args)
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/commands/upload.py", line 114, in run
2024-11-29 19:14:46.290     client = store.StoreClientCLI()
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/store/client.py", line 179, in __init__
2024-11-29 19:14:46.290     self.store_client = get_client(ephemeral=ephemeral)
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/store/client.py", line 126, in get_client
2024-11-29 19:14:46.290     or LegacyUbuntuOne.env_has_legacy_credentials()
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/store/_legacy_account.py", line 128, in env_has_legacy_credentials
2024-11-29 19:14:46.290     get_auth(credentials)
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/store/_legacy_account.py", line 86, in get_auth
2024-11-29 19:14:46.290     conf = _load_potentially_base64_config(config_content)
2024-11-29 19:14:46.290   File "/snap/snapcraft/12961/lib/python3.10/site-packages/snapcraft/store/_legacy_account.py", line 45, in _load_potentially_base64_config
2024-11-29 19:14:46.290     decoded_config_content = base64.b64decode(config_content).decode()
2024-11-29 19:14:46.290 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa2 in position 2: invalid start byte

Additional context

The snap was built using electron-builder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant