Error: cannot install cannot get device session from store: Post https://api.snapcraft.io/api/v1/snaps/auth/sessions: remote error: bad record MAC

I’m getting issues with snap cli on a fresh install of Ubuntu - it was working now i’m seeing the following on snap commands

cicorias@msi-ubuntu1:~$ sudo snap refresh
error: cannot refresh: cannot refresh snap-declaration for "gtk-common-themes": cannot get device
       session from store: Post https://api.snapcraft.io/api/v1/snaps/auth/sessions: remote error:
       bad record MAC
cicorias@msi-ubuntu1:~$ sudo snap install docker 
error: cannot install "docker": cannot get device session from store: Post
       https://api.snapcraft.io/api/v1/snaps/auth/sessions: remote error: bad record MAC
cicorias@msi-ubuntu1:~$ 

This is indicative of a MITM attack - are you behind a firewall that’s doing naughty things to your traffic?

in a VM - doing basic NAT.

I removed snapd and reset everything, then reinstalled and it worked.

1 Like