Hmm, I cannot reproduce, I wonder what am I missing? On my test 18.04 system I had all snaps up-to-date, so in order to reproduce it I forced edge channel with sudo snap refresh --edge core|cat (and then did the same with --stable). When forcing edge the snap had to be downloaded from the store.
Could it be just a temporary store issue? Can you still reproduce it (and does it happen with all snaps)?
Hmm now I cannot reproduce this anymore either perhaps there was some sort of store outage at the time? But I could refresh core when not piping the output which was very odd. To be clear, what I did at the time to reproduce it was:
snap switch core --edge # was on stable before
snap refresh --list # verify that there is a refresh available
snap refresh core | cat # fails
snap refresh core # works
snap remove core --revision=<the-one-on-stable>
snap switch core --stable
snap refresh --list # verify that there is still a refresh available now
snap refresh core | cat # fails
snap refresh core # works
I unfortunately had snapd logs rotated since when I initially tried this, so Iām not sure if there was indeed a store issue at that point in time or not.
I can confirm this, right now it says snap "core" has no updates available. But when I opened the thread I could reproduce it 100%. No matter how many times I run without pipe it always worked and with pipe it always failed.