Documenso does not come up after update to 1.6.0
-
I just tried to reproduce this error and got the following log:
Jul 29 10:31:49 ==> Create / Migrate db Jul 29 10:31:50 => Healthcheck error: Error: connect ECONNREFUSED 172.18.19.52:3000 Jul 29 10:31:51 \Prisma schema loaded from packages/prisma/schema.prisma Jul 29 10:31:51 Datasource "db": PostgreSQL database "db806162892d894b9f84f2eafb933ba9d4", schema "public" at "postgresql:5432" Jul 29 10:31:51 2025-07-29T08:31:51Z Jul 29 10:31:51 132 migrations found in prisma/migrations Jul 29 10:31:51 2025-07-29T08:31:51Z Jul 29 10:31:51 Applying migration `20250522054049_add_id_generator` Jul 29 10:31:51 Applying migration `20250522054050_add_organisations` Jul 29 10:31:51 Applying migration `20250611052525_add_session_revoke_enum` Jul 29 10:31:51 2025-07-29T08:31:51Z Jul 29 10:31:51 The following migration(s) have been applied: Jul 29 10:31:51 2025-07-29T08:31:51Z Jul 29 10:31:51 migrations/ Jul 29 10:31:51 └─ 20250522054049_add_id_generator/ Jul 29 10:31:51 └─ migration.sql Jul 29 10:31:51 └─ 20250522054050_add_organisations/ Jul 29 10:31:51 └─ migration.sql Jul 29 10:31:51 └─ 20250611052525_add_session_revoke_enum/ Jul 29 10:31:51 └─ migration.sql Jul 29 10:31:51 2025-07-29T08:31:51Z Jul 29 10:31:51 All migrations have been successfully applied.The app update was successful, and the app is in a healthy state.
@pepicrft a restore to the previous backup did not work? Did I get this right?
@marcusquinn said in Documenso does not come up after update to 1.6.0:
Seems to be a problem with other apps, too.
What other apps are you experiencing this issue with?
@james All apps that have updated recently now experiencing this issue:
- Docuseal
- Librechat
- n8n
- Postiz
- Privatebin
- StirlingPDF
- Vaultwarden
- Ghost
I just increased the PostGreSQL DB Memory from 1GB to 2GB, and still no joy on app restarts.
-
@james in my case the same migration failed, and when I tried to migrate, I got the following migration error:
Error: P3018 A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve Migration name: 20250522054050_add_organisations Database error code: 23502 Database error: ERROR: null value in column "organisationId" of relation "OrganisationGroup" violates not-null constraint DETAIL: Failing row contains (org_group_wxiansskyyehhuuo, null, INTERNAL_TEAM, MEMBER, null, 1, ADMIN). DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E23502), message: "null value in column \"organisationId\" of relation \"OrganisationGroup\" violates not-null constraint", detail: Some("Failing row contains (org_group_wxiansskyyehhuuo, null, INTERNAL_TEAM, MEMBER, null, 1, ADMIN)."), hint: None, position: None, where_: None, schema: Some("public"), table: Some("OrganisationGroup"), column: Some("organisationId"), datatype: None, constraint: None, file: Some("execMain.c"), line: Some(2006), routine: Some("ExecConstraints") }So it seems the migration is making assumptions on the state of some tables.
-
For anyone running into this, it seems the migration assumes that all teams have a subscription. Until the migration is fixed, you can workaround it by faking a subscription.
-
Prisma schema loaded from packages/prisma/schema.prisma Datasource "db": PostgreSQL database "db831ce9e36aaa4dc1b586a1c879179689", schema "public" at "postgresql:5432" 132 migrations found in prisma/migrations Following migration have not yet been applied: 20250611052525_add_session_revoke_enum To apply migrations in development run prisma migrate dev. To apply migrations in production run prisma migrate deploy. npm notice npm notice New major version of npm available! 10.9.2 -> 11.5.2 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.5.2 npm notice To update run: npm install -g npm@11.5.2 npm notice npx prisma migrate deploy --schema ./packages/prisma/schema.prisma Prisma schema loaded from packages/prisma/schema.prisma Datasource "db": PostgreSQL database "db831ce9e36aaa4dc1b586a1c879179689", schema "public" at "postgresql:5432" Migration 20250522054050_add_organisations marked as rolled back. ┌─────────────────────────────────────────────────────────┐ │ Update available 6.8.2 -> 6.13.0 │ │ Run the following to update │ │ npm i --save-dev prisma@latest │ │ npm i @prisma/client@latest │ └─────────────────────────────────────────────────────────┘ Prisma schema loaded from packages/prisma/schema.prisma Datasource "db": PostgreSQL database "db831ce9e36aaa4dc1b586a1c879179689", schema "public" at "postgresql:5432" 132 migrations found in prisma/migrations Applying migration `20250522054050_add_organisations` Error: P3018 A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve Migration name: 20250522054050_add_organisations Database error code: 23502 Database error: ERROR: null value in column "organisationId" of relation "OrganisationGroup" violates not-null constraint DETAIL: Failing row contains (org_group_dyzbocwtyozutncz, null, INTERNAL_TEAM, MEMBER, null, 1, ADMIN). DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E23502), message: "null value in column \"organisationId\" of relation \"OrganisationGroup\" violates not-null constraint", detail: Some("Failing row contains (org_group_dyzbocwtyozutncz, null, INTERNAL_TEAM, MEMBER, null, 1, ADMIN)."), hint: None, position: None, where_: None, schema: Some("public"), table: Some("OrganisationGroup"), column: Some("organisationId"), datatype: None, constraint: None, file: Some("execMain.c"), line: Some(2006), routine: Some("ExecConstraints") } -
Hello @CaeruleusAqua
@pepicrft linked the workaround here@pepicrft said in Documenso does not come up after update to 1.6.0:
For anyone running into this, it seems the migration assumes that all teams have a subscription. Until the migration is fixed, you can workaround it by faking a subscription.
Either you can apply this yourself or you will have to wait until Documenso releases a new Update fixing this issue.
-
I ran into the same 20250522054050_add_organisations migration failure on a self-hosted Docker instance and spent some time digging into the root cause. The "fake subscription" workaround that's been floating around doesn't fully solve it — the issue goes deeper than a missing Subscription record.
I was able to fully resolve it and migrate from v1.8.1 → v2.6.0 with all 17 pending migrations applied and data intact. Posted details on the GitHub issue here: https://github.com/documenso/documenso/issues/1880
If anyone's still stuck on this and wants help getting unstuck, feel free to reach out. -
Hello @giniw88 and welcome to the Cloudron Forum
I have removed your mail address self-promotion since you are new to the forum due to missing reputation.
If you want to provide help with this issue, do it here in the forum publicly, so everyone can benefit from it.
Also, please keep in mind this is the Cloudron Forum and not a generic 'self-hosted Docker' support forum. -
The root cause is that self-hosted Teams have no customerId (Stripe ID). The migration copies it onto the Subscription, gets NULL, then deletes the Subscription. Run these before upgrading:
sqlUPDATE "Team" SET "customerId" = 'cus_selfhosted_' || id WHERE "customerId" IS NULL;Then create Subscription records for any Teams missing them. If you've already attempted the upgrade and it failed, you'll also need to clean up 10 partially-created tables before retrying.