1

I have a page where it has 2 different endpoint calls to 2 different routes around the same time. The second one returns successfully, however, the first one stays in pending status.

  1. I have checked the server logs and the request is received by the server and a response is sent back.
  2. For some reason, the status code of the pending one is 200 even though it says pending.
  3. I tried to replicate this problem in multiple machines but failed. However, in the users' machine, it can be replicated every single time.
  4. The user does not have any browser extensions. (Tried on incognito and problem still occurs)
  5. All calls are in https
  6. The page which does the requests generally has ~100% CPU for a few seconds.
  7. After waiting for a while the user gets the Page unresponsive tab.

enter image description here

  1. Users Chrome version: 81.0.4044.26 / macOS Mojave. I also tested with the same versions and couldn't replicate.

I'm using axios and the following code to fetch data.

    const fetchData = async () => {
      try {
        const result = await axios(url);
        ..
      } catch (error) {
        ..
      }
    };

I couldn't figure out why this was happening and how to fix it. Would appriciate help.

Thanks

enter image description here

Related Topic: What does "pending" mean for request in Chrome Developer Window?

Thellimist
  • 3,757
  • 5
  • 31
  • 49
  • 1
    Is it possible that the server doesn't terminate the request properly? It looks to me as if the response is received properly but is then not closed off properly by either the server or the client. – Linschlager Feb 21 '20 at 08:26
  • This bug only happens in a few client. For most machines the servers response is 100% sent correctly. Others, I know the request hits the server. I assume the response is sent but can't validate since it only happens on some clients consistently and non in others. – Thellimist Feb 22 '20 at 18:19

0 Answers0