Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Documenso
  3. Documenso does not come up after update to 1.6.0

Documenso does not come up after update to 1.6.0

Scheduled Pinned Locked Moved Documenso
13 Posts 5 Posters 118 Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CaeruleusAqua
    wrote last edited by james
    #1
     ==> Create / Migrate db
    Jul 28 21:46:07 ==> Setting up OIDC
    Jul 28 21:46:07 => Update site config
    Jul 28 21:46:09 2025-07-28T19:46:09Z
    Jul 28 21:46:09 2025-07-28T19:46:09Z
    Jul 28 21:46:09 2025-07-28T19:46:09Z
    Jul 28 21:46:09 2025-07-28T19:46:09Z
    Jul 28 21:46:09 \
    Jul 28 21:46:09 \Prisma schema loaded from packages/prisma/schema.prisma
    Jul 28 21:46:09 Error: P3009
    Jul 28 21:46:09 Datasource "db": PostgreSQL database "db831ce9e36aaa4dsab586a1c87917sa89", schema "public" at "postgresql:5432"
    Jul 28 21:46:09
    Jul 28 21:46:09 migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
    Jul 28 21:46:09 132 migrations found in prisma/migrations
    Jul 28 21:46:09 The `20250522054050_add_organisations` migration started at 2025-07-28 19:45:58.163673 UTC failed
    Jul 28 21:46:11 ==> Create / Migrate db
    Jul 28 21:46:11 ==> Setting up OIDC
    Jul 28 21:46:11 => Update site config
    Jul 28 21:46:13 => Healtheck error: Error: connect ECONNREFUSED 172.18.16.133:3000
    
    1 Reply Last reply
    1
    • marcusquinnM Offline
      marcusquinnM Offline
      marcusquinn
      wrote last edited by marcusquinn
      #2

      Seems to be a problem with other apps, too.

      WARNING: don't restart your apps if they are mission critical, until we have an answer here.

      Web Design https://www.evergreen.je
      Development https://brandlight.org
      Life https://marcusquinn.com

      1 Reply Last reply
      0
      • pepicrftP Offline
        pepicrftP Offline
        pepicrft
        wrote last edited by
        #3

        We are experiencing the same issue. I downgroaded to a 1.5.0 backup, but the issue remains, probably because the attempt to migrate to 1.6.0 put the DB in a weird state.

        1 Reply Last reply
        1
        • jamesJ Offline
          jamesJ Offline
          james
          Staff
          wrote last edited by
          #4

          Hello @documenso users

          I will look into this.

          1 Reply Last reply
          0
          • jamesJ Offline
            jamesJ Offline
            james
            Staff
            wrote last edited by james
            #5

            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?

            marcusquinnM 1 Reply Last reply
            1
            • jamesJ Offline
              jamesJ Offline
              james
              Staff
              wrote last edited by
              #6

              Please follow these steps:

              While the app is installed and in an error state for version 1.6.0:

              • enable the recovery mode in the app settings
              • open the web terminal
              • insert the following
                 export DATABASE_URL=postgres://${CLOUDRON_POSTGRESQL_USERNAME}:${CLOUDRON_POSTGRESQL_PASSWORD}@${CLOUDRON_POSTGRESQL_HOST}:${CLOUDRON_POSTGRESQL_PORT}/${CLOUDRON_POSTGRESQL_DATABASE}
                 export NEXT_PRIVATE_DATABASE_URL=postgres://${CLOUDRON_POSTGRESQL_USERNAME}:${CLOUDRON_POSTGRESQL_PASSWORD}@${CLOUDRON_POSTGRESQL_HOST}:${CLOUDRON_POSTGRESQL_PORT}/${CLOUDRON_POSTGRESQL_DATABASE}
                 export NEXT_PRIVATE_DIRECT_DATABASE_URL=postgres://${CLOUDRON_POSTGRESQL_USERNAME}:${CLOUDRON_POSTGRESQL_PASSWORD}@${CLOUDRON_POSTGRESQL_HOST}:${CLOUDRON_POSTGRESQL_PORT}/${CLOUDRON_POSTGRESQL_DATABASE}
                 npx prisma migrate status --schema ./packages/prisma/schema.prisma
                

              Post the output of this command here.

              Since each migration in the _prisma_migrations table has a logs column that stores the error we can also inspect that with:

              PGPASSWORD=${CLOUDRON_POSTGRESQL_PASSWORD} psql -h ${CLOUDRON_POSTGRESQL_HOST} -p ${CLOUDRON_POSTGRESQL_PORT} -U ${CLOUDRON_POSTGRESQL_USERNAME} -d ${CLOUDRON_POSTGRESQL_DATABASE} -c "SELECT id,migration_name,started_at,rolled_back_at,logs FROM _prisma_migrations;"
              

              and see what migration failed and has logs for further analysis.


              For @CaeruleusAqua since the log provided the migration failed is 20250522054050_add_organisations we can attempt the following while the app is in recovery mode:

              export DATABASE_URL=postgres://${CLOUDRON_POSTGRESQL_USERNAME}:${CLOUDRON_POSTGRESQL_PASSWORD}@${CLOUDRON_POSTGRESQL_HOST}:${CLOUDRON_POSTGRESQL_PORT}/${CLOUDRON_POSTGRESQL_DATABASE}
              export NEXT_PRIVATE_DATABASE_URL=postgres://${CLOUDRON_POSTGRESQL_USERNAME}:${CLOUDRON_POSTGRESQL_PASSWORD}@${CLOUDRON_POSTGRESQL_HOST}:${CLOUDRON_POSTGRESQL_PORT}/${CLOUDRON_POSTGRESQL_DATABASE}
              export NEXT_PRIVATE_DIRECT_DATABASE_URL=postgres://${CLOUDRON_POSTGRESQL_USERNAME}:${CLOUDRON_POSTGRESQL_PASSWORD}@${CLOUDRON_POSTGRESQL_HOST}:${CLOUDRON_POSTGRESQL_PORT}/${CLOUDRON_POSTGRESQL_DATABASE}
              
              # Mark the migration as rolled back - this updates the migration record in the _prisma_migrations table to register it as rolled back, allowing it to be applied again:
              npx prisma migrate resolve --rolled-back 20250522054050_add_organisations --schema ./packages/prisma/schema.prisma
              # Try to re-deploy the migration
              npx prisma migrate deploy --schema ./packages/prisma/schema.prisma
              
              1 Reply Last reply
              0
              • J Offline
                J Offline
                joseph
                Staff
                wrote last edited by
                #7

                Seems to work fine for me in my test server. Can you give postgres more memory ? https://docs.cloudron.io/services/#configure

                1 Reply Last reply
                0
                • jamesJ james

                  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?

                  marcusquinnM Offline
                  marcusquinnM Offline
                  marcusquinn
                  wrote last edited by
                  #8

                  @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.

                  Web Design https://www.evergreen.je
                  Development https://brandlight.org
                  Life https://marcusquinn.com

                  1 Reply Last reply
                  0
                  • jamesJ Offline
                    jamesJ Offline
                    james
                    Staff
                    wrote last edited by
                    #9

                    Good Morning @marcusquinn
                    This sounds something else is astray with PostgreSQL on your instance.
                    Can you please review and/or send the PostgreSQL log file?

                    1 Reply Last reply
                    1
                    • pepicrftP Offline
                      pepicrftP Offline
                      pepicrft
                      wrote last edited by
                      #10

                      @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.

                      1 Reply Last reply
                      2
                      • pepicrftP Offline
                        pepicrftP Offline
                        pepicrft
                        wrote last edited by
                        #11

                        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.

                        1 Reply Last reply
                        2
                        • C Offline
                          C Offline
                          CaeruleusAqua
                          wrote last edited by CaeruleusAqua
                          #12
                          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") }
                          
                          1 Reply Last reply
                          0
                          • jamesJ Offline
                            jamesJ Offline
                            james
                            Staff
                            wrote last edited by
                            #13

                            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.

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Bookmarks
                            • Search