How to fix the fake 'Gym is under attack' notification glitch in Pokemon GO
a new grand Pokemon GO update that turned gym battles on their heads, and introduced Raid monsters to salivate over and earn copious amounts of XP points from. By now, however, you might have run across one of the inevitable glitches that occur after each major game overhaul on such a grand scale. Oftentimes, after you've interacted with a gym by either battling it, swiping for items, or simply trying to put your creature in a friendly one with available slots, you are unable to do so.
While the first player is able to place their critter in an empty gym no problems, for the second one the game returns a message that "The gym is under attack!" without any visible battle going on, and they can't put their Pokemon in. Well, it seems that the game counts each interaction after a recent battle as continuation of said fight, so even if you just swipe for items, this will often preclude you from placing your hard-earned Blissey up top to earn coins and battle monsters. Here's what you can do after you encounter this glitch:
1. Wait it out. Very often after you swipe the gym for items and get the "gym is under attack" message even though there are available slots to put your Pokemon in, and nobody is attacking anything, you just have to wait out the five minutes that take for the gym items to reload. Sometimes it takes more than that, though, but most such situations are resolved by just waiting 5-10 minutes, and then trying to insert a Pokemon of choice in the gym.
2. If you are impatient, you can simply close and restart your Pokemon GO app, which sometimes clears the issue, and the gym is often available for cohabitation immediately, without having to wait. To close your Pokemon GO app, tap the recent apps button on your phone, scroll to the game, and then tap the "x" in the corner of its snapshot card. On iOS, tap the Home key twice, and then swipe up the game's card to close it.
Pro tip: simply place a Pokemon in a friendly gym with available slots prior to spinning its disk, or make sure you battle the last enemy together with your buds before its motivation empties out completely, then each of you must choose a Pokemon to assign, and hit the confirmation together, so that the game doesn't think the gym is still under attack.