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!Also not sure if the question makes sense sorry
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.
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.
Is there a way to find out about why I have to do this, though? I noticed it’s consistent: whenever I update the browser on this page, this works.
I usually experience this when there are bugs in my code, where it fails to compile. There are dev tools for browsers that can be useful above any issues that figwheel itself catches. Source mas can also be useful or showing which ClojureScript code may be the cause. I have some links for dev tools, most should be okay, although I have done this for a while https://practical.li/clojurescript/install/browser-devtools/