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

Unresponsive repl on firefox-naked #187

Closed
neshaug opened this issue Feb 24, 2013 · 10 comments
Closed

Unresponsive repl on firefox-naked #187

neshaug opened this issue Feb 24, 2013 · 10 comments

Comments

@neshaug
Copy link

neshaug commented Feb 24, 2013

With 0.3.0 (0862e71), "lein trampoline cljsbuild repl-launch firefox-naked" at example-projects/advanced results in a unresponsive (non-working) repl.

Leiningen 2.0.0 on Java 1.7.0_13 Java HotSpot(TM) 64-Bit Server VM

@emezeske
Copy link
Owner

Can you fill in some details on what happens before things are unresponsive? Does Firefox start? Is the REPL's prompt displayed? Is there any interesting output before it hangs?

@neshaug
Copy link
Author

neshaug commented Feb 25, 2013

Firefox starts, and the repl is displayed, no interesting output. Typing works, but evaling something like (+ 1 1) doesn't give any feedback. Only output from Firefox is a warning about undeclared character encoding.

I've tried to duplicate the naked goal for another project with the same results. A chrome-naked goal also has the same result.

@neshaug
Copy link
Author

neshaug commented Feb 25, 2013

If I refresh the browser after launch I get a error not displayed at first launch:

[13:57:46.790] Error: URI file:/robots.txt is invalid for field ppu

@butchler
Copy link

butchler commented Mar 7, 2013

I get the same issue, except that I'm using Chromium and repl-listen (although I'm sure the same thing would happen if I used repl-launch). I can fix it by adding a dependency in my project.clj to an old release of ClojureScript, specifically:

  :dependencies [[org.clojure/clojure "1.4.0"]
                 [org.clojure/clojurescript "0.0-1513"]]

I'm pretty sure that this has something to do with the google-closure-library-third-party dependency thing mentioned in CLJS-418, because 0.0-1513 is the first release before the update that caused that problem, and because the REPL hangs when I use the next release of ClojureScript, 0.0-1535, which comes after that update.

One thing I've noticed is that when the browser-connected REPL is working correctly and I press Ctrl-C to stop it, Chromium prints "Failed to load resource http://localhost:9000/" in the JavaScript console, I'm guessing indicating that the long-polling XmlHttpRequest failed because I killed the REPL server. But when the REPL is hanging/not working and I Ctrl-C out of it, Chromium doesn't print out anything in the console, maybe indicating that it never really connected to the REPL in the first place? I don't know; that's just a guess, but hopefully it helps.

It also only seems to be important to have the dependency on the old version of ClojureScript when I run repl-listen, so I can compile the code with the latest version of ClojureScript and then run repl-listen with 0.0-1513 and it will still work.

@cemerick
Copy link
Collaborator

Is this still a problem?

@cemerick
Copy link
Collaborator

Can't reproduce, and no response for 3 months, closing.

@bfabry
Copy link

bfabry commented Nov 28, 2013

I'm having this problem, clojurescript 0.0-2080, lein-cljsbuild 1.0.1-SNAPSHOT, Chrome 31.0.1650.57, OSX 10.8.5

Just tested, same with incognito window and Safari 6.1, so unfortunately not cemerick/austin#17

Nvm, seems the documentation here: https://github.com/emezeske/lein-cljsbuild/blob/master/doc/REPL.md is out of date. Renaming my repl.html to index.html and browsing to localhost:9000 worked.

@dmohs
Copy link

dmohs commented Jan 2, 2014

I think it's worth noting that this happens consistently (with the hang and I've also seen the robots.txt error) when I forget to call repl/connect from within the browser. It's worth verifying if you're running into this problem.

@Julian
Copy link

Julian commented Jan 20, 2016

For anyone else finding this, it was the first thing I found when googling this error message -- turns out to mean "run a webserver, not open foo.html" for me.

@xealits
Copy link

xealits commented Sep 18, 2016

I get the same error while following the clojurescript getting started guide with firefox 48.0, java-7-openjdk-amd64 on Ubuntu 14.04 LTS. (If some of the scripts in the guide implicitly call leiningen, my version is Leiningen 2.5.3 on Java 1.8.0_76 OpenJDK 64-Bit Server VM.)

On rlwrap java -cp cljs.jar:src clojure.main repl.clj
I get Waiting for browser to connect ... but there is no prompt,
though the parentheses auto-completion works.
And there is no output for a (+ 1 2) command,
also the auto-build file out/watch.log is not created.

In http://localhost:9000/ (the page of repl connection) I get these:

17:42:22.267 log:Transport created: NativeMessagingTransport
POST http://localhost:9000/    200 OK    52ms     repl?xp...s.txt"} (line 2272)
17:42:22.592 log:Can't send. Channel not connected.
17:42:22.598 log:Channel "hoDROU3WL1" connected
17:42:22.602 log:Channel "hoDROU3WL1" connected
GET https://apis.google.com/_/scs/apps-static/_/js/k=...RSTNEfOH1MlcNEtB3fzWuGFFYKeAB0g/cb=gapi.loaded_0     404 Not Found   66ms     fastbut...refresh (line 78)
GET https://apis.google.com/_/scs/apps-static/_/js/k=...TcCPiyITMO_1IXcnPwnSNLz7GwI4vZA/cb=gapi.loaded_1     200 OK          42ms     fastbut...refresh (line 78)
uncaught exception: Error requesting /_/scs/apps-static/_/js/k=oz.gapi.ru._EQg8N9EI7Q.O/m=googleapis_client,iframes_styles_bubble_internal,gapi_iframes_style_common,gapi_iframes_iframer/rt=j/sv=1/d=1/ed=1/am=IQ/rs=AItRSTNEfOH1MlcNEtB3fzWuGFFYKeAB0g/cb=gapi.loaded_0: Not Found
Current location: https://apis.google.com/u/0/_/+1/fastbutton?usegapi=1&bsv=o&size=standard&count=true&hl=en&url=http%3A%2F%2Flocalhost%3A9000%2F&origin=http%3A%2F%2Flocalhost%3A9000&parent=http%3A%2F%2Flocalhost%3A9000&gsrc=3p&ic=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.ru._EQg8N9EI7Q.O%2Fm%3D__features__%2Fam%3DIQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAItRSTNEfOH1MlcNEtB3fzWuGFFYKeAB0g#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh

and in index.html (the served page):

17:42:27.952 log:Transport created: NativeMessagingTransport
Error: URI file:/robots.txt is invalid for field ppu                       repl?xp...s.txt"} (line 2441, col 677)
...in a&&!/^https?:\/\//.test(a[d]))throw Error("URI "+a[d]+" is invalid for field ...

When I open http://localhost:9000 in Chromium the repl springs to action,
says out/watch.log is ready and shows prompt.
The repl log:

$ rlwrap java -cp cljs.jar:src clojure.main repl.clj
Compiling client js ...
Waiting for browser to connect ...



(+ 1 2)
Watch compilation log available at: out/watch.log

To quit, type: :cljs/quit
cljs.user=> cljs.user=> 
cljs.user=> 
cljs.user=> (+ 5 3)
8
cljs.user=> 
cljs.user=> 

-- and console of localhost:9000 shows only 404 about favicon, reloading index.html still shows the error with robots.txt is invalid for field ppu. The watch.log is there, and auto-rebuild works.

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

No branches or pull requests

8 participants