Comments (7)
I tried version 0.1.8 - 0.1.10.
from cljs-http.
Hi jconti,
I can't find anything suspicious in your code snippets. I'm using
cljs-http as well with the :advanced and :none optimization
setting and haven't seen this so far.
If you can point me to a github repository with minimal
dependencies, that demonstrates your issue, I can take a look.
Roman
from cljs-http.
Thank you for the help r0man: https://github.com/jconti/cljs-http-question
I did spend some time in the debugger today looking at this, and could see no listen attribute on the Xhlro instance where it fails, just as the exception says. Looking at the Google Closure code didn't help much after following a few dead ends (my endpoint implements CORS, but that was not related).
Thanks again for any assistance.
John
from cljs-http.
Hi jconti,
the repository you provided doesn't compile properly. I get
warnings when I open the index.html
file. Looks like some
version conflict. Can you try it again with this up-to-date
project.clj
coordinates.
(defproject trans "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url "http://example.com/FIXME"
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-2202"]
[org.clojure/core.async "0.1.301.0-deb34a-alpha"]
[prismatic/dommy "0.1.2"]
[cljs-http "0.1.10"]]
:plugins [[lein-cljsbuild "1.0.3"]]
:source-paths ["src"]
:cljsbuild {
:builds [{:id "trans"
:source-paths ["src"]
:compiler {
:output-to "trans.js"
:output-dir "out"
:optimizations :none
:source-map true}}]})
This should compile. The next problem is that the URL you request
doesn't set CORS headers, so the request will not complete. Try
this url "https://api.github.com/users" instead of "http://www.google.com".
Roman
from cljs-http.
Hi Roman,
Thank you for looking into this. I had similar problems compiling on my MacOS box over the weekend, however on my Windoze box here at work I have no trouble at all compiling, but still no luck running:
$ lein version
Leiningen 2.3.4 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM
```shell
The project was created with the latest Clojurescript template, which includes a newer Clojurescript compiler than the one you suggest:
```shell
lein new mies cljs-http-question
Also, yes this code does not do a CORS request. My comment was that I once suspected that CORS might be an issue, but all requests are broken for me. So in my snippet code I show a simple request.
Tonight I will look into the compiling problem on my MacOS box further. That may offer a clue. I will also step forward to Clojurescript 2202 on Windoze and see if that helps.
Thanks again,
John
from cljs-http.
John, are you using Lighttable?
Have you seen this:
https://groups.google.com/forum/#!topic/clojure/iKhf5kEbNbo
On Mon, May 19, 2014 at 6:20 PM, John Conti [email protected]:
Hi Roman,
Thank you for looking into this. I had similar problems compiling on my
MacOS box over the weekend, however on my Windoze box here at work I have
no trouble at all compiling, but still no luck running:$ lein version
Leiningen 2.3.4 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VMThe project was created with the latest Clojurescript template, which includes a newer Clojurescript compiler than the one you suggest: ```shell lein new mies cljs-http-question Also, yes this code does not do a CORS request. My comment was that I once suspected that CORS might be an issue, but *all* requests are broken for me. So in my snippet code I show a simple request. Tonight I will look into the compiling problem on my MacOS box further. That may offer a clue. I will also step back a version on the Clojurescript compiler here on Windoze and see if that helps. Thanks again, John — Reply to this email directly or view it on GitHub<https://github.com/r0man/cljs-http/issues/12#issuecomment-43525147> .
from cljs-http.
Roman,
I had not seen that. I am using the packaged light table binary, and lein from the command line. So I am not sure how LT's version could affect my problem. I am compiling with lein from the command line.
What I did was implement all your suggestions. In particular by just stepping up the Clojurescript version, I was in business. Thanks also for the link that implemented CORS. It didn't occur to me that google would not enable CORS. As soon as I upped the Clojurescript version I got the CORS warning, and I knew that the runtime was working properly again. Just putting in the github url then confirmed this.
I appreciate you helping out a Clojurescript n00b such as myself!
Best Regards,
John
from cljs-http.
Related Issues (20)
- How to decode an http/get transit json response to a edn? HOT 3
- previewing a request before it gets sent HOT 1
- Error handling when server sends invalid json HOT 18
- A request that should return an HTTP 405 instead returns status 0 HOT 3
- GET request URL string with multiple values for one parameter HOT 5
- Unit test failing HOT 3
- Struggling with CORS post request to compojure / ring backend using ring.core / cljs-http... HOT 8
- Response body flattens `schema` object HOT 1
- Binary response data gets mangled HOT 2
- react native support HOT 1
- The custom channel seems doesn't work HOT 3
- jsonp throws exception due to goog.net.Jsonp api changes HOT 3
- README probably has a typo
- jsonp call results in error: TypeError: this.uri_.cloneWithParams is not a function at goog.net.Jsonp.send HOT 8
- Why would the cljs-http.client request be blocked by the cors policy if the clj-http.client request isn't? HOT 1
- Improve README to describe core functionality.
- Uncaught ReferenceError: cljs_http is not defined HOT 2
- Binary data doesn't seem to be included with multipart post? HOT 1
- Mangled JSON replies HOT 2
- Function redefinition warnings with Clojure/Script 1.11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cljs-http.