If I remember right, that error is caused by a locked file. Take a look at the following URL, under " Manually disable locking state". If there are many users on your instance of NextCloud, I would suggest putting NextCloud into maintenance mode, also mentioned at the following URL.