Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figwheel hangs when trying to run on a clean app #133

Open
tensor-programming opened this issue Mar 19, 2017 · 19 comments
Open

Figwheel hangs when trying to run on a clean app #133

tensor-programming opened this issue Mar 19, 2017 · 19 comments

Comments

@tensor-programming
Copy link

tensor-programming commented Mar 19, 2017

When I run lein figwheel, I get "Prompt will show when Figwheel connects to your application" and it sits and hangs for an infinite amount of time. When I run it with lein run, the server tells me that the clojurescript has not been compiled and that I need to run figwheel.

Even after running lein clean first, the figwheel wont connect to my application. Also when Figwheel is hanging, I can access the server but I still get the bit of clojure that is saying that I need to compile my clojurescript. If i just build my own project or use lein figwheel or a re-frame template, everything seems to work correctly without problems. It is only with the reagent template that I seem to be having this issue.

I am on windows 10 with java 1.8 and the latest version of lein.

Edit: I was able to access the figwheel repl and get past the "Prompt will show when Figwheel connects to your application" if I run both lein run and lein figwheel in two separate cmd prompts, however, my clojurescript still does not compile correctly.

@yogthos
Copy link
Member

yogthos commented Mar 20, 2017

Unfortunately, I don't have a Windows machine to test with. I tried locally on MacOS and was not able to replicate the issue. The only thing I can think of would be to check if you have any plugins in your .lein/profiles.clj that might be causing a problem.

@kasbah
Copy link

kasbah commented Jul 5, 2017

I am having the same issue on Ubuntu Linux, Java 1.8

@yogthos
Copy link
Member

yogthos commented Jul 5, 2017

Could it be something with firewall properties?

@kasbah
Copy link

kasbah commented Jul 5, 2017

I don't think so, but how would I check?

@yogthos
Copy link
Member

yogthos commented Jul 5, 2017

You'd have to check your iptables rules.

@kasbah
Copy link

kasbah commented Jul 5, 2017

Ah ok, that can't be it. I am on a laptop on my home network and haven't set up any rules. iptables -L shows it is accepting anything from anywhere! 😱 😆

@yogthos
Copy link
Member

yogthos commented Jul 5, 2017

Yeah that was kind of a long shot. Localhost is typically not blocked. It might be worth checking on Clojurians Slack or opening an issue for lein-figwheel, as it appears to be a Figwheel specific issue.

@kasbah
Copy link

kasbah commented Jul 5, 2017

Sorry, I didn't read the issue properly late last night. For me it is actually just lein figwheel devcards that hangs. lein figwheel works fine. Probably a different thing.

@yogthos
Copy link
Member

yogthos commented Jul 5, 2017

Hmm, can't reproduce that either. I start the app with

lein figwheel devcards

and then I'm able to navigate to http://localhost:3449/cards

@kasbah
Copy link

kasbah commented Jul 5, 2017

Ah, I didn't realize I needed to go to that path. Thanks for your help and really sorry for wasting your time! 😕

@yogthos
Copy link
Member

yogthos commented Jul 5, 2017

No worries, glad everything is working. 👍

@FFrancieli
Copy link

I had a similar issue and I realized that it occurs because it's necessary to create a html page that imports the compiled javascript as defined on project.cls configuration.

This is my configuration:

:builds [{
      :id "dev"
      :source-paths ["src"]
      :figwheel true
      :compiler {
        :main clojurescript-tdd-application.core
        :asset-path "cljs/out"
        :output-to "resources/public/cljs/main.js"
        :output-dir "resources/public/out"
        :source-map-timestamp true
      }}

This way you need to import the file main.js on your index.html as defined on :output-to. After that you just need to run lein figwheel or the command you use to run figwheel and then type localhost:3449 on your browser. This worked for me.

This page has a better description on how to solve it as well.

@yogthos
Copy link
Member

yogthos commented Nov 17, 2017

@FFrancieli do you think there's anything that could be changed in the template to make things smoother here?

@jmargolisvt
Copy link

Same issue on OSX. @FFrancieli can you offer a bit more about your workaround? Is there a fix in the works?

@loganpowell
Copy link

Having this issue myself on Windows 10

@dunhamsteve
Copy link

I had this issue on OSX and eventually figured out the problem (for me) was uMatrix. The url in the figwheel output was http://0.0.0.0:3449 and then uMatrix blocked an XHR request to "localhost".

@aardvark
Copy link
Contributor

aardvark commented Nov 3, 2018

Have same problem on Win10.
'lein figwheel' - stuck (but woke up after visiting localhost:3449)
'lein repl' -> (start-server) - works

On the other hand, 'lein figwheel' works when created from template 'reagent-frontend'.
Hope this can clear something, i am not sure for now how all this works.

@aardvark
Copy link
Contributor

Looks like my problem was related to devcards only. I was able to refute it with couple of small fixes.
I've raised pr for them.

@yogthos
Copy link
Member

yogthos commented Nov 15, 2018

Thanks, just pushed out a new version with the PR fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants