gemini-cli - 💡(How to fix) Fix error [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25993Fetched 2026-04-26 05:24:08
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
labeled ×1

Error Message

│ ℹ Found www-authenticate header from server: Bearer realm="OAuth", error="invalid_token", error_description="Missing or invalid access token" │ │ ℹ Received 401 with www-authenticate header: Bearer realm="OAuth", error="invalid_token", error_description="Missing or invalid access token" │ │ ℹ [MCP error] Failed to handle automatic OAuth for server 'Canva': Authentication cancelled by user. FatalCancellationError: Authentication cancelled by user. │ │ ℹ [MCP error] Error during discovery for MCP server 'Canva': Failed to handle automatic OAuth for server 'Canva' Error: Failed to handle automatic OAuth for server 'Canva' │ │ This is an unexpected error. Please file a bug report using the /bug tool. █│ │ Reason: Error: OAuth callback timeout █│ │ Error: OAuth callback timeout █│ │ ℹ Found www-authenticate header from server: Bearer realm="OAuth", error="invalid_token", error_description="Missing or invalid access token" │ │ ℹ Received 401 with www-authenticate header: Bearer realm="OAuth", error="invalid_token", error_description="Missing or invalid access token" │ │ ℹ [MCP error] Failed to handle automatic OAuth for server 'Canva': Authentication cancelled by user. FatalCancellationError: Authentication cancelled by user. │ │ ℹ [MCP error] Error during discovery for MCP server 'Canva': Failed to handle automatic OAuth for server 'Canva' Error: Failed to handle automatic OAuth for server 'Canva' │ │ This is an unexpected error. Please file a bug report using the /bug tool. █│ │ Reason: Error: OAuth callback timeout █│ │ Error: OAuth callback timeout █│

RAW_BUFFERClick to expand / collapse

What happened?

[ACTION REQUIRED] 📎 PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.

What did you expect to happen?

│ ⚠ Tool with name "mcp_chrome-devtools_upload_file" is already registered. Overwriting. │ │ ⚠ Tool with name "mcp_chrome-devtools_wait_for" is already registered. Overwriting. │ │ ℹ Found www-authenticate header from server: Bearer realm="OAuth", error="invalid_token", error_description="Missing or invalid access token" │ │ ℹ Received 401 with www-authenticate header: Bearer realm="OAuth", error="invalid_token", error_description="Missing or invalid access token" │ │ ℹ 🔐 'Canva' requires OAuth authentication │ │ ℹ MCP context refresh complete. │ │ ℹ Dynamic client registration is supported at: https://mcp.canva.com/register │ │ ℹ Starting OAuth authentication for server 'Canva'... │ │ ℹ OAuth callback server listening on port 44947 │ │ ℹ [MCP error] Failed to handle automatic OAuth for server 'Canva': Authentication cancelled by user. FatalCancellationError: Authentication cancelled by user. │ │ at MCPOAuthProvider.authenticate (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:346765:13) │ │ at async handleAutomaticOAuth (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:347539:5) │ │ at async connectToMcpServer (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:348174:30) │ │ at async McpClient.connect (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:346970:21) │ │ at async file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:348772:15 { │ │ exitCode: 130 │ │ } │ │ ℹ [MCP error] Error during discovery for MCP server 'Canva': Failed to handle automatic OAuth for server 'Canva' Error: Failed to handle automatic OAuth for server 'Canva' │ │ at connectToMcpServer (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:348197:17) │ │ at async McpClient.connect (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:346970:21) │ │ at async file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:348772:15 │ │ ℹ Scheduling MCP context refresh... █│ │ ℹ Executing MCP context refresh... █│ │ ℹ MCP context refresh already in progress, queuing trailing execution. █│ │ ℹ MCP context refresh complete. █│ │ ℹ Coalescing burst refresh requests (300ms delay)... █│ │ ℹ Executing MCP context refresh... █│ │ ℹ MCP context refresh complete. █│ │ ✖ ========================================= █│ │ This is an unexpected error. Please file a bug report using the /bug tool. █│ │ CRITICAL: Unhandled Promise Rejection! █│ │ ========================================= █│ │ Reason: Error: OAuth callback timeout █│ │ Stack trace: █│ │ Error: OAuth callback timeout █│ │ at Timeout._onTimeout (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:346300:33) █│ │ at listOnTimeout (node:internal/timers:605:17) █│ │ at process.processTimers (node:internal/timers:541:7)

Client information

  • CLI Version: 0.39.1
  • Git Commit: 4d73f34139
  • Session ID: ed72f0e0-a0a7-4a78-b042-11c23fc56f98
  • Operating System: linux v25.9.0
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 517.5 MB
  • Terminal Name: Konsole 26.04.0
  • Terminal Background: #232627
  • Kitty Keyboard Protocol: Unsupported

Login information

│ ⚠ Tool with name "mcp_chrome-devtools_upload_file" is already registered. Overwriting. │ │ ⚠ Tool with name "mcp_chrome-devtools_wait_for" is already registered. Overwriting. │ │ ℹ Found www-authenticate header from server: Bearer realm="OAuth", error="invalid_token", error_description="Missing or invalid access token" │ │ ℹ Received 401 with www-authenticate header: Bearer realm="OAuth", error="invalid_token", error_description="Missing or invalid access token" │ │ ℹ 🔐 'Canva' requires OAuth authentication │ │ ℹ MCP context refresh complete. │ │ ℹ Dynamic client registration is supported at: https://mcp.canva.com/register │ │ ℹ Starting OAuth authentication for server 'Canva'... │ │ ℹ OAuth callback server listening on port 44947 │ │ ℹ [MCP error] Failed to handle automatic OAuth for server 'Canva': Authentication cancelled by user. FatalCancellationError: Authentication cancelled by user. │ │ at MCPOAuthProvider.authenticate (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:346765:13) │ │ at async handleAutomaticOAuth (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:347539:5) │ │ at async connectToMcpServer (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:348174:30) │ │ at async McpClient.connect (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:346970:21) │ │ at async file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:348772:15 { │ │ exitCode: 130 │ │ } │ │ ℹ [MCP error] Error during discovery for MCP server 'Canva': Failed to handle automatic OAuth for server 'Canva' Error: Failed to handle automatic OAuth for server 'Canva' │ │ at connectToMcpServer (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:348197:17) │ │ at async McpClient.connect (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:346970:21) │ │ at async file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:348772:15 │ │ ℹ Scheduling MCP context refresh... █│ │ ℹ Executing MCP context refresh... █│ │ ℹ MCP context refresh already in progress, queuing trailing execution. █│ │ ℹ MCP context refresh complete. █│ │ ℹ Coalescing burst refresh requests (300ms delay)... █│ │ ℹ Executing MCP context refresh... █│ │ ℹ MCP context refresh complete. █│ │ ✖ ========================================= █│ │ This is an unexpected error. Please file a bug report using the /bug tool. █│ │ CRITICAL: Unhandled Promise Rejection! █│ │ ========================================= █│ │ Reason: Error: OAuth callback timeout █│ │ Stack trace: █│ │ Error: OAuth callback timeout █│ │ at Timeout._onTimeout (file:///usr/lib/node_modules/@google/gemini-cli/bundle/chunk-7IODYDVE.js:346300:33) █│ │ at listOnTimeout (node:internal/timers:605:17) █│ │ at process.processTimers (node:internal/timers:541:7)

Anything else we need to know?

No response

extent analysis

TL;DR

The issue is likely related to a specific error, and attaching the exported chat history JSON file may help diagnose the problem.

Guidance

  • Check the client version (0.38.2) for any known issues or updates that may resolve the error.
  • Verify that the operating system (darwin v25.9.0) and model version (auto-gemini-3) are compatible with the client version.
  • Review the memory usage (437.5 MB) to ensure it's within expected limits and not causing the error.
  • If comfortable, attach the exported chat history JSON file to the issue for further diagnosis.

Notes

The issue lacks specific details about the error, making it challenging to provide a more targeted solution.

Recommendation

Apply workaround: Attach the exported chat history JSON file to the issue for further diagnosis, as it may help identify the root cause of the error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING