Hi there, the same thing has been lately happening to me with many problems at upgrading time. Finally I got them solved reinstalling twrp 3.0.0, the one I had when we first passed from android 5.1 to 7.0.
So may be it's a problem related to twrp?
Mi4c