-
Notifications
You must be signed in to change notification settings - Fork 5
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
Count is always off #167
Comments
I can't say I've experienced this. My suspicions would be the following:
|
You can see how off it is here: 12 notifications, most unread, extension reports 3
Nope, only 1 account. Furthermore, this is a new installation on a brand new OS installation (Linux, but I can't imagine that matters)
Let me know if there's a way I can debug this.
Yeah I haven't seen the count vary at all, other than it goint from 3->2 when I opened this issue (which is one of the 3 it "sees". Unfortunately my screenshot utility doesn't seem to be able to capture the dropdown (it closes as soon as FF blurs) but there is a specific list of issues/PRs it thinks are unread/new. I can't determine what it is. It's not the "subscribed"/"author"/"commented" reason, as the two other notifications are a dependabot PR and a new Release object from the GH Actions triggered by that dependabot PR. I'd love to sort this out as I've been missing some notifications :. Let me know if/how I can help. |
You can look at the payloads of the github API the extension is getting by going to about:debugging, enabling local extension debugging and then inspecting the extension. This will open a tab with the web dev tools, where under network you'll find requests made by the extension since starting the extension inspection. It is also possible that you may see clues in the console, which is what it defaults to, however the console will usually also contain a lot of false positive information from other extensions and Firefox itself. |
Haha well that was a journey. I figured it out by way of installing a different GH notification add-on and realising something while creating a new token: You need However, I have now added and removed a bunch of times and it does not appear to work when the add-on requests the token automatically (regardless of which option I choose): It only works if I add an account with a manually created Personal Access Token. Using the same token as the other add-on: If I remove that account and choose option 1 again (and disable and re-enable add-on for good measure), the count returns to 3, even though I can confirm that the token request is asking for I guess I'll just use a PAT for now...? |
Removing authorised application from my account forced the notifier to go through a full authorisation request again (OAuth2 web flow), which again confirmed it was requesting private access. It still only shows 3. Perhaps it needs both |
https://docs.github.com/en/rest/reference/activity#list-notifications-for-the-authenticated-user So if that's the case, the documentation is wrong. Officially the repo scope includes notifications. Also, I guess I should maybe look into forcing auth when you add an account- I thought I had that flag set, but apparently not. |
I wonder though if the handling of private repos for notifications somehow fails within the extension. I've had to correct that in the past and personally don't really have private repos that would get notifications. Notably it would probably be this function that fails: https://github.com/freaktechnik/advanced-github-notifier/blob/master/scripts/github.js#L309 or more accurately if then the fallback also fails: https://github.com/freaktechnik/advanced-github-notifier/blob/master/scripts/handler.js#L307 the notification is essentially ignored (see |
No, I checked the actual response. GitHub is only returning a subset of my notifications (corresponding to the number the add-on displays on its icon). I don't think there is a logic error in the handling of the notifications at all. |
Notification badge often says there are no notifications when there are, but even when it does show that there is a new notification, the count is completely off:
Is anybody else experiencing this?
The text was updated successfully, but these errors were encountered: