EMCC: OMS responded illegally

If, after an EMCC 13.3.x gold image deployment, the agent heartbeat start to fails with the error ” OMS responded illegally [ERROR- Failed to Update Target Type Metadata]”, try, on the agent stuck, to rollback all patches, starting with the generic patch.
If the problem disappear, then a new gold image may be deployed, fixing the problem, which is going to save a lot of setup, that otherwise would have to be redo if the agent has to be decommissioned, including all related targets.

This is what happened with the 190731 patch. Removing 29633457(, then reapplying (29921047), fixed the issue

$ORACLE_HOME/OPatch/opatch rollback -id 29633457