CLI unable to parse repo; Discover works fine

I can install flatpaks just fine with Discover, but not on the command line with the flatpak command. The error thrown is: " F: Failed to parse /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz file: cannot process file of type application/x-zerosize"

appstream.xml.gz exists, is readable, has non-zero size, and contains XML.

Any ideas?

Maybe you could try to repair?

flatpak repair --user
sudo flatpak repair --system

I had tried that before without success. I tried it again exactly as you have specified, and still no luck.