If anyone might be able to help, it's a OnePlus 9 Pro (lemonadep), and the error was:
Error applying update: 5 (ErrorCode::kPostinstallRunnerError)
ERROR: recovery: Error in /sideload/package.zip (status 5)
Looking in /tmp/recovery.log, there are a couple of lines that look worrying. These are the bits during the post-install script:
[ 198.784813] 03-21 00:06:43.557 741 741 I update_engine_sideload: [INFO:subprocess.cc(101)] Running "/postinstall/system/bin/otapreopt_script 1 3"
[ 198.797533] 03-21 00:06:43.569 741 741 I update_engine_sideload: [INFO:subprocess.cc(161)] Subprocess output:
[ 198.797541] /postinstall/system/bin/otapreopt_script: Error: boot-complete not detected.
[ 198.797543]
[ 198.798688] 03-21 00:06:43.571 741 741 I update_engine_sideload: [INFO:postinstall_runner_action.cc(65)] Trying to read /postinstall/build.prop
[ 198.798976] 03-21 00:06:43.571 741 741 I update_engine_sideload: [INFO:postinstall_runner_action.cc(70)] ro.build.ab_update=true
[ 198.799012] 03-21 00:06:43.571 741 741 I update_engine_sideload: [INFO:postinstall_runner_action.cc(65)] Trying to read /postinstall/etc/build.prop
[ 198.799135] 03-21 00:06:43.571 741 741 I update_engine_sideload: [INFO:postinstall_runner_action.cc(65)] Trying to read /postinstall/system/build.prop
[ 198.799156] 03-21 00:06:43.571 741 741 I update_engine_sideload: [INFO:postinstall_runner_action.cc(343)] Performing postinst (bin/checkpoint_gc at /postinstall/bin/checkpoint_gc) installed on mountable device /dev/block/dm-14
[ 198.799534] 03-21 00:06:43.571 741 741 I update_engine_sideload: [INFO:postinstall_runner_action.cc(350)] Format file for new bin/checkpoint_gc is: data
[ 198.799552] 03-21 00:06:43.571 741 741 I update_engine_sideload: [INFO:subprocess.cc(101)] Running "/postinstall/bin/checkpoint_gc 1 3"
[ 198.804970] 03-21 00:06:43.577 741 741 I update_engine_sideload: [INFO:dynamic_partition_control_android.cc(1006)] SnapshotManager initialized.
[ 198.805009] 03-21 00:06:43.577 741 741 I update_engine_sideload: [INFO:dynamic_partition_control_android.cc(1139)] Snapshot writes are done.
[ 198.805020] 03-21 00:06:43.577 741 741 I update_engine_sideload: [INFO:dynamic_partition_control_android.cc(1006)] SnapshotManager initialized.
[ 198.805726] 03-21 00:06:43.578 741 741 E update_engine_sideload: [ERROR:dm.cpp(579)] DM_TABLE_STATUS failed for product_a: No such device or address
[ 198.805740] 03-21 00:06:43.578 741 741 E update_engine_sideload: [ERROR:snapshot.cpp(4363)] Could not read snapshot device table: product_a
[ 198.805753] 03-21 00:06:43.578 741 741 E update_engine_sideload: [ERROR:snapshot.cpp(400)] Cannot ensure there are no overflow snapshots.
[ 198.805766] 03-21 00:06:43.578 741 741 I update_engine_sideload: [INFO:postinstall_runner_action.cc(552)] All post-install commands succeeded
[ 198.805779] 03-21 00:06:43.578 741 741 E update_engine_sideload: [ERROR:postinstall_runner_action.cc(526)] Postinstall action failed. ErrorCode::kPostinstallRunnerError
[ 198.805794] 03-21 00:06:43.578 741 741 I update_engine_sideload: [INFO:dynamic_partition_control_android.cc(1006)] SnapshotManager initialized.
[ 198.805808] 03-21 00:06:43.578 741 741 I update_engine_sideload: [INFO:snapshot.cpp(3053)] Lock acquired for UnmapAllSnapshots
[ 198.805832] 03-21 00:06:43.578 741 741 I update_engine_sideload: [INFO:snapshot.cpp(3058)] Found 12 partitions with snapshots
[ 198.874499] 03-21 00:06:43.646 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot system_b
[ 198.874553] 03-21 00:06:43.646 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot product_a
[ 198.922477] 03-21 00:06:43.694 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot product_b
[ 198.922536] 03-21 00:06:43.694 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot system_a
[ 198.922574] 03-21 00:06:43.694 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot odm_a
[ 198.922605] 03-21 00:06:43.694 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot vendor_a
[ 198.954550] 03-21 00:06:43.726 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot system_ext_b
[ 198.954655] 03-21 00:06:43.727 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot system_ext_a
[ 198.954749] 03-21 00:06:43.727 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot vendor_dlkm_a
[ 199.002951] 03-21 00:06:43.775 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot odm_b
[ 199.038556] 03-21 00:06:43.810 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot vendor_b
[ 199.107642] 03-21 00:06:43.879 741 741 I update_engine_sideload: [INFO:snapshot.cpp(2825)] Successfully unmapped snapshot vendor_dlkm_b
[ 199.107721] 03-21 00:06:43.880 741 741 I update_engine_sideload: [INFO:snapshot.cpp(3066)] Unmapped 12 partitions with snapshots
[ 199.107797] 03-21 00:06:43.880 741 741 I update_engine_sideload: [INFO:dynamic_partition_control_android.cc(345)] Destroying [odm_b, product_b, system_b, system_ext_b, vendor_b, vendor_dlkm_b] from device mapper
[ 199.107867] 03-21 00:06:43.880 741 741 I update_engine_sideload: [INFO:postinstall_runner_action.cc(516)] Unmapped all partitions.
[ 199.108026] 03-21 00:06:43.880 741 741 I update_engine_sideload: [INFO:action_processor.cc(116)] ActionProcessor: finished last action PostinstallRunnerAction with code ErrorCode::kPostinstallRunnerError
[ 199.108072] 03-21 00:06:43.880 741 741 I update_engine_sideload: [INFO:update_attempter_android.cc(752)] Processing Done.
[ 199.108127] 03-21 00:06:43.880 741 741 I update_engine_sideload: [INFO:dynamic_partition_control_android.cc(354)] Destroying [] from device mapper
[ 199.108168] 03-21 00:06:43.880 741 741 I update_engine_sideload: [INFO:dynamic_partition_control_android.cc(358)] UnmapAllPartitions done
[ 199.112862] 03-21 00:06:43.885 741 741 I update_engine_sideload: [INFO:dynamic_partition_control_android.cc(105)] Destroying [] from device mapper
[ 199.112948] 03-21 00:06:43.885 741 741 I BpBinder: onLastStrongRef automatically unlinking death recipients: android.hardware.boot.IBootControl
[ 199.166626] ERROR: recovery: Error in /sideload/package.zip (status 5)
Any advice welcome!