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
  • Brite
  • 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

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Vikunja
  3. Vikunja app not responding after 2.5.0 update

Vikunja app not responding after 2.5.0 update

Scheduled Pinned Locked Moved Vikunja
8 Posts 3 Posters 60 Views 3 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.
  • P Offline
    P Offline
    p44
    translator
    wrote last edited by p44
    #1

    Hi,

    after Vikunja 2.5.0 update (io.vikunja.cloudronapp@1.25.0), app is not responding with this error:

    level=ERROR msg="Migration failed: migration 20260720120000 failed: cannot recreate the unique index on tasks (project_id, index) because 2 sets of duplicate values exist — remove the duplicates manually, then restart Vikunja"
    

    Any help would be great.

    Thanks a lot

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

      Hello @p44
      According to the upstream this was fixed https://github.com/go-vikunja/vikunja/issues/3313 with version 2.5.0.
      Maybe reporting this upstream then is a good idea.

      P 1 Reply Last reply
      1
      • jamesJ james

        Hello @p44
        According to the upstream this was fixed https://github.com/go-vikunja/vikunja/issues/3313 with version 2.5.0.
        Maybe reporting this upstream then is a good idea.

        P Offline
        P Offline
        p44
        translator
        wrote last edited by
        #3

        @james No fixed at all...

        humptyH 1 Reply Last reply
        0
        • P p44

          @james No fixed at all...

          humptyH Offline
          humptyH Offline
          humpty
          wrote last edited by
          #4

          @p44 2.5.0 is working fine for me. I had to log back in though. Maybe it's a cache issue on your end?

          1 Reply Last reply
          1
          • P Offline
            P Offline
            p44
            translator
            wrote last edited by p44
            #5

            @humpty thanks for your help.

            Do you mean browser cache?

            Cloudron app does not start after update...

            humptyH 1 Reply Last reply
            0
            • P p44

              @humpty thanks for your help.

              Do you mean browser cache?

              Cloudron app does not start after update...

              humptyH Offline
              humptyH Offline
              humpty
              wrote last edited by
              #6

              @p44 Yes, browser cache. But, it seems a farfetched idea. Have you tried rolling back to a working backup and then updating again? Perhaps something went wrong or the newest update will bypass/address the issue.

              1 Reply Last reply
              0
              • P Offline
                P Offline
                p44
                translator
                wrote last edited by p44
                #7

                @humpty Yes, I rolled back twice always with same error restoring app...

                I asked to ChatGPT 5.0:

                I’m on Cloudron trying to Update Vikunja app to 2.5.0 , but I get this error:
                
                level=ERROR msg="Migration failed: migration 20260720120000 failed: cannot recreate the unique index on tasks (project_id, index) because 2 sets of duplicate values exist — remove the duplicates manually, then restart Vikunja"
                
                what I’ve to do?
                

                Then ChatGPT answered with MySql different queries, then I told:

                I’m on postgres
                

                Then gave me this answer:

                For PostgreSQL, follow the same principle: keep one task in each duplicate set and assign new task indexes to the others.

                1. Back up Vikunja

                Create a manual Cloudron backup before modifying the database. Ideally stop Vikunja or ensure nobody is using it during the repair.

                2. Connect to PostgreSQL

                Open the Vikunja app’s Terminal and run:

                psql "$CLOUDRON_POSTGRESQL_URL"
                

                If that variable is unavailable:

                PGPASSWORD="$CLOUDRON_POSTGRESQL_PASSWORD" psql \
                  -h "$CLOUDRON_POSTGRESQL_HOST" \
                  -p "$CLOUDRON_POSTGRESQL_PORT" \
                  -U "$CLOUDRON_POSTGRESQL_USERNAME" \
                  -d "$CLOUDRON_POSTGRESQL_DATABASE"
                

                3. Inspect the duplicates

                SELECT
                    project_id,
                    "index",
                    COUNT(*) AS count,
                    ARRAY_AGG(id ORDER BY id) AS task_ids
                FROM tasks
                GROUP BY project_id, "index"
                HAVING COUNT(*) > 1
                ORDER BY project_id, "index";
                

                To also see task titles:

                SELECT
                    t.id,
                    t.project_id,
                    t."index",
                    t.title
                FROM tasks AS t
                JOIN (
                    SELECT project_id, "index"
                    FROM tasks
                    GROUP BY project_id, "index"
                    HAVING COUNT(*) > 1
                ) AS d
                  ON d.project_id = t.project_id
                 AND d."index" = t."index"
                ORDER BY t.project_id, t."index", t.id;
                

                4. Automatically reassign the extra indexes

                The following keeps the lowest task ID in each duplicate set unchanged and assigns unused indexes to the others:

                BEGIN;
                
                LOCK TABLE tasks IN ACCESS EXCLUSIVE MODE;
                
                WITH ranked AS (
                    SELECT
                        id,
                        project_id,
                        "index",
                        ROW_NUMBER() OVER (
                            PARTITION BY project_id, "index"
                            ORDER BY id
                        ) AS duplicate_number
                    FROM tasks
                ),
                to_fix AS (
                    SELECT
                        id,
                        project_id,
                        ROW_NUMBER() OVER (
                            PARTITION BY project_id
                            ORDER BY "index", id
                        ) AS new_offset
                    FROM ranked
                    WHERE duplicate_number > 1
                ),
                project_max AS (
                    SELECT
                        project_id,
                        COALESCE(MAX("index"), 0) AS max_index
                    FROM tasks
                    GROUP BY project_id
                )
                UPDATE tasks AS t
                SET "index" = pm.max_index + f.new_offset
                FROM to_fix AS f
                JOIN project_max AS pm
                  ON pm.project_id = f.project_id
                WHERE t.id = f.id
                RETURNING t.id, t.project_id, t."index", t.title;
                
                COMMIT;
                

                This does not delete tasks. It only changes the duplicate per-project task numbers.

                5. Confirm the problem is fixed

                SELECT project_id, "index", COUNT(*)
                FROM tasks
                GROUP BY project_id, "index"
                HAVING COUNT(*) > 1;
                

                It should return:

                (0 rows)
                

                Exit PostgreSQL:

                \q
                

                Then restart Vikunja and retry the Cloudron update to 2.5.0.


                ChatGPT forgot to remember me to enble recovery mode because app was unreachable at moment, but I solved.

                Thanks @humpty for your patience taking look into the problem.

                1 Reply Last reply
                3
                • humptyH Offline
                  humptyH Offline
                  humpty
                  wrote last edited by
                  #8

                  My experience with ChatGPT has been.. spotty at best. I'm glad you figured it out! 👌

                  1 Reply Last reply
                  2

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  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