you keep marking this issue as duplicate ... where's the original? And it's urgent: when it happens (which is not always, have seen it today for the first time) there is no way around: swiping, dnd, even clicking the remove button in the popup, all lead to the same error. One additional observation: might happen only when trying to remove the last unit (that's usually a wounded agent) in the army.
It's simply impossible to continue fighting, have to wait until the unit is healed, or kill it (reported from a guild member).