How to solve this "Caution: request is not finished yet in chrome"

Hiral Shah picture Hiral Shah · Aug 22, 2017 · Viewed 23.8k times · Source

I am facing an issue related to loading JSON data.

When I monitor JSON call on Developer Tools of Chrome, I get the following message in the network tab of Chrome Developer Tools.

Caution: request is not finished yet

Attaching a snip for reference:

enter image description here

Answer

adrihanu picture adrihanu · Jun 5, 2020

I had the same issue when using the fetch function in JavaScript. To solve it, make sure you call a method that reads the body of the response like json() or text():

// Sends request and loads only headers
fetch('/foo');

// Sends request, loads headers and then fetches the body as JSON
fetch('/foo').then(response => response.json());

In my case response headers were also loaded properly and I had a successful HTTP status code, but I was missing the body content and I had Caution: request is not finished yet inside Chrome Developer Tools.

It is coused by two-step response loading. If you are using some low-level API, make sure that you fetch not only headers, which arrive first, but also body content that comes later as a stream.