desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Can't sign in with GitHub Desktop

Open artempopereka opened this issue 1 year ago • 7 comments

The problem

Today I can't push commit from GitHub Desktop fatal: unable to access 'https://github.com/artempopereka/AmusementPark/': Send failure: Connection was reset After log out i can't login with browser from GitHub Desktop. Please take a look screenshort. But I can login in my browser chrome.

Release version

Version 3.3.14 (x64)

Operating system

Windows 10

Steps to reproduce the behavior

No response

Log files

TypeError: Failed to fetch at fn (C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\http.ts:152:10) at C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\api.ts:2165:28 at C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\oauth.ts:52:23 at Object.dispatchURLAction (C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\dispatcher\dispatcher.ts:1848:30) at EventEmitter. (C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\index.tsx:338:14) at EventEmitter.emit (node:events:517:28) at Object.onMessage (node:electron/js2c/renderer_init:2:8536) 2024-04-21T14:48:52.836Z - info: [ui] [SignInStore] error with OAuth flow Error: Unable to fetch authenticated user. at Object.dispatchURLAction (C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\dispatcher\dispatcher.ts:1852:32) 2024-04-21T14:49:00.384Z - error: [ui] git -c credential.helper= push origin master:master --progress exited with an unexpected code: 128. stderr: fatal: unable to access 'https://github.com/artempopereka/AmusementPark/': Send failure: Connection was reset

2024-04-21T14:50:01.458Z - info: [ui] [SignInStore] initializing OAuth flow 2024-04-21T14:50:01.465Z - info: [main] opening in browser: https://github.com/login/oauth/authorize?client_id=de0e3c7e9973e1c4dd77&scope=repo%20user%20workflow&state=9bc47c73-747e-4221-98fe-3ff25b5d916a 2024-04-21T14:50:02.212Z - info: [main] Received possible protocol arguments: 4 2024-04-21T14:50:02.215Z - info: [main] Processing protocol url 2024-04-21T14:50:02.216Z - info: [ui] [Dispatcher] requesting authenticated user 2024-04-21T14:50:02.373Z - warn: [ui] requestOAuthToken: failed with endpoint https://api.github.com TypeError: Failed to fetch at fn (C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\http.ts:152:10) at C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\api.ts:2165:28 at C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\oauth.ts:52:23 at Object.dispatchURLAction (C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\dispatcher\dispatcher.ts:1848:30) at EventEmitter. (C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\index.tsx:338:14) at EventEmitter.emit (node:events:517:28) at Object.onMessage (node:electron/js2c/renderer_init:2:8536) 2024-04-21T14:50:02.373Z - info: [ui] [SignInStore] error with OAuth flow Error: Unable to fetch authenticated user. at Object.dispatchURLAction (C:\Users\artyo\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\dispatcher\dispatcher.ts:1852:32)

Screenshots

github_unable

Additional context

No response

artempopereka avatar Apr 21 '24 14:04 artempopereka

The problem

After updating to GitHub Desktop 3.3.14 (x64), GitHub Desktop fails to sign in to GitHub using a web browser.

Release version

Version 3.3.14 (x64)

Operating system

Windows 10

Steps to reproduce the behavior

  1. Click Fetch origin button
  2. GitHub Desktop says Authentication failed.
  3. Click Open Options and click Sign into GitHub.com
  4. Click Continue with browser
  5. Enter my credential to login to GitHub in a web browser.
  6. A message, "You are being redirected to the authorized application" appears on the web browser.

At this point, GitHub Desktop says "Requires authentication" even though I have successfully signed into GitHub in a web browser.

Log files

2024-04-22T06:44:55.675Z - error: [ui] `git -c credential.helper= fetch --progress --prune --recurse-submodules=on-demand origin` exited with an unexpected code: 128.
stderr:
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/takashiyoshida/c755b-swd-register.git/'

(The error was parsed as 4: Authentication failed. Some common reasons include:

- You are not logged in to your account: see File > Options.
- You may need to log out and log back in to refresh your token.
- You do not have permission to access this repository.
- The repository is archived on GitHub. Check the repository settings to confirm you are still permitted to push commits.
- If you use SSH authentication, check that your key is added to the ssh-agent and associated with your account.
- If you use SSH authentication, ensure the host key verification passes for your repository hosting service.
- If you used username / password authentication, you might need to use a Personal Access Token instead of your account password. Check the documentation of your repository hosting service.)
2024-04-22T06:46:57.793Z - info: [ui] [SignInStore] initializing OAuth flow
2024-04-22T06:46:57.799Z - info: [main] opening in browser: https://github.com/login/oauth/authorize?client_id=de0e3c7e9973e1c4dd77&scope=repo%20user%20workflow&state=807d7577-e318-48ab-ac99-ebe9e83a1f61
2024-04-22T06:47:13.830Z - info: [main] Received possible protocol arguments: 4
2024-04-22T06:47:13.831Z - info: [main] Processing protocol url
2024-04-22T06:47:13.833Z - info: [ui] [Dispatcher] requesting authenticated user
2024-04-22T06:47:15.094Z - warn: [ui] fetchAccount: failed with endpoint https://api.github.com
Error: Requires authentication
    at gn (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\http.ts:178:11)
    at rr.fetchAccount (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\api.ts:1032:7)
    at or (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\api.ts:2013:11)
    at Object.dispatchURLAction (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\dispatcher\dispatcher.ts:1848:17)
2024-04-22T06:47:15.095Z - warn: [ui] fetchUser: failed with endpoint https://api.github.com
Error: Requires authentication
    at gn (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\http.ts:178:11)
    at rr.fetchAccount (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\api.ts:1032:7)
    at or (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\api.ts:2013:11)
    at Object.dispatchURLAction (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\dispatcher\dispatcher.ts:1848:17)
2024-04-22T06:47:15.095Z - info: [ui] [SignInStore] error with OAuth flow
Error: Requires authentication
    at gn (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\http.ts:178:11)
    at rr.fetchAccount (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\api.ts:1032:7)
    at or (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\api.ts:2013:11)
    at Object.dispatchURLAction (C:\Users\T0204569\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\dispatcher\dispatcher.ts:1848:17)

Additional context

No response

takashiyoshida avatar Apr 22 '24 06:04 takashiyoshida

The problem

GitHub Desktop fails to sign in to GitHub using a web browser.

Release version Version 3.3.14 (x64)

Operating system

Windows 11 Home, 64 bits.

Steps to reproduce the behavior

Click Open Options and click Sign into GitHub.com Click Continue with browser Enter my credential to login to GitHub in a web browser. A message, "You are being redirected to the authorized application" appears on the web browser. GitHub Desktop says 'Unable to fetch authenticated user'

Log files

2024-05-06T18:55:54.429Z - info: [main] Using toast activator CLSID {27D44D0C-A542-5B90-BCDB-AC3126048BA2}
2024-05-06T18:55:54.656Z - info: [ui] [AppStore] loading 0 repositories from store
2024-05-06T18:55:54.714Z - info: [ui] launching: 3.3.14 (Windows 10.0.22631)
2024-05-06T18:55:54.715Z - info: [ui] execPath: 'C:\Users\Admin\AppData\Local\GitHubDesktop\app-3.3.14\GitHubDesktop.exe'
2024-05-06T18:55:55.150Z - error: [ui] Error reporting opt in:
TypeError: Failed to fetch
    at NH.constructor.hx [as post] (C:\Users\Admin\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\stats\stats-store.ts:414:3)
    at NH.constructor.sendOptInStatusPing (C:\Users\Admin\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\stats\stats-store.ts:1128:35)
    at new NH.constructor (C:\Users\Admin\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\stats\stats-store.ts:439:12)
    at C:\Users\Admin\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\index.tsx:220:20
    at C:\Users\Admin\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\index.tsx:375:27
    at C:\Users\Admin\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\ui\index.tsx:375:27
2024-05-06T18:55:55.156Z - error: [ui] Error reporting stats:
TypeError: Failed to fetch
    at NH.constructor.hx [as post] (C:\Users\Admin\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\stats\stats-store.ts:414:3)
    at NH.constructor.reportStats (C:\Users\Admin\AppData\Local\GitHubDesktop\app-3.3.14\webpack:\app\src\lib\stats\stats-store.ts:488:35)

Additional context

It only happened to me starting yesterday. It's strange. I haven't made any significant changes to my computer.

I have not changed antivirus or firewall.

escmHEX avatar May 06 '24 18:05 escmHEX

@artempopereka are you behind a firewall or proxy that could be interfering with your connection to GitHub?

@takashiyoshida can you try to reset the app to ensure there isn't a caching issue? Here's how to do that:

  1. Close GitHub Desktop
  2. Remove all of the files in %APPDATA%\GitHub Desktop\
  3. Restart GitHub Desktop

You will need to add your repositories again, which can be done quickly in bulk by drag-and-drop.

@escmHEX are you behind a proxy server or firewall?

If this issue persists it would be helpful to get some information from the Developer Tools window to see if that shows any further information about why the authentication requests are failing. To do this open the Developer tools by selecting the "View" menu and "Toggle Developer Tools". Once opened try signing in again and see if the dev tools console provides any more insight as to why to the requests are failing.

steveward avatar May 07 '24 18:05 steveward

We have exactly the same issue - two different users on five different machines. We optimistically upgraded to 3.3.14 (Windows 10, x64) and boom, our access to GitHub via GitHub Desktop is gone forever.

Nothing else has changed in any of our machines.

Since I am unable to find previous versions of GitHub Desktop to install (why? Does it cost you any effort to leave previous versions available somewhere?), the only solution for us was to use the portable version of it, which starts an older - but still acceptable - version of GitHub Desktop (3.3.9).

infinity77 avatar May 08 '24 06:05 infinity77

@steveward I followed your reset procedures but in the end, GitHub Desktop is unable to sign-in (I am able to sign-in to GitHub web site via a web browser).

I am attaching logs from GitHub Desktop though I am not sure if those are helpful. I collected them after I followed your reset procedures.

2024-05-08.desktop.production.log GitHub_Desktop-dev-console-1715132285433.log

takashiyoshida avatar May 08 '24 09:05 takashiyoshida

As @infinity77 said, if there is a way to install older GitHub Desktop, that would be helpful, though I don't know if the older GitHub Desktop client is able to continue to sign-in.

takashiyoshida avatar May 08 '24 09:05 takashiyoshida

@takashiyoshida : it works for us using 3.3.9 (signing in through GitHub Desktop via web page). As far as I can see, 3.3.9 is about 3 months old.

infinity77 avatar May 08 '24 09:05 infinity77

Thank you for your issue! We haven’t gotten a response to our questions above. With only the information that is currently in the issue, we don’t have enough information to take action. We’re going to close this but don’t hesitate to reach out if you have or find the answers we need. If you answer our questions above, this issue will automatically reopen.

github-actions[bot] avatar May 14 '24 19:05 github-actions[bot]