Failed to get snap ID for snap 'teams-for-linux'

Hi,

I am successfully deploying the snap package in the edge branch but, somehow, the build then fails with the following message:


Failed to get snap ID for snap ‘teams-for-linux’. This is an error in the store, please open a new topic in the ‘store’ category in the forum: https://forum.snapcraft.io/c/store


GitHub action in here https://github.com/IsmaelMartinez/teams-for-linux/runs/536860840?check_suite_focus=true

Thanks

Hello!

I think Electron-builder is used to build this snap, and it’s not clear from the log how it’s calling snapcraft when it gets that error. It would appear that it’s not properly logged in and can’t get the list of snaps owned by the account, but that’s weird because just above that error we can see it did successfully publish the revision:

Preparing to push 'teams-for-linux_1.1.0_amd64.snap'.

After pushing, the resulting snap revision will be released to 'edge' when it passes the Snap Store review.

Install the review-tools from the Snap Store for enhanced checks before uploading this snap.
Pushing 'teams-for-linux_1.1.0_amd64.snap' [                             ]   0%
(... yadda ...)
released

Revision 80 of 'teams-for-linux' created.
Processing...|                                                                 
Failed to get snap ID for snap 'teams-for-linux'. This is an error in the store, please open a new topic in the 'store' category in the forum: https://forum.snapcraft.io/c/store
  ⨯ exit status 2

Quickly looking, it appears to call a “publish-snap” script but I couldn’t find this in either electron-builder’s source or snapcraft’s. I’ll keep looking but it would take someone more familiar with electron-builder to really figure this out.

  • Daniel

  • Daniel

Hi @roadmr,

Thanks for looking into this. Could it be permissions on that part (get the snap ID)?

Basically, I am not the person that setup that repository (was julian alarcon) but I have been publising previously with Travis (https://docs.travis-ci.com/user/deployment/snaps/ and https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/.travis.yml) but that one started failing a couple of weeks ago (for another reason not related to snapcraft)

Because travis taks around 15 minutes to build, I moved to github-actions (also, to try it) and that is the only part that is now failing.

Anyway, thanks again for looking into that. Let me know if you want me to try anything from my side.

I don’t think so; if your github action has the credentials and permissions to push the snap then it should also be able to hit the API to get the snap id or information.

  • Daniel

I think it must be something with my user.

I get the same message running the following command from the command line:

snapcraft status teams-for-linux     

Failed to get snap ID for snap ‘teams-for-linux’. This is an error in the store, please open a new topic in the ‘store’ category in the forum: https://forum.snapcraft.io/c/store

Also, if I try to “create” a snap with the same id in the UI it warns me saying:
You previously owned “teams-for-linux” but it was revoked.

I never owned that repo, julian-alarcon did set it up for the project and grant me access… but seems like something has gone bananas on that area.

Can you run snapcraft whoami ?

email: ismaelmartinez@gmail.com
developer-id: pihWSwWbaD7SL3snVuSL078MydMnRvMJ

Just to clarify, I did find a revoked request for “teams-for-linux” under your name, filed on 2019-04-22.

Since this all was set up about a year ago, and our authentication tokens (macaroons) do expire after one year, I wonder if you should simply snapcraft logout and then snapcraft login to make things slightly saner.

If that makes your local snapcraft work again, then you’d need to update the copy of your credentials that github actions are using to publish this snap.

Everything else looks OK, as a collaborator you should have everything you need to publish the snap, setup-wise.

  • Daniel

I tried to do as you suggested but I am still getting the same “snap id” issue.

I now remember that. I tried to get access while I was trying to get the credentials from Julian Alarcon. He took a few days to tried to revoke that snap id so I could create it in my account… but that process was stopped as julian then grant me access.

I did never manage the teams-for-linux snap id. I had to create a teams-for-linux-isma a few days later to start playing with the publishing. Sorry, was a long time ago and I had forgot I did trigger a “revoke”

Any suggestions?

I am happy to wait until the 25th (only a few days left) and try again… if that works for you? (that 1 year expiry will have trigger). Thanks for you time, by the way.

I don’t think waiting will solve anything, snapcraft logout/login should have the same effect.

Can you do:

SNAPCRAFT_ENABLE_DEVELOPER_DEBUG=yes snapcraft status teams-for-linux

If that doesn’t yield any clues, I’ll check if removing the revoked snap declaration helps, a revoked decl for a name you’re a collaborator of might be causing trouble.

Thanks again.

Results in here:

SNAPCRAFT_ENABLE_DEVELOPER_DEBUG=yes snapcraft status teams-for-linux
Starting snapcraft 3.11 from /snap/snapcraft/4282/lib/python3.6/site-packages/snapcraft/cli.
Parts dir /home/pluk.eeghlan.net/ismael.martinez/parts
Stage dir /home/pluk.eeghlan.net/ismael.martinez/stage
Prime dir /home/pluk.eeghlan.net/ismael.martinez/prime
Parts dir /home/pluk.eeghlan.net/ismael.martinez/parts
Stage dir /home/pluk.eeghlan.net/ismael.martinez/stage
Prime dir /home/pluk.eeghlan.net/ismael.martinez/prime
Parts dir /home/pluk.eeghlan.net/ismael.martinez/parts
Stage dir /home/pluk.eeghlan.net/ismael.martinez/stage
Prime dir /home/pluk.eeghlan.net/ismael.martinez/prime
Parts dir /home/pluk.eeghlan.net/ismael.martinez/parts
Stage dir /home/pluk.eeghlan.net/ismael.martinez/stage
Prime dir /home/pluk.eeghlan.net/ismael.martinez/prime
Calling https://dashboard.snapcraft.io/dev/api/account with params None and headers {'Authorization': '<macaroon>', 'Accept': 'application/json', 'User-Agent': 'snapcraft/3.11 Ubuntu/18.04 (amd64)'}
Sorry, an error occurred in Snapcraft:
Failed to get snap ID for snap 'teams-for-linux'. This is an error in the store, please open a new topic in the 'store' category in the forum: https://forum.snapcraft.io/c/store
Traceback (most recent call last):
  File "/snap/snapcraft/4282/bin/snapcraft", line 11, in <module>
    load_entry_point('snapcraft==3.9.1', 'console_scripts', 'snapcraft')()
  File "/snap/snapcraft/4282/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/snap/snapcraft/4282/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/snap/snapcraft/4282/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/snap/snapcraft/4282/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/snapcraft/4282/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/snap/snapcraft/4282/lib/python3.6/site-packages/snapcraft/cli/store.py", line 375, in status
    snapcraft.status(snap_name, arch)
  File "/snap/snapcraft/4282/lib/python3.6/site-packages/snapcraft/_store.py", line 1027, in status
    status = StoreClientCLI().get_snap_status(snap_name, arch)
  File "/snap/snapcraft/4282/lib/python3.6/site-packages/snapcraft/storeapi/_store_client.py", line 248, in get_snap_status
    raise errors.NoSnapIdError(snap_name)
snapcraft.storeapi.errors.NoSnapIdError: Failed to get snap ID for snap 'teams-for-linux'. This is an error in the store, please open a new topic in the 'store' category in the forum: https://forum.snapcraft.io/c/store

Still no joy… can you remove that revokation? Thanks in advance

Done! Give it a try now.

  • Daniel

That did the trick! Thanks a lot for your help. This ticket can now be closed.