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.
We can't see any errors in what you've shared so far, and we can't reproduce it locally either. The following storage upgrade works correctly as expected:
These are not the contracts you are having issues with. It would not be labelled abstract.
Please share the entire codebase. If you can't do so, please put together a minimal reproduction example that you can fully share and that we can use to reproduce the issue.
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.