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.
- I have checked the server logs and the request is received by the server and a response is sent back.
- For some reason, the status code of the pending one is 200 even though it says pending.
- I tried to replicate this problem in multiple machines but failed. However, in the users' machine, it can be replicated every single time.
- The user does not have any browser extensions. (Tried on incognito and problem still occurs)
- All calls are in https
- The page which does the requests generally has ~100% CPU for a few seconds.
- After waiting for a while the user gets the Page unresponsive tab.
- 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
Related Topic: What does "pending" mean for request in Chrome Developer Window?