question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No response data in Chrome.

See original GitHub issue

Hello,

This is a bit of a strange issue to report, but it seems to be coming from vue-resource 1.x.

So basically things were working fine for a while, but I think a recent version of Chrome stopped displaying response data with vue-resource.

Chrome Version 56.0.2924.87 (64-bit)

The strange thing is that: It only occurs immediately following an OPTIONS request. If for instance I make a request with no authorization header it’s fine. But if I make a CORS request with Authorization header it will fire the OPTIONS request first. I can see the response of that. But the subsequent response does not display.

NOTE: There is only issue with the response displaying. All my code and the plugin otherwise works perfectly fine.

I’m using Laravel and have stripped down the example to bare bones so it’s plain php and the problem persisted. When I did a straight xmlhttp request:

function loadXMLDoc() {
    var xmlhttp = new XMLHttpRequest();

    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == XMLHttpRequest.DONE ) {
           // if (xmlhttp.status == 200) {
               console.log(xmlhttp.responseText);
           // }
           // else if (xmlhttp.status == 400) {
              // alert('There was an error 400');
           // }
           // else {
           //     // alert('something else other than 200 was returned');
           // }
        }
    };

    xmlhttp.open("GET", "https://hs.api.laravel-starter.com/api/v1/auth/user", true);
    xmlhttp.setRequestHeader('Authorization', 'Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2hzLmFwaS5sYXJhdmVsLXN0YXJ0ZXIuY29tL2FwaS92MS9hdXRoL3JlZnJlc2giLCJpYXQiOjE0ODc4NTYyODIsImV4cCI6MTQ4OTExMjAyNywibmJmIjoxNDg3OTAyNDI3LCJqdGkiOiI3cGlrOEp6Q2d1a3hmMnRSIiwic3ViIjoxfQ.WJINr9wxSxkJj5raI8ljEMl_0RUs6ncXcGwFFmaEc84');
    xmlhttp.send();
}

loadXMLDoc();

The problem went away. I was doing this in my root app component of Vue. I also tried using axios and the problem also seems to have gone away. So makes me think there is an issue here.

Vue 2.1.10 Vue Router 2.2.0 Vue Resource 1.2.0 & 1.0.3

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
websanovacommented, Mar 3, 2017

So seems there is a fix for this to not set the responseType to ‘blob’?

http://stackoverflow.com/questions/42172505/chrome-no-response-data-after-options-request

Not sure if this will affect other things though.

2reactions
ibrahimabdocommented, Mar 25, 2017

I’ve created a pull request with a fix to this issue. Basically it allows you to set custom responseType in options.

https://github.com/pagekit/vue-resource/pull/584/files

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chrome dev tools fails to show response even the content ...
I navigated to a different website. Now when I look at the response, it shows 'Failed to load response data'. No Response Data....
Read more >
How to Fix Chrome's Failed to Load Response Data Error
In Chrome DevTools, click on the Sources tab.
Read more >
request success but see no response on Chrome Dev Tool ...
Chrome : request success but see no response on Chrome Dev Tool Network tab. Yet, I found Chrome takes a long time to...
Read more >
453078 - "Failed to load response data" - chromium - Monorail
When a request is not succesful and no response is received (which may be the case when a timeout occurs, cannot even think...
Read more >
Issue 453078 in chromium: "Failed to load response data"
This "Failed load response data" message shouldn't exist under any circumstances. When a request is not succesful and no response is received
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found