i got this error trying to flash dm-verity.If you get ERROR 1, you probably need to flash a stock boot.img first. Magisk wants to edit the boot.img, and if you have already edited it and try to edit an editted one, it'll fail.
If the phone won't boot, be sure you flashed dm-verity.
- Boot to cedric twrp
- flash dm-verity
- flash su
- reboot