$ snap install ...
...
WARNING: There is 1 new warning. See 'snap warnings'.
Then:
$ snap warnings
last-occurrence: today at 16:00 CEST
warning: |
Option value has invalid field name "apiVersion". For core26+ snaps, fields must be dash separated
lowercase alphanumerics.
Can you tell which app you’ve installed? With it, I will try to reproduce this output on my end aswell just to see whether it’s an isolated incident or something more common.
It is most likely an issue with the specific snap you installed (it isn’t fatal so the snap should be there on your disk to inspect it … i.e. run a grep -r against /snap/<snap name>/current )…
It is likely using apiVersion as i.e. a key for a setting in the configure hook or similar …
$ grep -r apiVersion -r /snap/ 2>/dev/null | grep snapcraft.yaml gave zero results. I have no way to know what app is it (it has started appearing after a flurry of updates), and crucially, the warning doesn’t say it.
I wouldn’t expect it to come from a snapcraft.yaml entry, rather some configure hook or some script using snapctl, do you get anything when omitting the filter for snapcraft.yaml ?
To be clear, my goal isn’t to find the package that is producing this warning, but to flag that (1) the warning is very frugal (what file? what package?) and (2) this looks like something the developer of the snap should care about, not me as a consumer.
Yep, fully agreed regarding the error message, but you should really open an issue against snapd for that bit…
what I wanted to point out is that apparently even snap maintainers are caught by this … and I think it is likely the snapcraft forum post will get an answer and cause a discussion with the snapd team where you could express this too …
sorry for reopening the thread. I saw the other thread @ndyer linked but I don’t think it helps resolve the confusion.
In my case, I just installed canonical k8s and got that warning. I think this can be a big deterrent for new users if the first thing they see after installing a snap is a warning, without understanding what they’re being warned about or being able to address it.
I understand the logic mentioned in the other thread about avoiding users setting data that contains invalid field names/keys, but for a user that is just installing a snap for the first time this is a really bad user experience.