Call for testing: Snapcraft 7.2.0

We’re seeing the same issue as reported by gward-tridium with Snapcraft v7.2.4.

Let me know if there’s anything we can do to help debug.

@andrewsomething, I have a fix here, would you be able to test it using channel=edge/pr-3971?

1 Like

@mr_cal I can confirm that resolves the issue for me. Thanks for the quick work!

@mr_cal The fix on edge/pr-3971 fixes our issues as well. Thanks for taking a look!

Great! Thank you @gward-tridium, @andrewsomething, and @jocado for the good feedback and testing. This fix is now released to the channel latest/candidate

1 Like

Great - thank you for your support :+1:

Just used channel latest/candidate, but still have the issue ‘“http://localhost/v2/snapctl”: dial unix /run/snapd-snap.socket: connect: no such file or directory’

Trace:

 Traceback (most recent call last):
  File "/snap/snapcraft/current/bin/snapcraft", line 8, in <module>
    sys.exit(run())
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/cli.py", line 228, in run
    _run_dispatcher(dispatcher)
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/cli.py", line 204, in _run_dispatcher
    dispatcher.run()
  File "/snap/snapcraft/current/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/current/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 259, in run
    super().run(parsed_args)
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 132, in run
    parts_lifecycle.run(self.name, parsed_args)
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 208, in run
    _run_command(
  File "/snap/snapcraft/current/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/current/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 473, in _run_in_provider
    provider = providers.get_provider(provider_name)
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/providers.py", line 210, in get_provider
    snap_config = get_snap_config()
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/snap_config.py", line 88, in get_snap_config
    snap_config.fetch()
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snaphelpers/_conf.py", line 78, in fetch
    self._config = self._snapctl.config_get(*self._keys)
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snaphelpers/_ctl.py", line 134, in config_get
    conf = json.loads(self.run("get", "-d", *keys))
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snaphelpers/_ctl.py", line 175, in run
    raise SnapCtlError(process)
snaphelpers._ctl.SnapCtlError: Call to snapctl failed with error 1: error: cannot communicate with server: Post "http://localhost/v2/snapctl": dial unix /run/snapd-snap.socket: connect: no such file or directory

Was I too soon in using latest/candidate?

Ah wait, might be caused by me using jammy as UBUNTU arg?

UBUNTU=Jammy is not the problem. From your logs, the first call to snapctl works but the second does not. Curious behavior, I can’t reproduce that or figure out how it happened.

Regardless, the fix is simple and I’ll have prepared today.

Can you provide some details on how you are doing setup, execution, or provide the snapcraft.yaml? It looks like a core22 snap being built non-interactively. I’d like to write regression tests to not break docker builds again.

Update 1: PR is here and can be tested on channel edge/pr-3974

Update 2: Released as version 7.2.7 and should be available on the channel candidate soon

I will test it asap. I did adapt the Dockerfile as well, added core22 to it.

My yml file:

name: clever # you probably want to 'snapcraft register ’ base: core22 # the base snap is the execution environment for this snap version: ‘master’ # just for humans, typically ‘1.2+git’ or ‘1.3.2’ summary: Clever PSI/SI generation description: | Linear broadcast services require Program Specific Information/System Information (PSI/SI) as an essential part of the stream. Tuning information as well as Electronic Program Guide (EPG) can be generated by the Dualz “CLEVER” PSI/SI Generator. The Dualz PSI/SI Generator conforms MPEG and DVB standards. Generated tables include PAT, PMT, CAT, BAT, NIT, SDT, EIT pf/scheduled and more. Dualz PSI/SI Generator imports data from several interfaces, from file (XML) or REST API interfaces grade: devel # must be ‘stable’ to release into candidate/stable channels confinement: devmode # use ‘strict’ once you have the right plugs and slots

parts: clever: plugin: dump source: ./clever stage-packages: - openssl #organize: # ‘clever/CyclerManager/CyclerApp’: usr/bin/CyclerApp

install-hook: plugin: dump source: install-hook/ organize: install-config: snap/hooks/install

zixi: plugin: dump source: ./zixi_linux.tar.gz organize: ‘Linux/.so’ : usr/lib/ stage: [ usr/lib/libzixiFeeder.so, usr/lib/libzixiClient.so ]

locales-launch: source: https://github.com/Lin-Buo-Ren/locales-launch.git source-tag: v1.0.0 plugin: dump stage-packages: # For localedef(1) - libc-bin # For locale data used by localedef(1) - locales # All pre-generated locale data # DISABLED: Lots of duplicate data will be included in snap when this is staged, unless the target machine has no resource to generate them in runtime otherwise not using it # # Lack of compiled locales breaks gettext based localisation - snapcraft - snapcraft.io # Lack of compiled locales breaks gettext based localisation # # - locales-all

stage:
  - bin/locales-launch
  - etc/locale.alias
  - usr/bin/localedef
  - usr/share/doc/locales
  - usr/share/i18n
  - usr/share/locale

apps: cleverengine: command: CleverEngine/CleverEngine $SNAP_COMMON/cleverengine.conf daemon: simple plugs: - network - network-bind

cyclermanager: command: CyclerManager/CyclerManager $SNAP_COMMON/cyclermanager.conf daemon: simple plugs: - network - network-bind

CyclerApp: command: CyclerManager/CyclerApp plugs: - network - network-bind

psisiinjector: command-chain: [bin/locales-launch] command: PSISIInjector/PSISIInjector $SNAP_COMMON/injector.conf daemon: simple plugs: - network - network-bind

epgparser: command-chain: [bin/locales-launch] command: EPGParser/EPGParser $SNAP_COMMON/epgparser.conf daemon: simple plugs: - network - network-bind

layout: /var/log/clever: bind: $SNAP_DATA/var/log/clever /var/local/clever: bind: $SNAP_DATA/var/local/clever /var/tmp: bind: $SNAP_DATA/var/tmp

I hope it is readable, not sure how to add code to comment…

Different error: Traceback (most recent call last): File “/snap/snapcraft/current/bin/snapcraft”, line 8, in sys.exit(run()) File “/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/cli.py”, line 228, in run _run_dispatcher(dispatcher) File “/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/cli.py”, line 204, in _run_dispatcher dispatcher.run() File “/snap/snapcraft/current/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/current/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py”, line 259, in run super().run(parsed_args) File “/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py”, line 132, in run parts_lifecycle.run(self.name, parsed_args) File “/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py”, line 208, in run _run_command( File “/snap/snapcraft/current/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/current/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py”, line 475, in _run_in_provider providers.ensure_provider_is_available(provider) File “/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/providers.py”, line 78, in ensure_provider_is_available if not LXDProvider.is_provider_installed() and not confirm_with_user( File “/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/utils.py”, line 259, in confirm_with_user with emit.pause(): File “/snap/snapcraft/current/lib/python3.8/site-packages/craft_cli/messages.py”, line 694, in func raise RuntimeError(“Emitter is stopped already”) RuntimeError: Emitter is stopped already

I did adapt the dockerfile, and added core22 to it

Thanks @hardeves94! Your subsequent error should be fixed shortly with https://github.com/snapcore/snapcraft/pull/3982.

P.S. You can add code blocks by adding a line with 3 backticks (`) before and after the code.

Thanks @mr_cal, I will test it next week. And thanks for the hint :blush:

Sorry, it took a while longer, sometimes deadlines can be a real pain. I tried with channel=candidate, but unfortunately, now a different error occurred: It tries to install lxd into the docker image, and it fails to do this:

 File "/snap/snapcraft/current/bin/snapcraft", line 8, in <module>
    sys.exit(run())
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/cli.py", line 228, in run
    _run_dispatcher(dispatcher)
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/cli.py", line 204, in _run_dispatcher
    dispatcher.run()
  File "/snap/snapcraft/current/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/current/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 259, in run
    super().run(parsed_args)
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 132, in run
    parts_lifecycle.run(self.name, parsed_args)
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 208, in run
    _run_command(
  File "/snap/snapcraft/current/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/current/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 474, in _run_in_provider
    providers.ensure_provider_is_available(provider)
  File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/providers.py", line 83, in ensure_provider_is_available
    LXDProvider.ensure_provider_is_available()
  File "/snap/snapcraft/current/lib/python3.8/site-packages/craft_providers/lxd/lxd_provider.py", line 75, in ensure_provider_is_available
    install()
  File "/snap/snapcraft/current/lib/python3.8/site-packages/craft_providers/lxd/installer.py", line 61, in install
    raise errors.LXDInstallationError(
craft_providers.lxd.errors.LXDInstallationError: Failed to install LXD: failed to init LXD.