← Back to issue list

Snapcraft auth does not create dir needed and errors out

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2098999
Type
issue
State
open
Author
~kenneth-loafman
Labels
snapcraft
Created
Updated
Closed

Current evaluation

Snapcraft auth fails to create credentials directory on macOS, causing FileNotFoundError. Issue is 560 days old with no maintainer response.

Suggested action: close stale

Reason: The issue is 560 days old with zero maintainer engagement. The traceback shows the `remote-build` command no longer exists in snapcraft (error: "no such command 'remote-build'"), and the credentials directory error originates in the external `launchpadlib` library, not snapcraft itself. The reporter also found a workaround by manually creating the directory.

Impact: 20 Quick Win: 14.0 Staleness: 90 Complexity: 30 Confidence: 60 Support Request: 20

Issue body

Here is the log listing. ~/Library/Application\ Support/snapcraft is not being created. Seems to run after manual creation. $ tools/makesnap arm64 /Users/ken/workspace/venv312/lib/python3.12/site-packages/ptr/__init__.py:81: SetuptoolsDeprecationWarning: The test command is disabled and references to it are deprecated. !! ******************************************************************************** Please remove any references to `setuptools.command.test` in all supported versions of the affected package. This deprecation is overdue, please update your project and remove deprecated calls to avoid build errors in the future. ******************************************************************************** !! class PyTest(orig.test): tools/makesnap of 3.0.5.dev on arm64 version: 3.0.5.dev Using build ID snapcraft-duplicity-36c31ac34fa501dff1b98d2dabdfbc9f The authorization page: (https://launchpad.net/+authorize-token?oauth_token=Hjj1JsJnqKB1f7pr3bCD&allow_permission=DESKTOP_INTEGRATION) should be opening in your browser. Use your browser to authorize this program to access Launchpad on your behalf. Waiting to hear from Launchpad about your decision... Sorry, an error occurred in Snapcraft: [Errno 2] No such file or directory: '/Users/ken/Library/Application Support/snapcraft/launchpad-credentials' Traceback (most recent call last): File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/snapcraft/cli.py", line 242, in run global_args = dispatcher.pre_parse_args(sys.argv[1:]) File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/craft_cli/dispatcher.py", line 517, in pre_parse_args raise ArgumentParsingError(help_text) from None craft_cli.errors.ArgumentParsingError: Usage: snapcraft [options] command [args]... Try 'snapcraft -h' for help. Error: no such command 'remote-build' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/snapcraft_legacy/cli/legacy.py", line 27, in legacy_run run() ~~~^^ File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/click/core.py", line 1161, in __call__ return self.main(*args, **kwargs) ~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/click/core.py", line 1082, in main rv = self.invoke(ctx) File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/click/core.py", line 1697, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/click/core.py", line 1443, in invoke return ctx.invoke(self.callback, **ctx.params) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/click/core.py", line 788, in invoke return __callback(*args, **kwargs) File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/snapcraft_legacy/cli/remote.py", line 149, in remote_build lp = LaunchpadClient( project=project, ...<2 lines>... deadline=deadline, ) File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/snapcraft_legacy/internal/remote_build/_launchpad.py", line 117, in __init__ self._lp: Launchpad = self.login() ~~~~~~~~~~^^ File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/snapcraft_legacy/internal/remote_build/_launchpad.py", line 275, in login return Launchpad.login_with( ~~~~~~~~~~~~~~~~~~~~^ "snapcraft remote-build {}".format(snapcraft_legacy.__version__), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... version="devel", ^^^^^^^^^^^^^^^^ ) ^ File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/launchpadlib/launchpad.py", line 693, in login_with return cls._authorize_token_and_login( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ authorization_engine.consumer, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<8 lines>... version, ^^^^^^^^ ) ^ File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/launchpadlib/launchpad.py", line 444, in _authorize_token_and_login credentials = authorization_engine(credentials, credential_store) File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/launchpadlib/credentials.py", line 607, in __call__ credential_store.save(credentials, self.unique_consumer_id) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/launchpadlib/credentials.py", line 293, in save raise e File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/launchpadlib/credentials.py", line 288, in save self.do_save(credentials, unique_consumer_id) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/launchpadlib/credentials.py", line 453, in do_save credentials.save_to_path(self.filename) ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/snapcraft/8.6.3/libexec/lib/python3.13/site-packages/lazr/restfulclient/authorize/oauth.py", line 272, in save_to_path os.open( ~~~~~~~^ path, ^^^^^ (os.O_CREAT | os.O_TRUNC | os.O_WRONLY), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (stat.S_IREAD | stat.S_IWRITE), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ), ^ FileNotFoundError: [Errno 2] No such file or directory: '/Users/ken/Library/Application Support/snapcraft/launchpad-credentials'

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6
Impact: 20
Quick Win: 14.0
Staleness: 90
Complexity: 30
Confidence: 60
Support Request: 20
close stale Snapcraft auth fails to create credentials directory on macOS, causing FileNotFoundError. Issue is 560 days old with no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 92
Complexity: 15
Confidence: 75
Support Request: 5
needs triage Snapcraft authentication fails with FileNotFoundError when the credentials directory is missing. Untriaged with no maintainer response for over 1.5 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 75
Support Request: 10
needs triage Snapcraft auth crashes with FileNotFoundError because it fails to create the credentials directory. The issue has no maintainer comments, lacks labels, and has been inactive for 516 days.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 10
close stale Snapcraft auth fails with FileNotFoundError when the credentials directory does not exist. Issue has been inactive for over 1.3 years with no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 20
Confidence: 75
Support Request: 10
close stale Untriaged bug report where snapcraft auth fails due to a missing credentials directory. Issue is over 16 months old with no maintainer response or activity.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1867052 Snapcraft crashes while creating snap for ssh-audit snapcraft (launchpad) closed Snapcraft v2.43.1 crashes with FileNotFoundError during snap packaging due to a missing executable path in snapcraft.yaml. Issue is completely inactive for over 6 years.
73%
#5167 Snapcraft raises an internal error if there is a file called `snap` snapcraft closed Snapcraft crashed with a NotADirectoryError when a file named snap existed in the working directory. The bug was fixed via pull request #5512 and the issue is closed.
72%
#1795780 Snapcraft complains about "snapcraft.yaml~" in snap/ dir snapcraft (launchpad) open Snapcraft warns about editor backup files like snapcraft.yaml~ in the snap/ directory, creating noise that can mask real problems. The issue has been open and unaddressed for 2890 days with no maintainer response.
72%
#1791879 snapcraft reports invalid credentials after successful login (new account) snapcraft (launchpad) closed Closed without resolution. The snapcraft credential and root macaroon error remains unfixed. Issue appears abandoned due to zero comments and no follow-up.
71%
#1995488 Cannot generate new credentials (snapcraft 7.2.2->4) snapcraft (launchpad) open Bug: snapcraft login fails when SNAPCRAFT_STORE_CREDENTIALS is set; never triaged, 1401 days old
70%
#2014963 Snapcraft fails to build snap if Snapcraft itself is installed using `snap try` snapcraft (launchpad) open Snapcraft fails when using snap try due to snapd not allowing file downloads for try-mode snaps. Issue is 1251 days old with no maintainer engagement.
70%