Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

No response data in Chrome. #566

@websanova

Description

@websanova

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions