Methane from cow-farts/waste for search a huge herd would never just collect in a building. That's why dairy barns are open-sided or vented.
As mentioned, I think the largest, most modern farms have ways to collect the gas - and use it. So it would gathered in tanks, possibly compressed - perhaps that is what exploded if handled improperly
Just my guess. I'm not a dairy expert (although my uncle did have 30 cows when I was kid!)
that would be terrible if that were the case, and I would think a real setback for the methane-capture-use burgeoning industry possibly