user-story icon indicating copy to clipboard operation
user-story copied to clipboard

Infinite API calls

Open kailash360 opened this issue 3 years ago • 4 comments

Describe the bug

Whenever a user clicks on a story to read it, the Story.js component is rendered, and this makes infinite requests to the backend.

To Reproduce

Steps to reproduce the behavior:

  1. Right click on homepage and choose Inspect
  2. Go to Networks tab
  3. Click on any story on the homepage with the inspect section open
  4. You will see infinite requests made by the client

Expected behavior

The component should make only a single request to the backend and this should be sufficient to return the required data.

Logs

https://user-images.githubusercontent.com/75155230/145693784-ad60fc89-381b-43a4-861e-03e01fbe9c9d.mp4

Environment (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome

Additional context

NIL

kailash360 avatar Dec 11 '21 22:12 kailash360

@cyntss The problem is occurring due to the react-promise-tracker package. Can I fix it?

kailash360 avatar Dec 11 '21 22:12 kailash360

@kailash360 I am unable to reproduce this issue. I tried on the hosted link as well as by building user-story repo locally. There are no infinte api calls.

  • OS : Ubuntu 20.04
  • Browser : Chrome and Brave

Localhost image

Local user-story build image

ayushsatyam146 avatar Dec 12 '21 05:12 ayushsatyam146

I wonder if the problem is occurring only on Windows. I faced this issue in my local server as well as in the build

kailash360 avatar Dec 12 '21 07:12 kailash360

Nope, I checked for windows as well, on chrome, brave, and edge.

ayushsatyam146 avatar Dec 12 '21 10:12 ayushsatyam146