enterlab / rente

Rente: Clojure, ClojureScript, Reagent (react) + Sente (web sockets). Heroku-ready!
http://enterlab.com
Eclipse Public License 1.0
57 stars 12 forks source link

JS error for second socket call w/o callback #2

Closed luposlip closed 9 years ago

luposlip commented 9 years ago

The second time - and only the second time - the socket returns data in the case without a callback, it fails with the following message:

Uncaught Error: nth not supported on this type cljs.core/Keyword
tuhlmann commented 9 years ago

@luposlip Are there any news regarding this bug? It seems I only get this bug for the first event, all subsequent events work without problems.

Thanks, Torsten.

brandonparsons commented 9 years ago

:+1:

Putting my name down here so i get notified when this gets figured out. I'm seeing the same error!

luposlip commented 9 years ago

Hi guys,

I haven't spent any time to investigate this. If one of you have the time to look more into it, I'd appreciate.

Otherwise we may see what ptaossanis says. I'll get more time to investigate in April, if nothing happens before that.

Best, Henrik

tuhlmann commented 9 years ago

I found the problem!

I replied on Sente's github: https://github.com/ptaoussanis/sente/issues/115#issuecomment-84039949

In short, its that second go-loop in app.cljs. @luposlip What's the reason for this loop? I would think firing off the Sente router does already establish the correct loop?

Any, removing that loop everything worked...

luposlip commented 9 years ago

You're right, it works! I'll be committing the fixed app later today.

I don't remember the reasoning behind this go-loop 8-/

Thanks for your input @tuhlmann! :-)