Snapcraft crashes immeditely when using core22

I’m trying to snap a project that requires a lot of up-to-date libraries and tools to build, so I’d like to use core22 as base. But after changing base from core20 to core22 I get after just a few seconds

> snapcraft 
Traceback (most recent call last):
  File "/snap/snapcraft/8496/bin/snapcraft", line 8, in <module>
    sys.exit(run())
  File "/snap/snapcraft/8496/lib/python3.8/site-packages/snapcraft/cli.py", line 228, in run
    _run_dispatcher(dispatcher)
  File "/snap/snapcraft/8496/lib/python3.8/site-packages/snapcraft/cli.py", line 204, in _run_dispatcher
    dispatcher.run()
  File "/snap/snapcraft/8496/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 448, in run
    return self._loaded_command.run(self._parsed_command_args)
  File "/snap/snapcraft/8496/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 259, in run
    super().run(parsed_args)
  File "/snap/snapcraft/8496/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 132, in run
    parts_lifecycle.run(self.name, parsed_args)
  File "/snap/snapcraft/8496/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 208, in run
    _run_command(
  File "/snap/snapcraft/8496/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 249, in _run_command
    _run_in_provider(project, command_name, parsed_args)
  File "/snap/snapcraft/8496/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 475, in _run_in_provider
    providers.ensure_provider_is_available(provider)
  File "/snap/snapcraft/8496/lib/python3.8/site-packages/snapcraft/providers.py", line 74, in ensure_provider_is_available
    if not LXDProvider.is_provider_installed() and not confirm_with_user(
  File "/snap/snapcraft/8496/lib/python3.8/site-packages/snapcraft/utils.py", line 259, in confirm_with_user
    with emit.pause():
  File "/snap/snapcraft/8496/lib/python3.8/site-packages/craft_cli/messages.py", line 694, in func
    raise RuntimeError("Emitter is stopped already")
RuntimeError: Emitter is stopped already

Snapcraft is at version 7.2.5. Host is Ubuntu 22.04 on AMD64. No disk space issues, no memory size issues.

1 Like

I have a similar issue when trying to build any snap using core22 as base. It currently prevents me from properly debugging a snap to release a new version update.

I’ve found as potential workaround, you can install lxd as alternate provider instead of multipass. This will prevent the RuntimeError by not using the branch causing it. ^^’

2 Likes

Is this problem still happening with 7.2.7? @mr_cal, do you know what’s causing this?

lxd at least gets me a bit further. It was not without problems though. Steps I got from

  • snap install lxd
  • lxd init --auto
  • snapcraft --use-lxd --> no effect, same error
  • SNAPCRAFT_BUILD_PROVIDER=lxd snapcraft --> same story
  • snap set snapcraft provider=lxd
  • snapcraft --> now starts
2 Likes

Sorry about the headache this bug caused you. The fix has been merged but not yet released.

1 Like

Do you know when the patch will be integrated to the edge canal?

I tried the core22 edge from today and it seems the code is still there (got the same backtrace with emit.pause()

It’s on track to be released today.

7.2.8 should be available on latest/candidate and 7.x/candidate

1 Like