Skip to content

Remote build: ProjectService object has no attribute name #2598

@jahn-junior

Description

@jahn-junior

Check existing issues

  • I've verified that this bug isn't described by any existing issues.

Bug description

When trying to build my test charm remotely, I get the following error:

user@host:~/path/to/project$ charmcraft remote-build
remote-build is experimental and is subject to change. Use with caution.
All data sent to remote builders will be publicly available. Are you sure you want to continue? [y/N]: y
charmcraft internal error: AttributeError("'ProjectService' object has no attribute 'name'")
Full execution log: '/home/ecoldi/.local/state/charmcraft/log/charmcraft-20260317-135445.018479.log'

Steps to reproduce

In any charm directory, run charmcraft remote-build.

Environment

Running the Charmcraft snap from the latest/stable channel (version 4.0.1) on an Ubuntu 24.04 LTS machine.

charmcraft.yaml

N/A

Log output

2026-03-17 13:54:48.667 charmcraft internal error: AttributeError("'ProjectService' object has no attribute 'name'")
2026-03-17 13:54:48.669 Traceback (most recent call last):
2026-03-17 13:54:48.669   File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/application.py", line 663, in run
2026-03-17 13:54:48.669     return_code = self._run_inner()
2026-03-17 13:54:48.669                   ^^^^^^^^^^^^^^^^^
2026-03-17 13:54:48.669   File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/application/main.py", line 143, in _run_inner
2026-03-17 13:54:48.669     return super()._run_inner()
2026-03-17 13:54:48.669            ^^^^^^^^^^^^^^^^^^^^
2026-03-17 13:54:48.669   File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/application.py", line 640, in _run_inner
2026-03-17 13:54:48.669     return_code = dispatcher.run() or os.EX_OK
2026-03-17 13:54:48.669                   ^^^^^^^^^^^^^^^^
2026-03-17 13:54:48.669   File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_cli/dispatcher.py", line 564, in run
2026-03-17 13:54:48.669     return self._loaded_command.run(self._parsed_command_args)
2026-03-17 13:54:48.669            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-03-17 13:54:48.669   File "/snap/charmcraft/7517/lib/python3.12/site-packages/craft_application/commands/base.py", line 200, in run
2026-03-17 13:54:48.669     result = self._run(parsed_args, **kwargs) or result
2026-03-17 13:54:48.669              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-03-17 13:54:48.669   File "/snap/charmcraft/7517/lib/python3.12/site-packages/charmcraft/application/commands/remote.py", line 122, in _run
2026-03-17 13:54:48.669     build_id = get_build_id(self._app.name, project.name, project_dir)
2026-03-17 13:54:48.669                                             ^^^^^^^^^^^^
2026-03-17 13:54:48.669 AttributeError: 'ProjectService' object has no attribute 'name'

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions