Giter VIP home page Giter VIP logo

Comments (7)

jconti avatar jconti commented on August 23, 2024

I tried version 0.1.8 - 0.1.10.

from cljs-http.

r0man avatar r0man commented on August 23, 2024

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.

jconti avatar jconti commented on August 23, 2024

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.

r0man avatar r0man commented on August 23, 2024

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.

jconti avatar jconti commented on August 23, 2024

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.

r0man avatar r0man commented on August 23, 2024

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 VM

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 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.

jconti avatar jconti commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.