Can't install or refresh snaps on Arch Linux


#1

I really don’t know if I’m in the right place to ask this question but I don’t know where else I should do it. I’m running Arch and have a few snaps installed on my computer. Yesterday I tried to install a new one but I got the following message:
error: too early for operation, device not yet seeded or device model not acknowledged

It doesn’t matter which snap I try to install, I’m always getting this error. It also appears when I try to refresh a snap. I googled it but didn’t find anything useful.

Can you tell me whats wrong?

Thanks in advance.
Tim


#2

That’s an interesting error, not seen that before. Well done :slight_smile:

What’s the output of snap version?

Is the time correct on your machine? Did you recently move timezone?


#3

Here’s the output of snap version:

snap    2.36.1-1
snapd   2.36.1-1
series  16
arch    -
kernel  4.19.4-arch1-1-ARCH

Time is correct, I didn’t move. timedatectl says:
Local time: Mo 2018-11-26 15:13:37 CET
Universal time: Mo 2018-11-26 14:13:37 UTC
RTC time: Mo 2018-11-26 14:13:37
Time zone: Europe/Berlin (CET, +0100)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no


#4

Also what is the output of snap changes ?


#5
error: no changes found

#6

journalctl -u snapd --full --no-pager ?


#7
-- Reboot --
Nov 26 20:19:49 derschredder systemd[1]: Starting Snappy daemon...
Nov 26 20:19:49 derschredder snapd[2758]: AppArmor status: apparmor is enabled but some features are missing: dbus, network
Nov 26 20:19:49 derschredder snapd[2758]: daemon.go:369: started snapd/2.36.1-1 (series 16; classic; devmode) arch/ (amd64) linux/4.19.4-arch1-1-ARCH.
Nov 26 20:19:49 derschredder systemd[1]: Started Snappy daemon.

This is of course after I tried to do snap refresh


#8

I am having the same problem on arch, no idea whats causing this.


#9

Upgrade to snapd version 2.36.2 didn’t fix the problem.


#10

Can you post the output of snap changes?


#11

It’s still:
error: no changes found


#12

Are there any files under /var/lib/snapd?

Can you add SNAPD_DEBUG=1 to /etc/default/snapd, then restart the daemon and post the logs?


#13

Yes, there are files.

➜  ~ ll /var/lib/snapd/
drwxr-xr-x 4 root root 4,0K 25. Nov 22:55 apparmor/
drwxr-xr-x 4 root root 4,0K 27. Aug 23:02 assertions/
drwx------ 2 root root 4,0K 28. Aug 21:39 cache/
drwx------ 2 root root 4,0K  8. Nov 20:40 cookie/
drwxr-xr-x 3 root root 4,0K 27. Aug 22:56 desktop/
drwxr-xr-x 3 root root 4,0K 27. Aug 23:02 device/
drwxr-xr-x 2 root root 4,0K 27. Aug 22:53 hostfs/
drwxr-xr-x 6 root root 4,0K 27. Aug 22:56 lib/
drwxr-xr-x 2 root root 4,0K  8. Nov 20:40 mount/
drwxr-xr-x 3 root root 4,0K 27. Aug 22:56 seccomp/
drwxr-xr-x 2 root root 4,0K 28. Aug 21:39 sequence/
drwxr-xr-x 6 root root 4,0K  8. Nov 20:40 snap/
drwxr-xr-x 2 root root 4,0K  8. Nov 20:40 snaps/
-rw------- 1 root root 3,6K 25. Nov 22:44 state.json
-rw-r--r-- 1 root root  385  2. Dez 13:07 system-key
d--------- 2 root root 4,0K 27. Aug 22:53 void/

Which log file do you want me to post?


#14

Well, you seem to have a bunch of files and a non-empty state data. Let’s see if we can figure out what’s wrong. Can you run this:

sudo cat /var/lib/snapd/state.json | \
     jq '.data.auth.device["brand","model"],.data.seeded,.data["seed-time"]'

Then:

snap known model model=generic-classic

And:

cat /var/lib/snapd/assertions/asserts-v0/model/16/generic/generic-classic/active

#15
➜  ~ sudo cat /var/lib/snapd/state.json | \
      jq '.data.auth.device["brand","model"],.data.seeded,.data["seed-time"]'
"generic"
"generic-classic"
true
"2018-08-23T22:21:24.454919144+02:00"

➜  ~ snap known model model=generic-classic

The file /var/lib/snapd/assertions/asserts-v0/model/16/generic/generic-classic/active does not exist.

 ➜  ~ ll /var/lib/snapd/assertions/asserts-v0/
drwxr-xr-x 4 root root 4,0K 28. Aug 20:49 account/
drwxr-xr-x 3 root root 4,0K 28. Aug 20:36 account-key/
drwxr-xr-x 3 root root 4,0K 28. Aug 20:36 snap-declaration/
drwxr-xr-x 6 root root 4,0K 28. Aug 21:39 snap-revision/

#16

This is something for @pedronis to look at next week once he is back.


#17

One more thing to try:

sudo cat /var/lib/snapd/state.json | jq '.data.auth.device.serial'

#18
➜  ~ sudo cat /var/lib/snapd/state.json | jq '.data.auth.device.serial'
"9f73ba7e-d243-461a-af04-d192ca16a1ed"

#19

This is strange, a device with a set model in the state, but the model assertion is not there…


#20

@mborzecki what could delete the model assertion? there is no code in snapd itself afaik that would delete it, unless I’m missing something, is there something that could in the snapd packaging for arch?