Giter Club home page Giter Club logo

Comments (20)

oSumAtrIX avatar oSumAtrIX commented on June 19, 2024 3

You seem rate-limited, but still, this is something ReVanced Manager should take care of.

from revanced-manager.

oSumAtrIX avatar oSumAtrIX commented on June 19, 2024 1

For support move to the links on https://revanced.app

from revanced-manager.

ILoveOpenSourceApplications avatar ILoveOpenSourceApplications commented on June 19, 2024 1

Feel free to deviate from this plan if you feel like you have a better solution.

Hi, @validcube. Nope, I don't have any better solution. Though due to this issue, at times when I'm trying to patch, the manager becomes basically unresponsive and buffers and or doesn't load anything required. Switching between WiFi and mobile network seems to help at times.

from revanced-manager.

kitadai31 avatar kitadai31 commented on June 19, 2024 1

OK oSumAtrIX and nullcube.
I can't think of a good idea to display the error, and I don't have that much skill with Flutter, so I'll stop doing this PR, sorry.

But I fixed the cache issue
The issue is occurred because the github_api.dart doesn't use Lock (synchronized) to call dio.get(), while the revanced_api.dart uses it
This causes GitHub API spamming

Before add synchronized:
Every time I launch the Manager, it accesses the API 3 to 7 times randomly
2024-05-17 (5)

After add synchronized:
The problem is fixed
2024-05-17 (1)

I'll open a PR for this first

but API rate limit errors & network errors still have to be shown. I hope someone do this... 😕

from revanced-manager.

oSumAtrIX avatar oSumAtrIX commented on June 19, 2024 1

In regards to rate limits, ReVanced Manager should work just like if it were offline, until the rate limit elapses. Actions that require the API such as when the app launches for the first time or when you refresh the home feed should show a toast, or if better, a dialog explaining the rate limit

from revanced-manager.

oSumAtrIX avatar oSumAtrIX commented on June 19, 2024

Are you rate limited on GitHub? https://api.github.com/rate_limit

from revanced-manager.

ILoveOpenSourceApplications avatar ILoveOpenSourceApplications commented on June 19, 2024
{"resources":{"core":{"limit":60,"remaining":2,"reset":1711061079,"used":58,"resource":"core"},"graphql":{"limit":0,"remaining":0,"reset":1711061595,"used":0,"resource":"graphql"},"integration_manifest":{"limit":5000,"remaining":5000,"reset":1711061595,"used":0,"resource":"integration_manifest"},"search":{"limit":10,"remaining":10,"reset":1711058055,"used":0,"resource":"search"}},"rate":{"limit":60,"remaining":2,"reset":1711061079,"used":58,"resource":"core"}}

from revanced-manager.

Maccer1 avatar Maccer1 commented on June 19, 2024

I have the same issue I believe. I don't have many technical details but I am unable to patch any app and everything looks pink like in the video above.

I am using the default config and API. Tried reinstalling the last 2 versions with no luck.

from revanced-manager.

validcube avatar validcube commented on June 19, 2024

👋 Hello, @ILoveOpenSourceApplications!

Quick status update here, Unfortunately I will have to unassign myself from this issue (and any other issue that I've assigned to) as tomorrow is the day where I will became unavailable for the rest of the month for unspecified reason (for team refer to recreated janky excel file in the email that I've sent about weeks ago).

🔧 For anyone who's going to work on this

From a quick glance at this issue we would need some kind of interceptor to check if GitHub reply with 429 HTTP-code or check for x-ratelimit-remaining HTTP header. If limit is reached we would likely inform the user about the rate-limit problem and tell them to try later (and/or inform them about the reset time: x-ratelimit-reset header).

Feel free to deviate from this plan if you feel like you have a better solution.

from revanced-manager.

ILoveOpenSourceApplications avatar ILoveOpenSourceApplications commented on June 19, 2024

This is just my doubt, but this issue began only after the introduction of changelogs into the manager. And everytime I open the manager and tap on the changelogs button, I noticed that it's fetching real time data from the internet (from the buffering). Could this also be one of the reason why the GitHub rate limit is getting exceeded as the manager now accesses the github api for fetching the changelogs for both the manager and patches as well as fetching the patch & integration data for patching as well?

If so, then making the manager remember the last changelog until an update is done to either would be better in handling the traffic right?

from revanced-manager.

kitadai31 avatar kitadai31 commented on June 19, 2024

@validcube May I make a PR for this?

I'm thinking of using toast to notify the rate limit and time remaining like this.

But before I open the PR, I have one question.
I think the manager can show all network errors in this way.

This is useful when the ReVanced API is down and returns 500 error, or user mistyped alternative sources.
Is this OK?

from revanced-manager.

oSumAtrIX avatar oSumAtrIX commented on June 19, 2024

Instead of a toast which can go away, you can show a label at the places where stuff should've loaded

from revanced-manager.

ILoveOpenSourceApplications avatar ILoveOpenSourceApplications commented on June 19, 2024

Is this the best solution that's available, giving a user who wants to patch an app to wait 53 minutes for the manager to be ready? Can't we restrict something somewhere so that the manager doesn't use up the available GitHub ratelimit?

from revanced-manager.

oSumAtrIX avatar oSumAtrIX commented on June 19, 2024

A setting could be added to input a GitHub PAT to circumvent ratelimit. The ratelimit currently happens due to a bug in ReVanced Manager making more requests than necessary due a caching issue. The solution isnt known, but if found, rate limiting would hardly be a problem. You'd need to reopen ReVanced Manager like 30 times to hit any rate limits

from revanced-manager.

oSumAtrIX avatar oSumAtrIX commented on June 19, 2024

Additionally ReVanced Manager is supposed to cache everything. After a ratelimit, it should simply use the cached files, just like if offline

from revanced-manager.

validcube avatar validcube commented on June 19, 2024

@kitadai31

@validcube May I make a PR for this?

Sure, you can make a PR whenever you like.

I'm thinking of using toast to notify the rate limit and time remaining like this.

But before I open the PR, I have one question. I think the manager can show all network errors in this way.

This is useful when the ReVanced API is down and returns 500 error, or user mistyped alternative sources. Is this OK?

For me, I would use a dialog component for something critical because toast feels like simple low-priority feedback (probably because it is) and isn't something the user would normally see or care about.

image

This is a quick mockup of what the dialog could look like

from revanced-manager.

ILoveOpenSourceApplications avatar ILoveOpenSourceApplications commented on June 19, 2024

The current solution is a workaround rather than a fix. But atleast the user will know why nothing is loading and why they're unable to use the manager.

from revanced-manager.

oSumAtrIX avatar oSumAtrIX commented on June 19, 2024

The cache should be fixed if it is an imminent issue that needs to be looked into, then a proper solution can be done for ratelimits

from revanced-manager.

oSumAtrIX avatar oSumAtrIX commented on June 19, 2024

I remember adding the lock. Which commit introduced the regression?

from revanced-manager.

kitadai31 avatar kitadai31 commented on June 19, 2024

I looked around some revisions of github_api.dart, but Lock has never been added

from revanced-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.