Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to load response data" in chrome #90

Closed
nhagen opened this issue Jan 28, 2015 · 2 comments
Closed

"Failed to load response data" in chrome #90

nhagen opened this issue Jan 28, 2015 · 2 comments

Comments

@nhagen
Copy link

nhagen commented Jan 28, 2015

I narrowed it down to a line in the fetch library, but in case this isn't an issue with fetch, I'm copying here. See JakeChampion/fetch#83

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 in the preview tab. When I console.log the api response, it shows {id: "4"}, which makes it seem like response body is being returned somewhere, so this might not break anything, just make debugging responses difficult.

The [Exception: DOMException: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'blob').] error described in the fetch issue is still happening, despite the response apparently coming back.

In my original issue on my own implementation, returning when returns a 404 error, but when I right click > open in new tab on the API request from the chome debugger, the request works just fine (in a new tab, by its self) and I receive the response back with no issues. Something in marty/fetch is corrupting/not returning the response.

Let me know if this is reproducible. I've tried this with node v0.10.33 and v0.11.14

@nhagen
Copy link
Author

nhagen commented Jan 29, 2015

The issue with the response not going through was fixed by cae1d6a as the response object didn't have response._body, and marty was not processing the json.

npm update fixed it. My bad. I don't think the issue with chrome is related to Marty.

@nhagen nhagen closed this as completed Jan 29, 2015
@jhollingworth
Copy link
Contributor

Cool, no worries. Glad its fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants