Unable to close a channel (404)


#1

I’m trying to close the “candidate” channel on notepadqq, like this:

snapcraft close notepadqq candidate

However, this is the message I get:

Could not close channel: 404 Not Found

What should I do?
Thanks


#2

Are you logged in with snapcraft?

Use snapcraft whoami to see if you’re logged in. Use snapcraft logout and snapcraft login perhaps to re-login to the store?


#3

It’s possible your authentication data (macaroons) are stale, in which case a logout/login as @popey mentioned might help.

I checked and couldn’t repro the “404 Not Found” message. I tried fumbling the channel name:

$ snapcraft close hello-roadmr-1 edgae
Could not close channel: Not a valid channel: edgae

fumbling the snap name:

$ snapcraft close hello-roaadmr-1 edge
Your account lacks permission to close channels for this snap. Make sure the logged in account has upload permissions on 'hello-roaadmr-1' in series '16'.

and doing so while logged out:

$ snapcraft close something edge
No valid credentials found. Have you run "snapcraft login"?
Invalid credentials: Root macaroon not in the config file. Have you run "snapcraft login"?

so the 404 in and of itself is weird.

Is there anything else in your setup or environment that might be funny or out of the ordinary? what does snapcraft status notepadqq say?


#4

It appears that also “snapcraft status” shows some issues, even after loggin out and back in:

$ snapcraft status notepadqq
Failed to get snap ID for snap 'notepadqq'. 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
$ snapcraft logout
Credentials cleared.
$ snapcraft login
Enter your Ubuntu One e-mail address and password.
If you do not have an Ubuntu One account, you can create one at https://dashboard.snapcraft.io/openid/login
Email: xxxxxxx
Password: 
Login successful.
$ snapcraft status notepadqq
Failed to get snap ID for snap 'notepadqq'. 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
$ snapcraft close notepadqq candidate
Could not close channel: 404 Not Found

#5

Well, snapcraft is not right, it’s not an error in the store :stuck_out_tongue:
In any case - could you run and paste output of:

snapcraft version
lsb-release -a

and let me know whether snapcraft was installed as a snap or as a deb (using apt-get)?


#6

Sure, here it is:

$ snapcraft version
snapcraft, version 2.43.1+git19.g057f666
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

Snapcraft was installed as a snap and for some reason I was on the edge channel, so I tried moving to the stable version. The problem is, however, still there (even after a relogin):

$ snapcraft version
snapcraft, version 2.43.1
$ snapcraft status notepadqq
Failed to get snap ID for snap 'notepadqq'. 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

#7

We print that when we get 5xx, so it is an error in the store :wink:


#8

@sergiusens Is it possible it’s hitting not-the-store? How can we ask snapcraft to show us which URLs it’s hitting?


#9

If it helps, I’ve been able to correctly push snaps to the store without any problem.


#10

Fixed that for you :wink:


#11

Again, I have tried to pull the snapcore/snapcraft Docker image on a macOS machine and ran the same commands from there.

The message is the same:
Failed to get snap ID for snap 'notepadqq'. 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


#12

@danieleds please try this, it should give us more information:

$ SNAPCRAFT_ENABLE_DEVELOPER_DEBUG=1 snapcraft status notepadqq

#13

@kyrofa

$ SNAPCRAFT_ENABLE_DEVELOPER_DEBUG=1 snapcraft status notepadqq
Starting snapcraft 2.43.1 from /snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/cli.
Traceback (most recent call last):
  File "/snap/snapcraft/1871/bin/snapcraft", line 11, in <module>
    load_entry_point('snapcraft==2.43.1', 'console_scripts', 'snapcraft')()
  File "/snap/snapcraft/1871/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/snap/snapcraft/1871/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/snap/snapcraft/1871/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/snap/snapcraft/1871/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/snapcraft/1871/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/cli/store.py", line 266, in status
    snapcraft.status(snap_name, series, arch)
  File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/_store.py", line 778, in status
    status = store.get_snap_status(snap_name, series, arch)
  File "/snap/snapcraft/1871/lib/python3.5/site-packages/snapcraft/storeapi/_store_client.py", line 219, in get_snap_status
    raise errors.NoSnapIdError(snap_name)
snapcraft.storeapi.errors.NoSnapIdError: Failed to get snap ID for snap 'notepadqq'. 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 

I have also noticed that “notepadqq” has disappeared from the list at https://snapcraft.io/account/snaps.
It’s still visible from https://dashboard.snapcraft.io/snaps/ though.


#14

So @roadmr to answer your question, that’s hitting the account API to get a list of snaps and then pulling out the snap ID for the snap name in question. However, the ID provided by the store seems to be None. It kinda sounds like this store issue again.


#15

thanks @kyrofa! @danieleds can you please try now? I’ve done some scary operations store-side and I believe things may work better now.

  • Daniel

#16

@roadmr hmm, I’m still getting the same errors on the console. Also, the snap still doesn’t show up on https://snapcraft.io/account/snaps.


#17

Apologies! I forgot to click “yes, sure I want to do the scary operation” button. I’ve done so now; can you please retry?


#18

:smiley: now everything’s ok!

Thank you


#19

Fantastic, thanks for confirming.

@kyrofa your catch of this as an instance of bug 1763721 was spot-on. I’ve raised the store task’s priority on that one so we do get a fix out.

Thanks and sorry for the trouble!

  • Daniel