desktop: Pull requests list sometimes doesn't update, even after restarting multiple times and fetching

Description

The “Pull requests” tab on the “Current branch” dropdown frequently does not update with the latest PRs visible on the GitHub website. Sometimes restarting GitHub Desktop resolves this but not always, and it shouldn’t be necessary to restart anyway to get an up to date list of PRs.

Version

  • GitHub Desktop: 1.4.2
  • Operating system: Windows 10

Steps to Reproduce

  1. Work in a repo with other users, ask them to create a PR.
  2. Observe that the PR is visible on the GitHub website.
  3. Observe that the PR is sometimes not visible in GitHub Desktop “Current branch” dropdown, even though it is visible on the website.
  4. Observe that restarting GitHub Desktop sometimes results in the PR list refreshing but sometimes it doesn’t.

Expected Behavior

After clicking “Fetch origin”, any PRs that are visible on the GitHub website should be visible in the “Current branch” dropdown on the “Pull requests” tab.

Actual Behavior

Sometimes PRs are visible on the website but will not show in GitHub Desktop for an extended period of time despite restarting and fetching multiple times. Sometimes a restart will fix the issue when a fetch does not.

Additional Information

image

image

Logs

2018-10-10.desktop.production.log

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (5 by maintainers)

Most upvoted comments

Hey all, sorry to hear you’re having problems with the PR list. I have some follow-up questions that I hope can help us narrow down the potential root cause here. As @billygriffin already stated we haven’t been able to reproduce this issue ourselves which could be for any number of reasons but all of us on the Desktop team do use the in-app PR list in our day to day work without experiencing this problem so we need to figure out how our usage differs from yours.

  1. Have you ever had more than one copy of the repository open in Desktop? In other words, have you ever cloned the offending repository to more than one location on disk and added both locations to the application?
  2. Do you ever work in a fork of the offending repository?

If you’re able to reproduce this problem we’d love it if you could help us troubleshoot this by following the steps below.

  1. Open DevTools (View -> Toggle Developer Tools).
  2. Click on the Network tab
  3. Click the refresh button in the Pull Request list image
  4. Find the corresponding request in the network tab and click on it image
  5. Click on the preview tab and expand the first pull request in the list and make a note of the updated_at field (or take a screenshot of the whole thing if you’re comfortable sharing the PR details) image
  6. Go to the Application Tab in DevTools and make your way to Storage -> IndexedDB -> Database -> repositories -> path in the sidebar and find the row corresponding to the repository you’re having problems with in the right hand pane and make note of its Primary key image
  7. Now locate the PullRequestDatabase -> pullRequestsLastUpdated table in the sidebar and find the row where Key corresponds to the Primary key you noted in the previous step and make a note of the lastUpdated property for that row. image

Sharing the results of the above would go a long way towards helping us understand what’s going on.

I did not upgrade. When I reported my issue, the program told me I was on the latest version. I will try on Monday

On Fri, Jan 31, 2020, 5:47 PM Billy Griffin notifications@github.com wrote:

Thanks @mattnewport https://github.com/mattnewport and @jzabroski https://github.com/jzabroski!

@jzabroski https://github.com/jzabroski Did you happen to update to the latest version, 2.3.1? The work we done relating to forks and PRs there may have fixed this issue even in the edge cases where it has manifested, so I’m curious if it’s still happening when you’re on that version.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/desktop/desktop/issues/5865?email_source=notifications&email_token=AADNH7PYZYFGDEWKGYU26GDRASTA3A5CNFSM4F22A72KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKQIGEY#issuecomment-580944659, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADNH7N5OKUAZZCBUS3UUQLRASTA3ANCNFSM4F22A72A .

Same issue in 2.2.4

If you’re feeling desperate, you can blow away your %AppData%\GitHub Desktop folder.

Solved my problem! 💣😉

Thanks @mattnewport and @jzabroski!

@jzabroski Did you happen to update to the latest version, 2.3.1? The work we done relating to forks and PRs there may have fixed this issue even in the edge cases where it has manifested, so I’m curious if it’s still happening when you’re on that version.

I do have multiple copies of the repository where I was seeing the problem and they would all have been open in desktop. I’m not using desktop much these days as I’ve mostly switched to using magit but if I do happen to repro the issue I’ll try and send the info.