Giter Club home page Giter Club logo

Comments (12)

dgraham avatar dgraham commented on August 15, 2024

We always set responseType to blob, which doesn't seem right. Introduced in #60.

@josh

from fetch.

josh avatar josh commented on August 15, 2024

We always set responseType to blob, which doesn't seem right.

Thats definitely what we want to do, but it sounds like responseText is incorrectly being accessed somehow instead of the general response type.

from fetch.

josh avatar josh commented on August 15, 2024

@nhagen can you post more to reproduce this example.

from fetch.

nhagen avatar nhagen commented on August 15, 2024

I'm able to isolate this just using marty, but it is resolvable as described above.

Following the getting started guide here: http://martyjs.org/guides/getting-started/

npm install -g yo generator-marty
mkdir example && cd example
yo marty
yo marty:domain user
npm start
open http://localhost:5000/user/134 in chrome

Inspecting the api call to http://localhost:5000/api/users/134 yields Failed to load response data. I did not initially find this after using the yeoman generator, so i was able to get this in my own code and in the autogenerated code.

I'm creating an issue in martyjs in case its a problem with that library at this point. martyjs/marty#90

from fetch.

msokk avatar msokk commented on August 15, 2024

Also to note, there is a Chrome devtools bug about not showing blob type XHR's response in Network tab -
https://code.google.com/p/chromium/issues/detail?id=412401

Example: http://jsfiddle.net/ysangkok/sJxXk/86/

from fetch.

adamschoenemann avatar adamschoenemann commented on August 15, 2024

I'm having the same exact problem. The chrome issue appears closed, yet the bug still remains.

from fetch.

msokk avatar msokk commented on August 15, 2024

I think it is not released to stable yet. Chrome Canary works.

from fetch.

adamschoenemann avatar adamschoenemann commented on August 15, 2024

Ah, thanks! Chrome Canary works.

from fetch.

josh avatar josh commented on August 15, 2024

Closing out since this is not an issue with this library.

from fetch.

WangYang-Rex avatar WangYang-Rex commented on August 15, 2024

I'm having the same exact problem!

from fetch.

bofcarbon1 avatar bofcarbon1 commented on August 15, 2024

I am running an Angular 4 UI compile with webpack and I just upgraded to zone.js 0.8.4. Got the 'net ERR CONNECTION REFUSED error but only in Google Chrome browser. When I used IE I have no problems.

The zone.js code and error....

start of code....

function scheduleTask(task) {
    XMLHttpRequest[XHR_SCHEDULED] = false;
    var data = task.data;
    // remove existing event listener
    var listener = data.target[XHR_LISTENER];
    if (listener) {
        data.target.removeEventListener('readystatechange', listener);
    }
    var newListener = data.target[XHR_LISTENER] = function () {
        if (data.target.readyState === data.target.DONE) {
            // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with
            // readyState=4 multiple times, so we need to check task state here
            if (!data.aborted && XMLHttpRequest[XHR_SCHEDULED] && task.state === 'scheduled') {
                task.invoke();
            }
        }
    };
    data.target.addEventListener('readystatechange', newListener);
    var storedTask = data.target[XHR_TASK];
    if (!storedTask) {
        data.target[XHR_TASK] = task;
    }
    sendNative.apply(data.target, data.args);  ///' error message Failed to load resource: net::ERR_CONNECTION_REFUSED  ////
    XMLHttpRequest[XHR_SCHEDULED] = true;
    return task;
}

end of code.............

I don't even know what the scheduled task would be or why zone.js is processing this XHR TASK for data.
My observable calls are in an injected service and they are the only way that I pass Json data back and forth through http request/responses. All this works fine. Can't figure out why this task attempt is made with no data on Google Chrome.

from fetch.

dgraham avatar dgraham commented on August 15, 2024

Stack Overflow is the best place to ask browser usage questions.

from fetch.

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.