Not able to run snapcraft login on mac m1

Hey there, I’m getting this error when I run the following command:

snapcraft login
Sorry, an error occurred in Snapcraft:
Traceback (most recent call last):
  File "/opt/homebrew/bin/snapcraft", line 8, in <module>
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/click/", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/click/", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/click/", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/click/", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/click/", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/snapcraft/cli/", line 749, in login
    store_client = storeapi.StoreClient()
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/snapcraft/storeapi/", line 44, in __init__
    self.sso = SSOClient(self.conf)
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/snapcraft/storeapi/", line 17, in __init__
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/snapcraft/storeapi/", line 59, in __init__
    self._snapcraft_headers = {"User-Agent": _agent.get_user_agent()}
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/snapcraft/storeapi/", line 49, in get_user_agent
    arch = snapcraft.ProjectOptions().deb_arch
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/snapcraft/project/", line 238, in __init__
  File "/opt/homebrew/Cellar/snapcraft/4.4.1_1/libexec/lib/python3.9/site-packages/snapcraft/project/", line 358, in _set_machine
    self.__machine_info = _ARCH_TRANSLATIONS[self.__target_machine]
KeyError: 'arm64'
We would appreciate it if you created a bug report at with the above text included.
You can find the traceback in file '/var/folders/9t/gz9jrxmd2lxfs4_g7_rjpm7w0000gn/T/tmptx7spl9n/trace.txt'.

Any ideas on why this is happening and how to get it to work would be appreciated. Thanks!

We need to enable the m1 for Snapcraft on arm

@sergiusens thanks for getting back to me! Do you know what the timeline for enabling that will be? Thanks!

If you send me one, I can do it that day :rofl:

It shouldn’t be a problem adding support to login and do store commands. However, as far as building snaps is concerned, Multipass needs work to support m1 AFAIK. I do not know what the ETA for that is yet.