Hi @frangio, and @aquiladev, I got the same issue with truffle upgrades.
Added a new variable as address type, getting this issue. if the plugin does not support it, how can I do it manually?
New variables should be placed after all existing inherited variables
Upgraded __gap to an incompatible type
Bad storage gap resize from 46 to 45
Size decrease must match with corresponding variable inserts
@skyclean906 Can you provide an example of how your variables are defined in the old and new versions of your contract? The error indicates that the gap array size was not adjusted correctly in the new version.
Ok, sorry we didn't mention this earlier, but you seem to be using Truffle. Gap resizing is only available on Hardhat for technical reasons (Truffle doesn't give us enough information to confidently assess that layouts are compatible). Opened GitHub issue https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/709 to track this.