NextCloud Office failed due to "lastval not yet defined"


So I’ve upgraded NextCloud to version 27, and then I don’t use anymore wopi , since there is no version compatible with 27.

Unfortunately, I can’t use NextCloud office.

The first bug I met was

OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[42703]: Undefined column: 7 ERROR: column “id” does not exist LINE 1: SELECT “id” FROM “oc_richdocuments_wopi” WHERE “expiry” < $1… ^

I check and I finally add the column myself

Second bug , I can’t fix it easily is

OC\DB\Exceptions\DbalException: An exception occurred while executing a
query: SQLSTATE[55000]: Object not in prerequisite state: 7 ERROR: lastval is not yet defined in this session

I check and it seems related to PostGresql. The sequence is not set so impossible to get the lastval.

I’ve been searching for hours, any help will be very welcome

Thank you in advance


Little update , I’ve upgraded until the last version of NextCloud and the bug is still there.




After searching , checking the code, the forums I come to the conclusion that it is likely a bug. With the application “wopi” it used to work (version 23) but after the upgrade to 29, I had to use NextCloud Office, which has never worked.

NextCloud - Office doesn’t work , not even CODE (Collabora Online Development) when NextCloud is installed with a postgresql database.

Because it is really an issue, I need a support to fix this asap :
how can I open a bug for this ?
Is it an official support ?

Thank you in advance