Fork me on GitHub
#figwheel-main
<
2024-02-01
>
kishima21:02:24

Hello! How can I debug/check the server where figwheel-main loads js files? Not sure if that’s exactly the place where I should be looking, but that’s what seem to be happening. I’m running a few tests in the following alias:

:test-headless {:main-opts ["--main"         "figwheel.main"
                              "--compile-opts" "test-headless.cljs.edn"
                              "--main"         "test-runner-headless"]
                  :extra-deps {cljsjs/react {:mvn/version "17.0.2-0"}
                               cljsjs/react-dom {:mvn/version "17.0.2-0"}}}
But I’m getting the following error:
Launching Javascript environment with script:  js-test-env/start
Error: Could not load script: ""
    at onErrorWrapped (/Users/gustavokishima/backend/node_modules/jsdom/lib/jsdom/browser/resources/per-document-resource-loader.js:38:19)
    at Object.check (/Users/gustavokishima/backend/node_modules/jsdom/lib/jsdom/browser/resources/resource-queue.js:72:23)
    at /Users/gustavokishima/backend/node_modules/jsdom/lib/jsdom/browser/resources/resource-queue.js:83:27
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:217:20) {
  errno: -54,
  code: 'ECONNRESET',
  syscall: 'read'
}
It seems that the server is having trouble receiving js files. Sorry if this is not enough info and thanks in advance!

kishima21:02:03

Also not sure if the question makes sense sorry

kishima22:02:22

WELL for some random reason it worked now. The only different thing I did is that I reloaded the static server page on my browser and then it started working.

practicalli-johnny10:02:22

Reloading the browser resets the state, so if there were stale symbols from the ClojureScript code or other changes, then they will have been cleared and reloaded from scratch.