Score:2

Snap points me to a package that, in fact, doesn't exist. What's going on?

cn flag

So, I just did the following and it makes absolutely no sense to me. (Please ignore my custom $PS1).

Let's try to install Vs Code in a wrong way (the correct package name is code), and follow through snapd's suggestions:

(base) nagyg -> snap install vscode                                                                                     
error: snap "vscode" is not available on stable but is available to install on the following                            
       channels:                                                                                                        
                                                                                                                        
       candidate  snap install --candidate vscode                                                                       
       beta       snap install --beta vscode                                                                            
       edge       snap install --edge vscode                                                                            
                                                                                                                        
       Please be mindful pre-release channels may include features not completely tested or                             
       implemented. Get more information with 'snap info vscode'.                                                       

(base) nagyg -> snap install --beta vscode                                                                              
error: snap "vscode" is not available on beta but is available to install on the following                              
       channels:                                                                                                        
                                                                                                                        
       edge       snap install --edge vscode                                                                            
                                                                                                                        
       Get more information with 'snap info vscode'.                                                                    
                                                                                                                        
(base) nagyg -> snap install --edge vscode                                                                          
error: snap "vscode" is not available on latest/edge but other tracks exist.                                            
                                                                                                                        
       Please be mindful that different tracks may include different features. Get more information                     
       with 'snap info vscode'.                                                                                         
                                                                                                                        
(base) nagyg -> snap info vscode                                                                                        
error: no snap found for "vscode"    

...What?

The package vscode does not exist. I get this. But why does Snap make false statements, and points me to a nonexisting package on development channels? What is going on here?

us flag
Which version of Ubuntu is this? Try `sudo snap refresh` first.
Neinstein avatar
cn flag
@ArchismanPanigrahi Ubuntu 18.04 LTS. The command gives `all snaps are up to date`, and the situation is unchanged afterwards. I also just did an apt update-upgrade this morning.
Artur Meinild avatar
vn flag
You begin with a false assumption, and try to install the wrong package. Why not install the right package to begin with?
Neinstein avatar
cn flag
@ArturMeinild That's the whole point: a wrong package should outright fail, isn't it? I want to understand why Snap is pointing me to some nonexisting where, and stating that it exists, instead of telling me I'm stupid. Normally if I want to install a nonexisting package, I get `error: snap "njngi" not found`.
Artur Meinild avatar
vn flag
Without having any knowledge about this whatsoever, I would guess the reason is that the snap `vscode` existed at some point, and that there is some hidden data behind the now unused snap name. But it would be better to ask this on the [Snapcraft forum](https://forum.snapcraft.io/).
Neinstein avatar
cn flag
@ArturMeinild thanks for the suggestion, [I did it](https://forum.snapcraft.io/t/snap-points-me-to-a-package-that-in-fact-doesnt-exist-whats-going-on/26326). It's good if they know, this might be a bug then.
Score:0
vn flag

You're using the wrong command to install. It's a good idea to check the Snap Store first, to make sure you got it right.

This is the correct command to install:

sudo snap install code --classic

If you want to know about the inner workings of the snap daemon and snap command, it would be better to ask on the Snapcraft forum, where there is a chance the developers can answer your question.

Neinstein avatar
cn flag
I know it's a wrong command, as I mentioned in the beginning of my question. That's the whole point. The question is, why does Snap tell me the package exist on some channel, when it obviously doesn't?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.