Components v1 is deprecated

Hi.

I’m running Penpot 2.6.1 and trying to update to 2.7.1. Everything seems to be starting fine, but as soon as I try to open any project, I have this

And in the backend’s log

[2025-06-04 13:56:01.452] E app.http.errors - hint="restriction error" 
SUMMARY: 
 →  clojure.lang.ExceptionInfo: components v1 is deprecated (features.cljc:219) 
DETAIL: 
 →  clojure.lang.ExceptionInfo: components v1 is deprecated (features.cljc:219) 
    at: app.common.features$check_file_features_BANG_.invokeStatic(features.cljc:219) 
        app.common.features$check_file_features_BANG_.invoke(features.cljc:194) 
        app.http.middleware$wrap_parse_request$fn__60282.invoke(middleware.clj:93) 
        app.rpc.commands.files$sm$get_file.invoke(files.clj:308) 
        clojure.lang.AFn.applyToHelper(AFn.java:156) 
        clojure.lang.AFn.applyTo(AFn.java:144) 
        clojure.core$apply.invokeStatic(core.clj:669) 
        clojure.core$apply.invoke(core.clj:662) 
        app.db$tx_run_BANG_$fn__19054.invoke(db.clj:550) 
        next.jdbc.transaction$transact_STAR_.invokeStatic(transaction.clj:72) 
        next.jdbc.transaction$transact_STAR_.invoke(transaction.clj:51) 
        next.jdbc.transaction$eval18718$fn__18719.invoke(transaction.clj:152) 
        next.jdbc.protocols$eval17010$fn__17011$G__17001__17020.invoke(protocols.clj:58)
        next.jdbc$transact.invokeStatic(jdbc.clj:424) 
        app.http.middleware$wrap_errors$fn__60359.invoke(middleware.clj:200) 
        app.db$transact_BANG_.invokeStatic(db.clj:534) 
        app.db$transact_BANG_.invoke(db.clj:529) 
        app.db$tx_run_BANG_.invokeStatic(db.clj:545) 
        app.db$tx_run_BANG_.doInvoke(db.clj:536) 
        clojure.lang.RestFn.invoke(RestFn.java:445) 
        app.rpc$wrap_db_transaction$fn__35622.invoke(rpc.clj:156) 
        app.rpc.cond$wrap$fn__35242.invoke(cond.clj:66) 
        app.rpc$wrap_metrics$fn__35615.invoke(rpc.clj:135) 
        app.rpc$wrap_params_validation$fn__35635.invoke(rpc.clj:193) 
        app.rpc$wrap_authentication$fn__35618.invoke(rpc.clj:150) 
        clojure.core$partial$fn__5927.invoke(core.clj:2641) 
        app.rpc$rpc_handler.invokeStatic(rpc.clj:125) 
        app.rpc$rpc_handler.invoke(rpc.clj:90) 
        clojure.core$partial$fn__5927.invoke(core.clj:2641) 
        app.http.session$wrap_authz$fn__23462.invoke(session.clj:237) 

So it looks like something was not done when running the v2 migration. I don’t remember at which version I ran it, but I kept the logs and it seems everything was fine

$ ./run.sh app.migrations.v2
+ exec /opt/jdk/bin/java -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlog4j2.configurationFile=log4j2.xml -XX:-OmitStackTraceInFastThrow -Dpolyglot.engine.WarnInterpreterOnly=false --enable-preview -jar penpot.jar -m app.migrations.v2
  I app.metrics - action="initialize metrics"
  I app.db - hint="initialize connection pool", name="main", uri="postgresql://127.0.0.1:6432/penpot", read-only=false, with-credentials=true, min-size=0, max-size=60
  I app.migrations - hint="running migrations", module=:app.migrations/migrations
  I app.svgo - hint="initializing svg optimizer pool"
  I app.svgo - hint="stopping svg optimizer pool"

Any idea what can I do to fix this ?

1 Like

Hello @dani, i’m checking this issue with the team

2 Likes

Hej :vulcan_salute:, same here. The upgrade from version 2.6.1 to 2.7 broke all projects with components. When I create a new team, I can import them, when no components are used. At the original team I get the same alert like @dani. When I import the projects to a new created team, I get the following alert: “Es scheint eine Nichtübereinstimmung zwischen den aktivierten Funktionen und den Funktionen der Datei zu geben. Die Migrationen für ‘components/v2’ müssen durchgeführt werden, bevor die Datei geöffnet werden kann.”.

Thanks for your work :heart: penpot is a great tool.

Your projects still use components v1, which was removed in 2.7.1. The migration script didn’t run properly before, even if logs seemed fine.

Fix:

  1. Backup everything.

  2. Downgrade to Penpot 2.2.0 (last version where the migration works).

  3. Run: ./run.sh app.migrations.v2 and check that it actually migrates files.

  4. Once done, upgrade again to 2.7.1.

Let me know if you have any questions

with 2.2.0, migration fails

$ ./run.sh app.migrations.v2
+ exec /opt/jdk/bin/java -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlog4j2.configurationFile=log4j2.xml -XX:-OmitStackTraceInFastThrow -Dpolyglot.engine.WarnInterpreterOnly=false --enable-preview -jar penpot.jar -m app.migrations.v2
SUMMARY:
 →  clojure.lang.ExceptionInfo: Missing definitions for refs: :app.storage.s3/backend, :app.storage.fs/backend, :app.storage.s3/backend, :app.storage.fs/backend (core.cljc:212)
DETAIL:
 →  clojure.lang.ExceptionInfo: Missing definitions for refs: :app.storage.s3/backend, :app.storage.fs/backend, :app.storage.s3/backend, :app.storage.fs/backend (core.cljc:212)
    at: integrant.core$missing_refs_exception.invokeStatic(core.cljc:212)
        integrant.core$missing_refs_exception.invoke(core.cljc:211)
        integrant.core$build.invokeStatic(core.cljc:336)
        integrant.core$build.invoke(core.cljc:316)
        integrant.core$init.invokeStatic(core.cljc:445)
        integrant.core$init.invoke(core.cljc:437)
        integrant.core$init.invokeStatic(core.cljc:442)
        integrant.core$init.invoke(core.cljc:437)
        app.main$start_custom$fn__47377.invoke(main.clj:569)
        clojure.lang.AFn.applyToHelper(AFn.java:154)
        clojure.lang.AFn.applyTo(AFn.java:144)
        clojure.lang.Var.alterRoot(Var.java:310)
        clojure.core$alter_var_root.invokeStatic(core.clj:5555)
        clojure.core$alter_var_root.doInvoke(core.clj:5550)
        clojure.lang.RestFn.invoke(RestFn.java:428)
        app.main$start_custom.invokeStatic(main.clj:565)
        app.main$start_custom.invoke(main.clj:562)
        clojure.lang.Var.invoke(Var.java:386)
        app.migrations.v2$_main.invokeStatic(v2.clj:96)
        app.migrations.v2$_main.doInvoke(v2.clj:87)
        clojure.lang.RestFn.invoke(RestFn.java:400)
        clojure.lang.AFn.applyToHelper(AFn.java:152)
        clojure.lang.RestFn.applyTo(RestFn.java:135)
        clojure.lang.Var.applyTo(Var.java:707)
        clojure.core$apply.invokeStatic(core.clj:667)
        clojure.main$main_opt.invokeStatic(main.clj:515)
        clojure.main$main_opt.invoke(main.clj:511)
        clojure.main$main.invokeStatic(main.clj:665)
        clojure.main$main.doInvoke(main.clj:617)
        clojure.lang.RestFn.applyTo(RestFn.java:140)
        clojure.lang.Var.applyTo(Var.java:707)
        clojure.main.main(main.java:40)
    dt: {:reason :integrant.core/missing-refs,
         :config
         {:app.storage/storage
          {:app.db/pool #integrant.core.Ref{:key :app.db/pool},
           :app.storage/backends {:s3 #, :fs #, :assets-s3 #, :assets-fs #}},
          :app.db/pool
          {:app.db/max-lifetime 1800000,
           :app.db/validation-timeout 10000,
           :app.db/username "penpot",
           :app.db/uri "postgresql://127.0.0.1:6432/penpot",
           :app.db/name :main,
           :app.db/idle-timeout 120000,
           :app.db/password "b6b2ca31-3cde-d4d5-bb2b-6be30ec431f2",
           :app.db/min-size 0,
           ...},
          :app.setup/props
          {:app.db/pool #integrant.core.Ref{:key :app.db/pool},
           :app.setup/key "+wBekehEqLWRMODD+lu59EQ8It3VGWT/h.j_GrKMXZ5AUpoU/A",
           :app.main/migrations #integrant.core.Ref{:key :app.migrations/migrations}},
          :app.svgo/optimizer {},
          :app.metrics/metrics
          {:default
           {:session-update-total #,
            :audit-http-handler-concurrency #,
            :rpc-climit-queue #,
            :update-file-changes #,
            :rpc-query-timing #,
            :websocket-session-timing #,
            :rpc-climit-timing #,
            :executors-completed-tasks #,
            ...}},
          :app.migrations/migrations #:app.db{:pool #integrant.core.Ref{:key :app.db/pool}},
          :app.http.client/client {}},
         :missing-refs (:app.storage.s3/backend :app.storage.fs/backend :app.storage.s3/backend :app.storage.fs/backend)}

Downgrading to 2.0.0, the migration seems to be OK

penpot@300028d6513c:~/backend$ ./run.sh app.migrations.v2
+ exec /opt/jdk/bin/java -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlog4j2.configurationFile=log4j2.xml -XX:-OmitStackTraceInFastThrow -Dpolyglot.engine.WarnInterpreterOnly=false --enable-preview -jar penpot.jar -m app.migrations.v2
[2025-06-05 10:09:38.606] I app.metrics - action="initialize metrics"
[2025-06-05 10:09:38.619] I app.db - hint="initialize connection pool", name="main", uri="postgresql://127.0.0.1:6432/penpot", read-only=false, with-credentials=true, min-size=0, max-size=60
[2025-06-05 10:09:38.647] I app.migrations - hint="running migrations", module=:app.migrations/migrations
[2025-06-05 10:09:39.020] I app.svgo - hint="initializing svg optimizer pool"
[2025-06-05 10:09:39.178] I app.svgo - hint="stopping svg optimizer pool"
penpot@300028d6513c:~/backend$ 

But if I then go back to 2.7.1, I still have the error message from my first post, and can’t open any project

Same here. Downgrading and run the migrate.v2 has no effect. It seems, that the component-handling has an issue. The migration.v2 script was for the upgrade from penpot version 1.x to version 2 as far as I know. The release-infos for penpot version 2.7 announces an update of the assets management, is there the components effected also? The version I has running before upgrading to version 2.7 was 2.5. An update to version 2.6.2 was no problem. The issues showing by upgrading from 2.6.2 to 2.7.0/2.7.1, by no more editing any project of an existing team. When I create a new team and migrate some projects, the projects that are using no components are running. But every project, that uses components are broken and penpot will not working.

I hope the description of the issue helps to find a solution.

Thanks for the feedback, I reported this back to the team

1 Like

Also run into the same problem, as I’ve described here: bug: problem update 2.6.2 to 2.7.1 · Issue #6650 · penpot/penpot · GitHub
Tried running the migration after downgrading to 2.2.0, then to 2.0.0 with the same results as @dani : when going back to 2.7.1, I’m still not able to open files in my projects :confused:
Anything else to try?

hi @carolina.portugal are there some feedbacks from the team? greetings :slight_smile:

We are looking into this issue internally and will share updates as soon as possible. Thank you for checking in.

2 Likes

I ran into the same problem recently, and I have a few findings.

In my case, I found out that Penpot version 2.0.0 had a bug in the components v2 migration code that caused the migration to not run properly. This was fixed with version 2.0.1 in this commit, but it seems like the bugged components v2 migration in 2.0.0 will mark the installation as migrated, so running the migration again in 2.0.1 will not work.

I’m not familiar with Penpot’s codebase to know how to properly reset the migrated flag, so I ended up forcing the migration to run again by removing the migrated checks entirely. After rerunning the migration again with the migrated checks disabled, I was able to open my old projects in 2.7 once more.

What do you mean by “removing the migrated checks entirely” ?

I finally took some time to look a bit deeper and was able to run the migration. The problem is in the server_prop table. If the v2 migration runs, but fail for any reason, it’ll still add a line v2-migrated true in this table :
image

So running the migration again is now a no-op. To fix it, I removed the v2-migrated line from the server_prop table, downgraded to v2.0.1, let the migration run (which worked this time), and upgrade to 2.7.2, which is now able to open my projects

1 Like

How can I remove the “v2-migrate” line? Is is neccessary to remove the line before downgrading to v2.0.1, or not?

Hm, I have tried some migrations, down- and upgrades and nothing will work. I remove the “v2-migrated” entry from the server_prop table, downgraded, run migration:

penpot@b674d3ff6686:~/backend$ ./run.sh app.migrations.v2
+ exec /opt/jdk/bin/java -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlog4j2.configurationFile=log4j2.xml -XX:-OmitStackTraceInFastThrow -Dpolyglot.engine.WarnInterpreterOnly=false --enable-preview -jar penpot.jar -m app.migrations.v2
[2025-08-06 07:20:57.354] I app.metrics - action="initialize metrics"
[2025-08-06 07:20:57.361] I app.db - hint="initialize connection pool", name="main", uri="postgresql://penpot-postgres/penpot", read-only=false, with-credentials=true, min-size=0, max-size=60
[2025-08-06 07:20:57.374] I app.migrations - hint="running migrations", module=:app.migrations/migrations
[2025-08-06 07:20:57.554] I app.svgo - hint="initializing svg optimizer pool"
[2025-08-06 07:20:57.660] I app.svgo - hint="stopping svg optimizer pool"

upgrade to v2.7.1 … no effect, I can not open previous projects. So I checked the postgres-table again, found the “v2-migrated” entry again, removed it again, downgraded to version 2.0.1 again, run migration again:

penpot@e482b7e2cb9d:~/backend$ ./run.sh app.migrations.v2
+ exec /opt/jdk/bin/java -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlog4j2.configurationFile=log4j2.xml -XX:-OmitStackTraceInFastThrow -Dpolyglot.engine.WarnInterpreterOnly=false --enable-preview -jar penpot.jar -m app.migrations.v2
[2025-08-06 07:28:15.319] I app.metrics - action="initialize metrics"
[2025-08-06 07:28:15.326] I app.db - hint="initialize connection pool", name="main", uri="postgresql://penpot-postgres/penpot", read-only=false, with-credentials=true, min-size=0, max-size=60
[2025-08-06 07:28:15.341] I app.migrations - hint="running migrations", module=:app.migrations/migrations
[2025-08-06 07:28:15.522] I app.svgo - hint="initializing svg optimizer pool"
[2025-08-06 07:28:15.617] I app.svgo - hint="stopping svg optimizer pool"

upgrade to penpot v2.7.1 … again no effect. I can not open any project older than penpot 2.7. … so I am stuck on version 2.6.2. or I cut all previous projects. Not a valid option at all I think. Does anybody have a solution?

Are there any ideas to run the migration from v2.6.2 to 2.7 or 2.8? I can’t export any organisation projects… this will cost much time and works quite not fluently at all. Also I can not leave some projects in an old environment, because there are still under development. It will be quite nice, if there will be a way to find a way for upgrading from version 2.6.2. When I can do something for identify the problem, tell me! Thanks for this project at all.

okay… I found a solution!

BACKUP EVERYTHING BEFORE UPGRADING AND UPDATE POSTGRES TABLES!!

I running asset-fs no s3 data storage!

  1. downgrade backend-container to version 2.1
  2. run bash on postgres-container:
    docker exec -ti penpot-penpot-postgres-1 bash
    – “penpot-penpot-postgres-1” has to fit your postgres container-naming
  3. remove “v2-migrated” flag from postgres-container (if set):
    psql -U penpot -d penpot -c “DELETE FROM server_prop WHERE id=‘v2-migrated’;”
  4. remove file_migration entries:
    psql -U penpot -d penpot <<‘SQL’
    BEGIN;
    DELETE FROM file_migration fm
    USING file f
    WHERE fm.file_id = f.id
    AND (coalesce(f.data_backend,‘’) = ‘’
    OR coalesce(array_to_string(f.features, ‘,’), ‘’) NOT ILIKE ‘%components/v2%’);
    COMMIT;
    SQL
  5. set “data_backend” to “assets-fs”:
    psql -U penpot -d penpot -c “UPDATE file SET data_backend=‘assets-fs’ WHERE coalesce(data_backend,‘’)=‘’;”
  6. exit postgres container, login to backend-container (v2.1):
    docker exec -ti penpot-penpot-backend-1 bash
    – “penpot-penpot-backend-1” has to fit your backend container-naming
  7. run migration
    PENPOT_LOG_LEVEL=debug ./run.sh app.migrations.v2
  8. update docker-compose file to version 2.7 or 2.8
  9. all should be running

I hope, it will helps somebody :slight_smile:

when running the migration-v2 script, there should an entry like something: I app.migrations.v2 - hint=“v2 migration finished”, files=XX, teams=1, errors=nil, elapsed=“13.649349489s”

please check if all quotation marks are set correctly, when you copy the lines above.