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

Contributors section gets stuck with a spinner, no images #456

Open
jywarren opened this issue Apr 19, 2021 · 6 comments
Open

Contributors section gets stuck with a spinner, no images #456

jywarren opened this issue Apr 19, 2021 · 6 comments
Labels
add-code-links Please help by adding links to where the code is for the described work. help wanted

Comments

@jywarren
Copy link
Member

Please describe the problem (or idea)

What happened just before the problem occurred? Or what problem could this idea solve?

What did you expect to see that you didn't?

Sometimes (esp after reloading the page a few times) we get just a spinner for this section:

image

The JS console shows we've gone over our API limit:

failed to load resource: the server responded with a status of 403 ()

https://code.publiclab.org/#r=all

Analysis

I bet we have some data already cached and we're just hitting an error on trying to fetch new data. We could try logging out what contributors we /already/ have to test this out.

Solution

Let's try to fall back on the existing set of saved contributors if the new requests fail.

  1. The first step is probably to look for where the code is for the request
  2. and then to add an extra "on fail" handler!
  3. we could also show an error message that something like You've hit GitHub's API rate limit for fetching new data. Old data shown instead; try again in 5-10 minutes!

Any help appreciated!!!

@jywarren jywarren added help wanted add-code-links Please help by adding links to where the code is for the described work. help-wanted and removed help-wanted labels Apr 19, 2021
@waridrox
Copy link
Member

waridrox commented May 3, 2021

The rate limiting is also observed on the local environment which makes it hard to test the website in the first place. @jywarren I think we should start with investigating the number of requests that are being made per page refresh and look for the possible optimisations.
Also what are your thoughts on using the Authenticated request token for fetching the data since that has a limit of about 5000 requests per hour as oppose to 60 requests per hour for the un-authenticated one...

Screenshot 2021-05-03 at 10 40 12 PM_censored

@jywarren
Copy link
Member Author

jywarren commented May 4, 2021

We've unfortunately discussed the idea of a token before, and we really want this to be able to run purely client-side. What we could do is think of a way to add a token for developer usage, to make debugging easier.

But we can also start with (3) above and just display an appropriate message when we get such an error back, which would do a lot to make the issue more transparent to the user.

Then we could go back in and see what's going wrong and try to add an "onFail" fallback to display the prior cached data.

@YogeshSharma01
Copy link
Contributor

Hi, @jywarren How are you?
I would like to work on this.

@jywarren
Copy link
Member Author

jywarren commented Jun 10, 2021 via email

@prius2055
Copy link

Hi @jywarren and @TildaDares can I also assist with this?

@jywarren
Copy link
Member Author

@prius2055 we'd love help with it. Would you like any help getting started?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add-code-links Please help by adding links to where the code is for the described work. help wanted
Projects
None yet
Development

No branches or pull requests

4 participants