Skip to content
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

can not log in with error "Failed to fetch" #9742

Closed
tianyuzhou95 opened this issue May 9, 2020 · 8 comments
Closed

can not log in with error "Failed to fetch" #9742

tianyuzhou95 opened this issue May 9, 2020 · 8 comments
Labels
more-info-needed The submitter needs to provide more information about the issue

Comments

@tianyuzhou95
Copy link

Describe the bug

when I try to log in with my GitHub Account, it reports "Failed to fetch"

Version & OS

Version 2.4.3 and Window 10

Steps to reproduce the behavior

  1. Go to 'file'
  2. Click on 'options'
  3. Click 'Accounts'
  4. Click 'Sign In'
  5. Enter Name&Passwd
  6. get error

Expected behavior

enter my account

Actual behavior

report error

@steveward
Copy link
Member

Thanks for the report @tianyuzhou95. Could you upload the log file from GitHub Desktop so that I could get some more information about this error? To access the log files go to the file menu in GitHub Desktop and select Help > Show Logs in Finder (macOS) or Explorer (Windows).

The log files are created daily -- please upload a log file as an attachment from a day where you experienced the issue. Thanks!

@steveward steveward added the more-info-needed The submitter needs to provide more information about the issue label May 11, 2020
@tianyuzhou95
Copy link
Author

here is the log file, by the way, I also try to login with browser, which also returns an error with failed to fetch

2020-05-11T01:51:25.392Z - info: [ui] [AppStore] loading 0 repositories from store
2020-05-11T01:51:25.404Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-05-11T01:51:25.406Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-05-11T01:51:25.498Z - info: [ui] launching: 2.4.3 (Windows 10.0.18362)
2020-05-11T01:51:25.498Z - info: [ui] execPath: 'C:\Users\zty\AppData\Local\GitHubDesktop\app-2.4.3\GitHubDesktop.exe'
2020-05-11T01:51:25.501Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-05-11T01:51:25.572Z - info: [ui] [Welcome] no sign in step found. ignoring...
2020-05-11T01:51:26.260Z - info: [ui] Opt in reported.
2020-05-11T01:51:27.174Z - info: [ui] [Welcome] advancing to step: SignInToDotCom
2020-05-11T01:51:27.175Z - info: [ui] [Welcome] current sign in state not found. ignoring...
2020-05-11T01:51:30.806Z - info: [ui] [SignInStore] initializing OAuth flow
2020-05-11T01:51:30.806Z - info: [main] opening in browser: https://github.com/login/oauth/authorize?client_id=de0e3c7e9973e1c4dd77&scope=repo%20user%20workflow&state=735be2a8-916d-4a83-aa28-5eaa0919cc0a
2020-05-11T01:51:30.817Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T01:51:30.901Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T01:51:33.131Z - info: [main] Received possible protocol arguments: 5
2020-05-11T01:51:33.131Z - info: [main] Processing protocol url
2020-05-11T01:51:33.132Z - info: [ui] [Dispatcher] requesting authenticated user
2020-05-11T01:51:33.138Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T01:51:33.201Z - info: [main] Received possible protocol arguments: 3
2020-05-11T01:51:33.202Z - info: [main] Processing protocol url
2020-05-11T01:51:34.672Z - warn: [ui] fetchAccount: failed with endpoint https://api.github.com
TypeError: Failed to fetch
2020-05-11T01:51:34.672Z - warn: [ui] fetchUser: failed with endpoint https://api.github.com
TypeError: Failed to fetch
2020-05-11T01:51:34.673Z - info: [ui] [SignInStore] error with OAuth flow
TypeError: Failed to fetch
2020-05-11T01:51:34.687Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T01:51:38.774Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T01:53:25.422Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T02:08:25.439Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T02:23:25.423Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T02:38:25.425Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T02:53:25.424Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T03:08:25.428Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T03:23:25.425Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T03:38:25.423Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T03:53:25.426Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T04:08:25.427Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T04:23:25.426Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T04:38:25.427Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T04:53:25.425Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T05:08:25.425Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T05:21:54.014Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T05:21:56.290Z - info: [ui] [SignInStore] initializing OAuth flow
2020-05-11T05:21:56.291Z - info: [main] opening in browser: https://github.com/login/oauth/authorize?client_id=de0e3c7e9973e1c4dd77&scope=repo%20user%20workflow&state=b8b91cdf-52b2-498b-8a5b-a4334525b929
2020-05-11T05:21:56.291Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T05:21:56.483Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T05:21:59.998Z - info: [main] Received possible protocol arguments: 5
2020-05-11T05:21:59.998Z - info: [main] Processing protocol url
2020-05-11T05:21:59.998Z - info: [ui] [Dispatcher] requesting authenticated user
2020-05-11T05:22:00.007Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...
2020-05-11T05:22:00.054Z - info: [main] Received possible protocol arguments: 3
2020-05-11T05:22:00.054Z - info: [main] Processing protocol url
2020-05-11T05:22:01.619Z - warn: [ui] fetchAccount: failed with endpoint https://api.github.com
TypeError: Failed to fetch
2020-05-11T05:22:01.620Z - warn: [ui] fetchUser: failed with endpoint https://api.github.com
TypeError: Failed to fetch
2020-05-11T05:22:01.620Z - info: [ui] [SignInStore] error with OAuth flow
TypeError: Failed to fetch
2020-05-11T05:22:01.626Z - info: [ui] [Welcome] kind Authentication is the same as Authentication. ignoring...

@steveward
Copy link
Member

Thanks for sharing the log file. Are you behind a proxy or firewall that could be interfering with authentication in GitHub Desktop? Have you ever previously been able to log in to your account in the app?

@aic75
Copy link

aic75 commented May 20, 2020 via email

@tianyuzhou95
Copy link
Author

tianyuzhou95 commented May 27, 2020

It's strange that I succeeded to log in today, I have never been able to log in before, even with a proxy.
Maybe the problem is due to the Network Setting of my school local net, I guess.

@LadderOperator
Copy link

LadderOperator commented May 28, 2020

It's strange that I succeeded to log in today, I have never been able to log in before, even with a proxy.
Maybe the problem is due to the Network Setting of my school local net, I guess.

Hey, I think I solved the puzzle, and you are right.

I met the same error. The problem was probably caused by the DNS.

After many experiments, I found the DNS automatically obtained from my school local net cannot resolve api.github.com correctly. If you change the DNS to a good one the error should disappear.

Maybe your problem disappeared just because technical support of your school updated the setting.

In case of someone could be confused by similar problems(I searched the issues for a while and found nothing work, really disappointed), I replied this closed issue. Hope that I didn't disturb you~:smile:

@tianyuzhou95
Copy link
Author

tianyuzhou95 commented May 29, 2020

@LadderOperator Great!Your solution is very helpful,if I meet this problem next time,I will try it!

@Ralph68
Copy link

Ralph68 commented May 18, 2021

Testing NextDNS since yesterday, I found connection was blocked by DNSSEC that I checked in YogaDNS config.
Here are an extract from logs that made me find the answer.
[2021.05.18 18:02:26] github.com - process : server=NextDNS (NextDNS), rule=Default [2021.05.18 18:02:26] github.com - reply : type=A discarded because there is no DNSSEC signature
I created an exception for *.github.com and everything works fine now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-info-needed The submitter needs to provide more information about the issue
Projects
None yet
Development

No branches or pull requests

5 participants