cljs-http inexplicably stopped producing working code

123 views
Skip to first unread message

Jonathon McKitrick

unread,
Jun 26, 2014, 3:57:52 PM6/26/14
to clojur...@googlegroups.com
I hate asking questions like these, but I'm out of ideas, since I'm new to ClojureScript.

I have a proof-of-concept working with cljs-http, then it suddenly stopped, and I'm not sure why. It's a dead simple call of cljs-http with a local URL.

I'm seeing this is my javascript console on Firefox: TypeError: c.listen is not a function

Here's the context:
<code>
cljs.core.swap_BANG_.call(null, cljs_http.core.pending_requests, cljs.core.assoc, f, c);
c.listen(goog.net.EventType.COMPLETE, function(a) {
a = a.target;
cljs.core.async.put_BANG_.call(null, f, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "status", "status", 4416389988), a.getStatus(), new cljs.core.Keyword(null, "body", "body", 1016933652), a.getResponseText(), new cljs.core.Keyword(null, "headers", "headers", 1809212152), cljs_http.util.parse_headers.call(null, a.getAllResponseHeaders()), new cljs.core.Keyword(null, "trace-redirects", "trace-redirects", 4143757569), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE,
[g, a.getLastUri()], null)], null));
cljs.core.swap_BANG_.call(null, cljs_http.core.pending_requests, cljs.core.dissoc, f);
return cljs.core.async.close_BANG_.call(null, f);
});
c.send(g, e, a, d);
return f;
};
</code>

Tony Tam

unread,
Jun 27, 2014, 2:50:54 PM6/27/14
to clojur...@googlegroups.com
can you post the actual clojurescript code?

William Sommers

unread,
Jun 28, 2014, 9:27:22 AM6/28/14
to clojur...@googlegroups.com
I wish that this could be part of a "Pinned post" about posting here. Code helps so much in trying to help folks out.

Will

Jonathon McKitrick

unread,
Jun 28, 2014, 11:00:08 AM6/28/14
to clojur...@googlegroups.com
Yes, sorry, it turns out it was a versioning issue. I only posted the JS cause I thought that would be a giveaway as to what the issue was. Thanks anyway!
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/8lubMMVSboY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


--

--
Jonathon McKitrick

Alan Moore

unread,
Jun 29, 2014, 12:19:39 AM6/29/14
to clojur...@googlegroups.com
Could you please elaborate on the specific versioning issue you had?

We recently upgraded all our dependencies in our project.clj to the latest versions of clojure, clojurescript, cljs-http and other libraries and our previously working happ suddenly stopped working.

Since then we have simply reverted to the old versions as we didn't have time to resolve the versioning issue due a looming deadline. It will be another week before we can return to figure it out... TBD.

Take care!

Alan

Jonathon McKitrick

unread,
Jun 29, 2014, 7:55:38 AM6/29/14
to clojur...@googlegroups.com
Here's what I settled on that works again:
clojurescript 0.0-2234
cljs-http 0.1.12
lein-cljsbuild 1.0.3

Let me know if that helps.


--
Jonathon McKitrick
Reply all
Reply to author
Forward
0 new messages