gemini exits during Web auth (firewall)
OS: Windows11 After I clicked "Sign In," the CLI exited after a while, before the web page could respond.
Notice that this is not related to the click action. I typed gemini and then jumped to my browser, and simply waiting. The CLI still exited.
same
I'm in the same boat. Can't log in at all.
same, I've tried many times in Chrome or Safari. Can't log in. OS: Mac OS
Can't see any logs.
Do you see any gemini logs in your temp dir? It should have a name that starts with "gemini-client-error".
@scidomino I suspect that the issue is related to the IP and proxy environment. The people experiencing the problem are mostly from mainland China, haha.
Not being able to log in with web auth when operating remotely is a known limitation documented here: https://github.com/google-gemini/gemini-cli/issues/1439. This bug should only be for people who are seeing the program crash and exit while the web login step is happening.
same issue
start command HTTPS_PROXY=http://127.0.0.1:7897 gemini --debug
Clearcut POST request error: AggregateError [ETIMEDOUT]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7) {
code: 'ETIMEDOUT',
[errors]: [
Error: connect ETIMEDOUT 2001:4860:4802:38::223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '2001:4860:4802:38::223',
port: 443
},
Error: connect ETIMEDOUT 216.239.38.223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '216.239.38.223',
port: 443
},
Error: connect ETIMEDOUT 2001:4860:4802:34::223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '2001:4860:4802:34::223',
port: 443
},
Error: connect ETIMEDOUT 216.239.36.223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '216.239.36.223',
port: 443
},
Error: connect ETIMEDOUT 2001:4860:4802:32::223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '2001:4860:4802:32::223',
port: 443
},
Error: connect ETIMEDOUT 216.239.32.223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '216.239.32.223',
port: 443
},
Error: connect ETIMEDOUT 2001:4860:4802:36::223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '2001:4860:4802:36::223',
port: 443
},
Error: connect ETIMEDOUT 216.239.34.223:443
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '216.239.34.223',
port: 443
}
]
}
=========================================
CRITICAL: Unhandled Promise Rejection!
=========================================
Reason: AggregateError [ETIMEDOUT]:
at internalConnectMultiple (node:net:1139:18)
at afterConnectMultiple (node:net:1712:7) {
code: 'ETIMEDOUT',
[errors]: [
Error: connect ETIMEDOUT 2001:4860:4802:38::223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '2001:4860:4802:38::223',
port: 443
},
Error: connect ETIMEDOUT 216.239.38.223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '216.239.38.223',
port: 443
},
Error: connect ETIMEDOUT 2001:4860:4802:34::223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '2001:4860:4802:34::223',
port: 443
},
Error: connect ETIMEDOUT 216.239.36.223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '216.239.36.223',
port: 443
},
Error: connect ETIMEDOUT 2001:4860:4802:32::223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '2001:4860:4802:32::223',
port: 443
},
Error: connect ETIMEDOUT 216.239.32.223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '216.239.32.223',
port: 443
},
Error: connect ETIMEDOUT 2001:4860:4802:36::223:443
at createConnectionError (node:net:1675:14)
at Timeout.internalConnectMultipleTimeout (node:net:1734:38)
at listOnTimeout (node:internal/timers:596:11)
at process.processTimers (node:internal/timers:529:7) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '2001:4860:4802:36::223',
port: 443
},
Error: connect ETIMEDOUT 216.239.34.223:443
at createConnectionError (node:net:1675:14)
at afterConnectMultiple (node:net:1705:16) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '216.239.34.223',
port: 443
}
]
}
Stack trace may follow:
Diagnostic Information
- CLI Version: 0.1.1
- Git Commit: 852210e1 (local modifications)
- Operating System: darwin v22.13.0
- Sandbox Environment: no sandbox
- Model Version: gemini-2.5-pro
- Memory Usage: 184.2 MB
FYI, hope can help you
Great firewall or not, no one should be seeing "CRITICAL: Unhandled Promise Rejection!" errors. I'll look into that.
Encountering the same problem
Using and configuring your proxy tool to TUN mode can temporarily solve this problem
Marking this as a duplicate of 1425 even though the presentation is slightly different. The root cause seems to be firewalls interfering with communicating with the inference server.
On second though. Reopening this since the root cause in the other one might be different.
To be clear: Gemini is not available to users in China. This bug is to have a friendlier error message when we can't log in.
记得在终端使用代理。
Remember to use the proxy in the terminal, change it to your proxy port 👇
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
We overhauled error reporting recently and that improved how these errors are displayed.
Found possible duplicate issues:\n\n- #4487: (0.9076157212257385)\n- #1733: (0.9061883687973022)\n\n