Skip to content

Fails to publish: "This login method is not longer supported" #28

Description

@oSoMoN

I use this action in a github worflow to publish a built snap, and (presumably) with the update of snapcraft to 7.0.4 the action started failing with the following error:

Run snapcore/action-publish@v1
  with:
    store_login: ***
    snap: firefox_103.0a1_amd64.snap
    release: edge
Publishing snap "firefox_103.0a1_amd64.snap"...
/snap/bin/snapcraft login --with /tmp/login-data-A4p4jN/login.txt
--with is no longer supported, export the auth to the environment variable 'SNAPCRAFT_STORE_CREDENTIALS' instead                                               
Login successful                                                               
(node:53952) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)
/snap/bin/snapcraft upload firefox_103.0a1_amd64.snap --release edge
This login method is not longer supported                                      Traceback (most recent call last):
  File "/snap/snapcraft/7664/bin/snapcraft", line 8, in <module>
    sys.exit(run())
  File "/snap/snapcraft/7664/lib/python3.8/site-packages/snapcraft/cli.py", line 179, in run
    dispatcher.run()
  File "/snap/snapcraft/7664/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 406, in run
    return self._loaded_command.run(self._parsed_command_args)
  File "/snap/snapcraft/7664/lib/python3.8/site-packages/snapcraft/commands/upload.py", line 89, in run
    client.verify_upload(snap_name=snap_name)
  File "/snap/snapcraft/7664/lib/python3.8/site-packages/snapcraft/commands/store/client.py", line 344, in verify_upload
    self.request(
  File "/snap/snapcraft/7664/lib/python3.8/site-packages/snapcraft/commands/store/client.py", line 217, in request
    return self.store_client.request(*args, **kwargs)
  File "/snap/snapcraft/7664/lib/python3.8/site-packages/craft_store/ubuntu_one_store_client.py", line 137, in request
    self._refresh_token()
  File "/snap/snapcraft/7664/lib/python3.8/site-packages/craft_store/ubuntu_one_store_client.py", line 70, in _refresh_token
    macaroons = json.loads(self._auth.get_credentials())
  File "/snap/snapcraft/7664/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/snap/snapcraft/7664/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/snap/snapcraft/7664/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/snap/bin/snapcraft logout
This login method is not longer supported                                      
Credentials cleared                                                            
Error: The process '/snap/bin/snapcraft' failed with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions