mtgred / netrunner

http://www.jinteki.net
Other
900 stars 393 forks source link

Figwheel Prompt not Showing/Connecting to Application #3083

Closed msbeck closed 6 years ago

msbeck commented 6 years ago

I run lein repl then do a (future-call dev) in one terminal. Once that's started I run lein figwheel in another. The following results, but the prompt never appears.

vagrant@ubuntu-xenial:/vagrant/netrunner$ lein figwheel
Figwheel: Cutting some fruit, just a sec ...
Figwheel: Validating the configuration found in project.clj
Figwheel: Configuration Valid :)
Figwheel: Starting server at http://0.0.0.0:3449
Figwheel: Watching build - dev
Compiling "resources/public/cljs/app.js" from ["src/cljs"]...
WARNING: Use of undeclared Var netrunner.gameboard/toast at line 108 src/cljs/netrunner/cardbrowser.cljs
WARNING: Use of undeclared Var netrunner.gameboard/toast at line 109 src/cljs/netrunner/cardbrowser.cljs
WARNING: Use of undeclared Var netrunner.deckbuilder/banned? at line 145 src/cljs/netrunner/cardbrowser.cljs
WARNING: Use of undeclared Var netrunner.deckbuilder/banned-span at line 145 src/cljs/netrunner/cardbrowser.cljs
WARNING: Use of undeclared Var netrunner.deckbuilder/restricted? at line 146 src/cljs/netrunner/cardbrowser.cljs
WARNING: Use of undeclared Var netrunner.deckbuilder/restricted-span at line 146 src/cljs/netrunner/cardbrowser.cljs
WARNING: Use of undeclared Var netrunner.deckbuilder/rotated-span at line 147 src/cljs/netrunner/cardbrowser.cljs
WARNING: Use of undeclared Var netrunner.deckbuilder/influence-dots at line 170 src/cljs/netrunner/cardbrowser.cljs
Successfully compiled "resources/public/cljs/app.js" in 145.443 seconds.
Figwheel: Starting CSS Watcher for paths  ["resources/public/css"]
Launching ClojureScript REPL for build: dev
Figwheel Controls:
          (stop-autobuild)                ;; stops Figwheel autobuilder
          (start-autobuild [id ...])      ;; starts autobuilder focused on optional ids
          (switch-to-build id ...)        ;; switches autobuilder to different build
          (reset-autobuild)               ;; stops, cleans, and starts autobuilder
          (reload-config)                 ;; reloads build config and resets autobuild
          (build-once [id ...])           ;; builds source one time
          (clean-builds [id ..])          ;; deletes compiled cljs target files
          (print-config [id ...])         ;; prints out build configurations
          (fig-status)                    ;; displays current state of system
  Switch REPL build focus:
          :cljs/quit                      ;; allows you to switch REPL to another build
    Docs: (doc function-name-here)
    Exit: Control+C or :cljs/quit
 Results: Stored in vars *1, *2, *3, *e holds last exception object
Prompt will show when Figwheel connects to your application

I've tried closing and re-opening the browser clients and restarting things a few times. I've never ran an application like this before. Am I missing something?

Saintis commented 6 years ago

Have you also started the webserver (npm start, or something like that) in a third window?

I normally have 4-5 terminal windows open with:

msbeck commented 6 years ago

I'm working out of nrdev using vagrant boxes and I think some of those things are automatically started when I start the vagrant box.

I can navigate around the main site on localhost:1042 as well as create and enter/play games, so I'm assuming the webserver is running.

msbeck commented 6 years ago

Terminal 1

$vagrant up
...
$lein repl
...
game.main=> (future-call dev)

Terminal 2

$ npm run start

> netrunner@0.0.1 start /vagrant/netrunner
> coffee server.coffee

Dev environment
Error: listen EADDRINUSE 0.0.0.0:1042
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at Server.setupListenHandle [as _listen2] (net.js:1351:14)
    at listenInCluster (net.js:1392:12)
    at doListen (net.js:1501:7)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:686:11)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

App version 0.1.0
nealterrell commented 6 years ago

EADDRINUSE means that some other process is bound to the port 1042 already. Make sure there isn't another instance of Node running.

msbeck commented 6 years ago

That wouldn't be the server itself I'm running with lein repl would it?

On Feb 14, 2018 5:14 PM, "Neal Terrell" notifications@github.com wrote:

EADDRINUSE means that some other process is bound to the port 1042 already. Make sure there isn't another instance of Node running.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mtgred/netrunner/issues/3083#issuecomment-365776884, or mute the thread https://github.com/notifications/unsubscribe-auth/AC2B-wYCEZxkTzkd5G6QSBdcnMz0DmK1ks5tU2jqgaJpZM4SFskA .

nealterrell commented 6 years ago

No, the game logic (clojure) server runs on a different port.

nealterrell commented 6 years ago

Hi @msbeck, I just merged a complete server rewrite into the master branch. Try pulling that. You can then do what your first comment suggests: lein figwheel to compile the UI files, then lein repl to launch the server -- that's it.

msbeck commented 6 years ago

Does lein figwheel auto compile and push the files live if I'm editing them while running the server?

What's the # of that merge? I saw that a server rewrite was in progress. Good to hear it's complete.

nealterrell commented 6 years ago

https://github.com/mtgred/netrunner/pull/2915

Yes, figwheel auto-compiles changes to CLJS and serves them to the active browser page.

jwarwick commented 6 years ago

I updated the version of Figwheel in #3342 It helped with the connection issues I was having, though Figwheel is still hella flaky for me.