gitify: Bad credentials after clicking on PR title

🔍 Is there already an issue for your problem?

  • I have checked older issues, open and closed

📝 Description

I’m using Gitify with personal token and GitHub Enterprise. I’ve added rights to user:read, repo, notofication as instructed on login screen. When I login, Gitify properly shows the PRs. When I click on PR title, it disappears from the list only to show up some time later. At the same time I can see failed request in console.

{
  "message": "Bad credentials",
  "documentation_url": "https://docs.github.com/enterprise-server@3.9/rest"
}

🪜 Steps To Reproduce

  1. Use GH Enterprise, login and create personal access token with user:read, repo, notofication rights.
  2. Use Gitify and login with the token.
  3. Wait for PR appear on list.
  4. Click PR title.

Gitify Version

5.1.0

Operating System

macOS

GitHub Account

GitHub Enterprise

📸 Screenshots

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 months ago
  • Reactions: 1
  • Comments: 16 (9 by maintainers)

Most upvoted comments

v5.2.0 is now available.

Alright, looks like it was some missing permissions on the token that caused that endpoint to fail. After adding permissions (not totally sure which one) that endpoint works. Waiting on another notification to come in to validate.

It solved my issue 🎉 Thank you

Excellent! We’ll get a new release out shortly

It solved my issue 🎉 Thank you

@MichalMichalak - incredibly helpful, thank you very much. This helps give us an idea of where we need to fix. I’ll take a closer look in the morning. Appreciate it.

Now I’ve noticed. When you look at the screenshot in previous comment, you can see two requests to the same URL - first fails, second one, 3 lines below - succeeds. First is the result of click, the second gets PRs to populate the list.

When I compared curl of both, turns out that failing one passes null as token in the header:

-H 'authorization: token null'

Screenshot 2024-04-02 at 9 18 59

while the succeeding one passes actual token:

-H 'authorization: token ghp_r...K' \

Could that be the reason?

They are api.{hostname}.com/repos/{org}/{repo}/pulls/{number} for me. FWIW the notification for the above comment worked fine.