Cannot run the development environnement locally

Hi,

I’m having hard times launching Penpot locally.

  1. I have randomly the JS heap issue FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory inside the frontend watcher. I tried to use NODE_OPTIONS=--max_old_space_size=4096 inside docker/devenv/docker-compose.yaml but it’s not working. I may restart with yarn run watch but I will end into following issues
  2. It has worked properly one time, but I noticed I was missing the “access-tokens” feature to do my tests. So I set “PENPOT_FLAGS=enable-access-tokens […]” into the “docker/images/docker-compose.yaml” both for frontend and backend errors but with no success. After that I thought it was probably not used so I put it inside the other “docker/devenv/docker-compose.yaml” for the devenv container but without success too.
  3. After the only time it has worked, inside the frontend-shadow terminal I now get this Java array error (see below for the log trace, but it seems similar to bug: build images manage.sh build-bundle error · Issue #3058 · penpot/penpot · GitHub).
  4. Note that I tried to drop-devenv + run-devenv multiple times but it does not change anything… I don’t get why it has worked 1 time (and it was not the first time) and now nothing at all.

If you have any idea I would appreciate, I can’t get why all of those are happening. I did restart my computer with no app launched… (Macbook Pro 2020 16 Go RAM, and 8 Go dedicated to Docker).

Thank you,


About the Java error, here is the stack:

[:main] Configuring build.
[:main] Compiling ...
[:main] Build failure:
RuntimeException: com.fasterxml.jackson.core.io.JsonEOFException: Unexpected end-of-input: expected close marker for Array (start marker at [Source: (FileInputStream); line: 1, column: 78009])
 at [Source: (FileInputStream); line: 1, column: 78020]
        com.cognitect.transit.impl.ReaderFactory$ReaderImpl.read (ReaderFactory.java:114)
        cognitect.transit/read (transit.clj:323)
        cognitect.transit/read (transit.clj:319)
        shadow.build.cache/read-cache (cache.clj:49)
        shadow.build.cache/read-cache (cache.clj:33)
        shadow.build.closure/convert-goog (closure.clj:2457)
        shadow.build.closure/convert-goog (closure.clj:2447)
        shadow.build.compiler/maybe-closure-convert (compiler.clj:1385)
        shadow.build.compiler/maybe-closure-convert (compiler.clj:1378)
        shadow.build.compiler/compile-all (compiler.clj:1620)
        shadow.build.compiler/compile-all (compiler.clj:1497)
        shadow.build.api/compile-sources (api.clj:261)
        shadow.build.api/compile-sources (api.clj:253)
        shadow.build/compile (build.clj:512)
        shadow.build/compile (build.clj:493)
        shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:368)
        shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:349)
        shadow.cljs.devtools.server.worker.impl/eval17758/fn--17760 (impl.clj:448)
        clojure.lang.MultiFn.invoke (MultiFn.java:234)
        shadow.cljs.devtools.server.util/server-thread/fn--17511/fn--17512/fn--17520 (util.clj:283)
        shadow.cljs.devtools.server.util/server-thread/fn--17511/fn--17512 (util.clj:282)
        shadow.cljs.devtools.server.util/server-thread/fn--17511 (util.clj:255)
        java.lang.Thread.run (Thread.java:1583)
Caused by:
JsonEOFException: Unexpected end-of-input: expected close marker for Array (start marker at [Source: (FileInputStream); line: 1, column: 78009])
 at [Source: (FileInputStream); line: 1, column: 78020]
        com.fasterxml.jackson.core.base.ParserMinimalBase._reportInvalidEOF (ParserMinimalBase.java:697)
        com.fasterxml.jackson.core.base.ParserBase._handleEOF (ParserBase.java:512)
        com.fasterxml.jackson.core.base.ParserBase._eofAsNextChar (ParserBase.java:529)
        com.fasterxml.jackson.core.json.UTF8StreamJsonParser._skipWSOrEnd (UTF8StreamJsonParser.java:3103)
        com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken (UTF8StreamJsonParser.java:757)
        com.cognitect.transit.impl.JsonParser.parseArray (JsonParser.java:158)
        com.cognitect.transit.impl.JsonParser.parseVal (JsonParser.java:56)
        com.cognitect.transit.impl.JsonParser.parseMap (JsonParser.java:112)
        com.cognitect.transit.impl.JsonParser.parseArray (JsonParser.java:128)
        com.cognitect.transit.impl.JsonParser.parseVal (JsonParser.java:56)
        com.cognitect.transit.impl.JsonParser.parseArray (JsonParser.java:159)
        com.cognitect.transit.impl.JsonParser.parseVal (JsonParser.java:56)
        com.cognitect.transit.impl.JsonParser.parseArray (JsonParser.java:159)
        com.cognitect.transit.impl.JsonParser.parseArray (JsonParser.java:140)
        com.cognitect.transit.impl.JsonParser.parseVal (JsonParser.java:56)
        com.cognitect.transit.impl.JsonParser.parse (JsonParser.java:46)
        com.cognitect.transit.impl.ReaderFactory$ReaderImpl.read (ReaderFactory.java:112)
        cognitect.transit/read (transit.clj:323)
        cognitect.transit/read (transit.clj:319)
        shadow.build.cache/read-cache (cache.clj:49)
        shadow.build.cache/read-cache (cache.clj:33)
        shadow.build.closure/convert-goog (closure.clj:2457)
        shadow.build.closure/convert-goog (closure.clj:2447)
        shadow.build.compiler/maybe-closure-convert (compiler.clj:1385)
        shadow.build.compiler/maybe-closure-convert (compiler.clj:1378)
        shadow.build.compiler/compile-all (compiler.clj:1620)
        shadow.build.compiler/compile-all (compiler.clj:1497)
        shadow.build.api/compile-sources (api.clj:261)
        shadow.build.api/compile-sources (api.clj:253)
        shadow.build/compile (build.clj:512)
        shadow.build/compile (build.clj:493)
        shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:368)
        shadow.cljs.devtools.server.worker.impl/build-compile (impl.clj:349)
        shadow.cljs.devtools.server.worker.impl/eval17758/fn--17760 (impl.clj:448)
        clojure.lang.MultiFn.invoke (MultiFn.java:234)
        shadow.cljs.devtools.server.util/server-thread/fn--17511/fn--17512/fn--17520 (util.clj:283)
        shadow.cljs.devtools.server.util/server-thread/fn--17511/fn--17512 (util.clj:282)
        shadow.cljs.devtools.server.util/server-thread/fn--17511 (util.clj:255)
        java.lang.Thread.run (Thread.java:1583)

With this Java error when reaching the frontend I have :

Even if the other 3 terminals are ok, despite killing the command and re-run clojure -M:dev:shadow-cljs watch main I end into the same issue.


Additionnally, the first time I remember the yarn run watch has failed with:

[19:18:17] compile: /home/penpot/penpot/frontend/src/app/main/ui/auth/recovery.scss
[19:18:17] compile: /home/penpot/penpot/frontend/src/app/main/ui/auth/recovery_request.scss
[19:18:17] compile: /home/penpot/penpot/frontend/src/app/main/ui/auth/register.scss
[19:18:17] compile: /home/penpot/penpot/frontend/src/app/main/ui/auth/verify_token.scss
node:internal/process/esm_loader:34
      internalBinding('errors').triggerUncaughtException(
                                ^

[Error: ENOENT: no such file or directory, open './resources/public/css/main.css'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: './resources/public/css/main.css'
}

Node.js v20.11.1

I tried to rerun yarn run watch with no success. I had to run yarn run compile so yarn run watch would work after. I succeeded to face this issue again after deleting all dockers and the Git repository (by cloning it again).

For now after the deletion+cloningAgain of the Git repository I’m able to launch things, will see tomorrow if by turning down/up it will work again.

I suggest you run Penpot via Docker.

Hi @Korbs , I wanted to try solving the issue bug: cropped API response JSON body for huge Penpot files (>150000 lines) · Issue #3670 · penpot/penpot · GitHub so I cannot directly use published Docker images.