Hey I can't get the new dev tools to work. I've followed the steps for adding the new chrome extension and have added the preload but I see this warning originating at the point where add-fulcro-inspect! Is called: cannot connect to devtool. No factory set. Did you make sure a preload was loaded?
I certainly do have the preload specified in my shadow config and I have the correct dependencies specified in my deps file so I'm not sure what else to do. Chrome version 131.0.6738.0 which is an unstable build.
I have chrome installed through a package manager so the stable build is 129.0.6668.89 which is old but it's an official chrome build. Same warnings appear in the console. I think you're right that the preload isn't being loaded for some reason because I can at least see the "No app connected" placeholder in the frame instead of an empty white box. And if I trigger any transactions I get errors about there not being an implementation of -transmit! for null.
Do you have time to pair on it in a little while?
It should really work
I should be around in roughly an hour
I assume from context that this is Linux?
> Do you have time to pair on it in a little while? I should. This is only a side project I'm noodling around with so I really don't want to take up too much of your time over the holidays. > I assume from context that this is Linux? Yeah, it's Guix (like NixOS, only more niche). I fear that there may be some paper cuts arising from this. I can test on my Ubuntu laptop when I get home on Thursday.
It's super odd, but i can't see how the os should matter. The preload seems like the primary issue, but i don't see your error
I assume there's no restriction on react version? I'm on react 18
I am available when you are, if you still want to pair
yeah, let’s glance real quick
give me two minutes
k
ok ready
Show me your deps and shadow-cljs files
I’m having a little trouble keeping Chrome extension connected to the app, so there are still bugs unfortunately 😕
I suspect that chrome is killing and restarting my service worker perhaps…not sure yet
you preloads should be :
:devtools {:preloads [com.fulcrologic.devtools.chrome-preload]
and your dev-time deps (alias?) should include:
com.fulcrologic/fulcro-inspect {:mvn/version "1.0.2"}
but the preload is what sets the factory, so that warning you’re getting means the preload didn’t load. Also, the tooling is disabled on release builds, in case you’re trying to inspect a release build.
I’m using 4.0.3 right now on one of my apps, When it stays connected it all works, but I think the service worker can get killed by chrome, and when that happens I must be missing some logic to re-establish comms 😕
The connection logic may be more stable for the electron version
(via electron-preload)
nothing remarkable in config:
{:deps {:aliases [:dev]}
:dev-http {8080 "resources/public"}
:builds {:frontend
{:target :browser
:output-dir "resources/public/js/frontend"
:asset-path "/js/frontend"
:modules
{:main {:init-fn me.bartleby.books.client/init
:dev {:compiler-options
{:external-config {:fulcro {:html-source-annotations? true}}
:warnings {:fn-deprecated false}}}
:devtools {:preloads [com.fulcrologic.devtools.chrome-preload]}}}}
:cards {:target nubank.workspaces.shadow-cljs.target
:ns-regexp "-cards$"
:output-dir "dev-resources/public/js/workspaces"
:asset-path "/js/workspaces"
:devtools {:http-root "dev-resources/public"
:http-port 3689
:after-load nubank.workspaces.core/after-load
:http-resource-root "."
:preloads []}
:modules {:main {:entries [me.bartleby.books.workspaces.main]}}}}}
deps:
{:paths ["src/main" "src/dev" "resources"]
:deps {com.fulcrologic/fulcro {:mvn/version "3.8.0-alpha2"}
com.fulcrologic/statecharts {:mvn/version "1.2.7"}
com.github.liquidz/merr {:mvn/version "1.0.203"}
com.taoensso/timbre {:mvn/version "6.6.0-RC1"}
com.wsscode/pathom3 {:mvn/version "2024.11.23-alpha"}
datalevin/datalevin {:mvn/version "0.9.14"}
ring/ring-core {:mvn/version "1.13.0"}
ring/ring-jetty-adapter {:mvn/version "1.12.2"}}
:aliases {:dev {:extra-paths ["src/dev"]
:extra-deps {binaryage/devtools {:mvn/version "1.0.7"}
com.fulcrologic/fulcro-inspect {:mvn/version "1.0.1"}
thheller/shadow-cljs {:mvn/version "2.28.18"}
com.github.awkay/workspaces {:mvn/version "1.0.3"}
cider/cider-nrepl {:mvn/version "0.50.3"}}}
:db {:jvm-opts ["--add-opens=java.base/java.nio=ALL-UNNAMED"
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"]}}}
haven't tried the 1.0.2 release of fulcro-inspect yet. I'll need to verify when I have more time but I think when I looked in the extensions menu itself I was seeing an error regarding localStorage accesshm. you might try clearing your local storage in the browser. Settings are loaded/saved there, and a corrupt value could cause problems
sadly clearing localstorage had no visible effect. I am rather green on service workers but I did dig around a bit and found this page which indicates that the service worker is being stopped like you were saying. I also updated to 1.0.2 on the fulcro-inspect dep
and this is the error I mentioned:
hm it is working for me
official chrome build?
from google