slapperwan/gh4a

403s when manually refreshing screens

Terrance opened this issue · 6 comments

I've handed OctoDroid a fine-grained personal access token covering all the features I can see in the README, and most screens (except Notifications as apparently they're not supposed by the new tokens yet) seem to work when selected from the sidebar, but doing a pull-to-refresh on them causes a 403 screen to appear:

Resource not accessible by personal access token (403)

This 403 also shows up in the news feed when first opening the app, but changing screens from the side menu and changing back again causes it to load fine. Is there an additional request being made on manual refreshes? I can't see URLs being logged anywhere (stack traces in logcat just log Loading data failed and the reason alongside the stack), so I can't tell what's actually being requested.

Permissions

User permissions

Read and Write access to blocking, followers, gists, interaction limits, profile, starring, and watching

Repository permissions

Read access to actions, administration, code, and metadata
Read and Write access to discussions, issues, and pull requests

No, pull-to-refresh just restarts the loaders, that is, triggers the same kind of data fetch as done when initially opening the respective activity.
Is this only in the home activity or also in other ones (say, issue list, issue details etc.)?

Seems to happen with all of the top-level screens, including Search (whether a query has been entered or not; searches then don't go through whilst the 403 error is showing), Public Timeline and Trending Repos.

Record_2024-01-01-11-18-48.trim.mp4

I also seem to be getting frequent "API rate limit exceeded" errors whilst testing this -- may be related to #1013, if notifications can't be read with this token and they're being retried on all screen refreshes?

More importantly, opening a link to a repo directly in the app also shows this 403 when the app first opens, and you can't pull-refresh or navigate around to make it load.

Can you provide a stack trace from logcat including the 'Caused by...' parts?

03_01-08-17-23_224.log
03_01-08-25-01_043.log

The first one is from opening the app via launcher, the second from opening a link to this repo. Both of them do seem to suggest they're trying to refresh notifications (despite Notifications being disabled in Settings, though presumably that only affects the resulting Android notifications).