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

Run launcher "phantom-naked" doens't work on in advanced example project #449

Closed
dotboris opened this issue Aug 27, 2016 · 1 comment
Closed

Comments

@dotboris
Copy link

The advanced project is configured to allow running a phantomjs powered repl with

lein trampoline cljsbuild repl-launch phantom-naked

This does not work. When I run it, it hangs on "Waiting for browser to connect ...".

Running the repl gives me this:

$ lein trampoline cljsbuild repl-launch phantom-naked
Running ClojureScript REPL and launching command: (phantomjs phantom/repl.js resources/private/html/naked.html)
Compiling ClojureScript...
WARNING: lein-cljsbuild crossovers are deprecated, and will be removed in future versions. See https://github.com/emezeske/lein-cljsbuild/blob/master/doc/CROSSOVERS.md for details.
Compiling client js ...
Waiting for browser to connect ...

The repl is setup to output the stdout and stderr of the commmand to .repl-phantom-naked-out and .repl-phantom-naked-err respectively. The content of those files is:

$ cat .repl-phantom-naked-out
Loading URL: resources/private/html/naked.html
Loaded successfully.
Error: URI file:/robots.txt is invalid for field ppu

  http://localhost:9000/repl?xpc=%7B%22cn%22%3A%22sBuTv8S9mu%22%2C%22tp%22%3Anull%2C%22osh%22%3Anull%2C%22ppu%22%3A%22file%3A%2Frobots.txt%22%2C%22lpu%22%3A%22http%3A%2F%2Flocalhost%3A9000%2Frobots.txt%22%7D:2016 in CrossPageChannel
  http://localhost:9000/repl?xpc=%7B%22cn%22%3A%22sBuTv8S9mu%22%2C%22tp%22%3Anull%2C%22osh%22%3Anull%2C%22ppu%22%3A%22file%3A%2Frobots.txt%22%2C%22lpu%22%3A%22http%3A%2F%2Flocalhost%3A9000%2Frobots.txt%22%7D:2093 in cljs$core$IFn$_invoke$arity$0
  http://localhost:9000/repl?xpc=%7B%22cn%22%3A%22sBuTv8S9mu%22%2C%22tp%22%3Anull%2C%22osh%22%3Anull%2C%22ppu%22%3A%22file%3A%2Frobots.txt%22%2C%22lpu%22%3A%22http%3A%2F%2Flocalhost%3A9000%2Frobots.txt%22%7D:2092 in xpc_connection
  http://localhost:9000/repl?xpc=%7B%22cn%22%3A%22sBuTv8S9mu%22%2C%22tp%22%3Anull%2C%22osh%22%3Anull%2C%22ppu%22%3A%22file%3A%2Frobots.txt%22%2C%22lpu%22%3A%22http%3A%2F%2Flocalhost%3A9000%2Frobots.txt%22%7D:2119 in start_evaluator
  http://localhost:9000/repl?xpc=%7B%22cn%22%3A%22sBuTv8S9mu%22%2C%22tp%22%3Anull%2C%22osh%22%3Anull%2C%22ppu%22%3A%22file%3A%2Frobots.txt%22%2C%22lpu%22%3A%22http%3A%2F%2Flocalhost%3A9000%2Frobots.txt%22%7D:2127
  http://localhost:9000/repl?xpc=%7B%22cn%22%3A%22sBuTv8S9mu%22%2C%22tp%22%3Anull%2C%22osh%22%3Anull%2C%22ppu%22%3A%22file%3A%2Frobots.txt%22%2C%22lpu%22%3A%22http%3A%2F%2Flocalhost%3A9000%2Frobots.txt%22%7D:1732 in fireListener
  http://localhost:9000/repl?xpc=%7B%22cn%22%3A%22sBuTv8S9mu%22%2C%22tp%22%3Anull%2C%22osh%22%3Anull%2C%22ppu%22%3A%22file%3A%2Frobots.txt%22%2C%22lpu%22%3A%22http%3A%2F%2Flocalhost%3A9000%2Frobots.txt%22%7D:1735 in handleBrowserEvent_
  http://localhost:9000/repl?xpc=%7B%22cn%22%3A%22sBuTv8S9mu%22%2C%22tp%22%3Anull%2C%22osh%22%3Anull%2C%22ppu%22%3A%22file%3A%2Frobots.txt%22%2C%22lpu%22%3A%22http%3A%2F%2Flocalhost%3A9000%2Frobots.txt%22%7D:1724
$ cat .repl-phantom-naked-err
# It's empty

Looks like it tries to load file:/robots.txt and fails for some reason. I've done some digging and I think that the culprit is: https://github.com/google/closure-library/blob/8bbc453a8808aa77af91f959fb0dc97be058cd97/closure/goog/net/xpc/crosspagechannel.js#L111,L121

Also, this issue is very similar to #187

@dotboris
Copy link
Author

Also, here are the versions of my software:

$ lein --version
Leiningen 2.6.1 on Java 1.8.0_92 Java HotSpot(TM) 64-Bit Server VM

$ phantomjs --version
2.1.1

@mneise mneise added this to the 1.1.8 milestone Jul 30, 2017
@mneise mneise removed this from the 1.1.8 milestone Apr 5, 2020
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

2 participants