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

Error initializing client-side websocket connection #207

Closed
dpetrovics opened this issue Mar 2, 2016 · 3 comments
Closed

Error initializing client-side websocket connection #207

dpetrovics opened this issue Mar 2, 2016 · 3 comments

Comments

@dpetrovics
Copy link

Thanks for a great library! We've been using it with great success, but am running into some trouble setting up the client-side socket now that I've done a bunch of dependency upgrades. The same code worked before the upgrades, so something with the new versions seems to be causing the error.

I'm on clojure 1.8, clojurescript 1.7.228, core.async 0.2.374, sente 1.8.0, encore 2.40.0, timbre 4.3.1, http-kit 2.1.19, and get the error on chrome and safari.

I start up figwheel and call:
(taoensso.sente/make-channel-socket-client! "/chsk" {:type :auto})

Resulting in an error thrown in this part of your code: https://github.com/ptaoussanis/sente/blob/master/src/taoensso/sente.cljx#L811

Here is the output in the js console:

ERROR [taoensso.sente:811] - WebSocket js/Error
#error {:message "nil as-?qname against arg: :client-id", :data {:arg :client-id, :type cljs.core/Keyword}}taoensso.timbre.appenders.core.console_appender.cljs$core$IFn$_invoke$arity$variadic @ core.cljs?rel=1456948850200:181(anonymous function) @ timbre.cljs?rel=1456948851037:458(anonymous function) @ core.cljs:5982cljs.core.PersistentArrayMap.cljs$core$IKVReduce$_kv_reduce$arity$3 @ core.cljs:5982cljs$core$_kv_reduce @ core.cljs:586cljs$core$reduce_kv @ core.cljs:2223taoensso$timbre$_log_BANG_ @ timbre.cljs?rel=1456948851037:415(anonymous function) @ sente.cljs?rel=1456953631841:811taoensso$sente$connect_fn @ sente.cljs?rel=1456953631841:805taoensso.sente.ChWebSocket.taoensso$sente$IChSocket$_chsk_connect_BANG_$arity$1 @ sente.cljs?rel=1456953631841:864taoensso$sente$_chsk_connect_BANG_ @ sente.cljs?rel=1456953631841:633(anonymous function) @ sente.cljs?rel=1456953631841:1100(anonymous function) @ sente.cljs?rel=1456953631841:1099taoensso.sente.make_channel_socket_client_BANG_.cljs$core$IFn$_invoke$arity$variadic @ sente.cljs?rel=1456953631841:1120taoensso$sente$make_channel_socket_client_BANG_ @ sente.cljs?rel=1456953631841:1007(anonymous function) @ VM1013:1(anonymous function) @ VM1013:9(anonymous function) @ VM1013:14figwheel$client$utils$eval_helper @ utils.cljs?rel=1456948916402:46figwheel$client$eval_javascript_STAR__STAR_ @ client.cljs?rel=1456948918209:155figwheel.client.repl_plugin @ client.cljs?rel=1456948918209:181(anonymous function) @ client.cljs?rel=1456948918209:353cljs.core.Atom.cljs$core$IWatchable$_notify_watches$arity$3 @ core.cljs:3970cljs$core$_notify_watches @ core.cljs:659cljs$core$reset_BANG_ @ core.cljs:4010cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3 @ core.cljs:4025cljs$core$swap_BANG_ @ core.cljs:4014(anonymous function) @ socket.cljs?rel=1456948917367:62
core.cljs?rel=1456948850200:181 WARN [taoensso.sente:800] - Chsk is closed: will try reconnect (1)

Everytime it tries to reconnect it results in another of the above error. Any ideas on what I could be missing? Thanks very much!

@ptaoussanis
Copy link
Member

Hi David, thanks for the clear, detailed report - that was really helpful.

This was a bug, have just pushed [com.taoensso/encore "2.40.2"] which should fix the problem. Sorry for the trouble.

@dpetrovics
Copy link
Author

Thanks Peter for the very quick turnaround on this! Appreciate all the great libraries. I've confirmed that the latest encore fixes this issue.

@ptaoussanis
Copy link
Member

No problem, you're very welcome - thanks for the confirmation :-)

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