Repository: penpot/penpot

Issue #5523: bug: crash in 2.30 on start up
Created: 2025-01-08T11:42:39Z
Steps To Reproduce
I am trying to run the update the Cloudron package to use 2.3.0 . But I get a crash on starting up the backend.
Expected behavior
Should not crash
Actual behavior
# /usr/lib/jvm/openjdk/bin/java -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlog4j2.configurationFile=log4j2.xml -XX:-OmitStackTraceInFastThrow -jar penpot.jar -m app.main
[2025-01-08 11:38:35.107] I app.auth.oidc - hint="provider initialized", provider="oidc", method="discover", client-id="24666ea0-754c-4cd6-8981-e3fa408b702d", client-secret="b19fc***************************************************************************************************************************", scopes="profile,email,openid", auth-uri="https://my.smartserver.io/openid/auth", user-uri="https://my.smartserver.io/openid/me", token-uri="https://my.smartserver.io/openid/token", roles-attr=nil, roles=nil, keys="keystore-CHANGE-ME"
[2025-01-08 11:38:35.109] I app.metrics - action="initialize metrics"
[2025-01-08 11:38:35.132] I app.db - hint="initialize connection pool", name="main", uri="postgresql://postgresql/db24666ea0754c4cd68981e3fa408b702d", read-only=false, credentials=true, min-size=0, max-size=60
[2025-01-08 11:38:35.164] I app.migrations - hint="running migrations", module=:app.migrations/migrations
SUMMARY:
 →  clojure.lang.ExceptionInfo: Assertion failed on key :app.setup/props when building system (core.cljc:540)
 →  java.lang.AssertionError: Assert failed: expected valid key string (setup.clj:78)
DETAIL:
 →  clojure.lang.ExceptionInfo: Assertion failed on key :app.setup/props when building system (core.cljc:540)
    at: integrant.core$wrap_assert_exception.invokeStatic(core.cljc:540)
        integrant.core$wrap_assert_exception.invoke(core.cljc:539)
        integrant.core$wrapped_assert_key.invokeStatic(core.cljc:550)
        integrant.core$wrapped_assert_key.invoke(core.cljc:547)
        integrant.core$build_key.invokeStatic(core.cljc:425)
        integrant.core$build_key.invoke(core.cljc:423)
        clojure.core$partial$fn__5931.invoke(core.clj:2656)
        clojure.core.protocols$fn__8275.invokeStatic(protocols.clj:167)
        clojure.core.protocols/fn(protocols.clj:123)
        clojure.core.protocols$fn__8229$G__8224__8238.invoke(protocols.clj:19)
        clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
        clojure.core.protocols$fn__8262.invokeStatic(protocols.clj:74)
        clojure.core.protocols/fn(protocols.clj:74)
        clojure.core.protocols$fn__8203$G__8198__8216.invoke(protocols.clj:13)
        clojure.core$reduce.invokeStatic(core.clj:6965)
        clojure.core$reduce.invoke(core.clj:6947)
        integrant.core$build.invokeStatic(core.cljc:453)
        integrant.core$build.invoke(core.cljc:430)
        integrant.core$init.invokeStatic(core.cljc:675)
        integrant.core$init.invoke(core.cljc:667)
        integrant.core$init.invokeStatic(core.cljc:672)
        integrant.core$init.invoke(core.cljc:667)
        app.main$start$fn__48554.invoke(main.clj:551)
        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:5563)
        clojure.core$alter_var_root.doInvoke(core.clj:5558)
        clojure.lang.RestFn.invoke(RestFn.java:428)
        app.main$start.invokeStatic(main.clj:545)
        app.main$start.invoke(main.clj:541)
        app.main$_main.invokeStatic(main.clj:611)
        app.main$_main.doInvoke(main.clj:603)
        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/build-failed-spec,
         :system
         {:app.auth.oidc.providers/github nil,
          :app.db/pool #object[com.zaxxer.hikari.HikariDataSource 0x3250b36f "HikariDataSource (main)"],
          :app.auth.oidc.providers/gitlab nil,
          :app.http.client/client
          #object[jdk.internal.net.http.HttpClientFacade 0x61c2b5ea "jdk.internal.net.http.HttpClientImpl@54b58f96(1)"],
          :app.email/blacklist nil,
          :app.auth.oidc.providers/generic
          {:scopes #{"profile" "email" "openid"},
           :token-uri "https://my.smartserver.io/openid/token",
           :jwks
           {"keystore-CHANGE-ME"
            #object[org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey 0x2192d9a1 "RSA Public Key [a6:fd:d9:1f:63:64:3b:7b:b4:75:e6:36:2e:13:bf:01:e1:9c:e2:2e],[56:66:d1:a4]\n        modulus: c7043bd8ff73f4e62c86243e9ed0d868f9e77f01babbd24074b319e68d1d9a395ccabbf041176814828f9ceeb943c9a1e85fcb0d2c63c5ad98ce8ff076385b3d92e37d4257802ce6e78702957cd3e6dc33a3b973a007da265913b2865cd87156aa672b8b406ece64c52d9c7643bc18066d295c7990285d15f82d4ee8d59f77899f0616ccf88d6d1d84a900c81aad29b6d960cc0f1f96588ed3133cb642168155a10d5bd04a68a909925a1c0190b1935f16851d1f72420689689233915c5353d8da37c6b13997e74e546fb3f90f3ef9620aabbad779b45adcab23c0b4f4c50e4f17d489f1924530a4fde7154e68e740c687042894660a3c6b50f99b666ce7dc59\npublic exponent: 10001\n"]},
           :client-id "24666ea0-754c-4cd6-8981-e3fa408b702d",
           :name "oidc",
           :jwks-uri "https://my.smartserver.io/openid/jwks",
           :discover? true,
           :auth-uri "https://my.smartserver.io/openid/auth",
           ...},
          :app.email/whitelist nil,
          :app.migrations/migrations nil,
          ...},
         :key :app.setup/props,
         :value
         {:app.db/pool #object[com.zaxxer.hikari.HikariDataSource 0x3250b36f "HikariDataSource (main)"],
          :app.main/migrations nil}}

 →  java.lang.AssertionError: Assert failed: expected valid key string (setup.clj:78)
    at: app.setup$eval42310$fn__42311.invoke(setup.clj:78)
        clojure.lang.MultiFn.invoke(MultiFn.java:234)
        integrant.core$wrapped_assert_key.invokeStatic(core.cljc:548)
        integrant.core$wrapped_assert_key.invoke(core.cljc:547)
        integrant.core$build_key.invokeStatic(core.cljc:425)
        integrant.core$build_key.invoke(core.cljc:423)
        clojure.core$partial$fn__5931.invoke(core.clj:2656)
        clojure.core.protocols$fn__8275.invokeStatic(protocols.clj:167)
        clojure.core.protocols/fn(protocols.clj:123)
        clojure.core.protocols$fn__8229$G__8224__8238.invoke(protocols.clj:19)
        clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
        clojure.core.protocols$fn__8262.invokeStatic(protocols.clj:74)
        clojure.core.protocols/fn(protocols.clj:74)
        clojure.core.protocols$fn__8203$G__8198__8216.invoke(protocols.clj:13)
        clojure.core$reduce.invokeStatic(core.clj:6965)
        clojure.core$reduce.invoke(core.clj:6947)
        integrant.core$build.invokeStatic(core.cljc:453)
        integrant.core$build.invoke(core.cljc:430)
        integrant.core$init.invokeStatic(core.cljc:675)
        integrant.core$init.invoke(core.cljc:667)
        integrant.core$init.invokeStatic(core.cljc:672)
        integrant.core$init.invoke(core.cljc:667)
        app.main$start$fn__48554.invoke(main.clj:551)
        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:5563)
        clojure.core$alter_var_root.doInvoke(core.clj:5558)
        clojure.lang.RestFn.invoke(RestFn.java:428)
        app.main$start.invokeStatic(main.clj:545)
        app.main$start.invoke(main.clj:541)
        app.main$_main.invokeStatic(main.clj:611)
        app.main$_main.doInvoke(main.clj:603)
        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)


(the my.smartserver.io is a throwaway domain for testing purposes. It is an OIDC endpoint)
Screenshots or video
No response
Desktop (please complete the following information)
No response
Smartphone (please complete the following information)
No response
Environment (please complete the following information)
No response
Frontend Stack Trace
No response
Backend Stack Trace
No response
Additional context
No response

Duplicate issue #5588: bug: Self-Host Docker Bad Gateway, penpot-penpot-backend-1 throw exception
Created: 2025-01-15T01:32:12Z
Steps To Reproduce
Following official documentation, using docker Desktop 4.37.1 (wsl).
curl -o docker-compose.yaml https://raw.githubusercontent.com/penpot/penpot/main/docker/images/docker-compose.yaml
docker compose -p penpot -f docker-compose.yaml up -d
Open http://localhost:9001/ in Chrome Version 131.0.6778.265 (Official Build) (64-bit)
Expected behavior
It should just get into the login page right?
Actual behavior
penpot-problem.txt
All the other container is working alright but the penpot-penpot-backend-1 is throwing this problem. Did I do something wrong?
Screenshots or video

Desktop (please complete the following information)
Windows 11 Pro for Workstation
10.0.22631 Build 22631
Chrome Version 131.0.6778.265 (Official Build) (64-bit)
Smartphone (please complete the following information)
No response
Environment (please complete the following information)
Docker Desktop 4.37.1 (178610)
Frontend Stack Trace
No response
Backend Stack Trace
No response
Additional context
No response

Closing comment (2025-01-15T08:11:39Z): Sounds like it's related to #5523 resp. #5532 because of the following lines in your report:
2025-01-14 19:08:26  →  clojure.lang.ExceptionInfo: Assertion failed on key :app.setup/props when building system (core.cljc:540)
2025-01-14 19:08:26  →  java.lang.AssertionError: Assert failed: expected valid key string (setup.clj:78)
Should be fixed by setting PENPOT_SECRET_KEY in your docker-compose.yaml.
BTW: have a look at #5499 (comment) too.