I think gyms are still bugged. I got that first error about gym is under attack but no one was around. But the gym never was going down/motivation never dropped. Came back later and it worked. Put a guy in and fed him.
Also the badge system wasn't working right off the hop. Go back now and spin the stop and feed mons and it seems to work better.
Lots of glitches so far.