gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

[API Error: Converting circular structure to JSON

Open jeffery9 opened this issue 1 year ago • 8 comments

What happened?

✕ [API Error: Converting circular structure to JSON --> starting at object with constructor 'HttpsProxyAgent' | property 'sockets' -> object with constructor 'Object' | property 'cloudcode-pa.googleapis.com:443:::::::::::::::::::::' -> object with constructor 'Array' | ... | property '_httpMessage' -> object with constructor 'ClientRequest' --- property 'agent' closes the circle]

What did you expect to happen?

no error

Client information

  • CLI Version: 0.1.12
  • Git Commit: b29c02dd (local modifications)
  • Operating System: darwin v24.3.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-2.5-pro
  • Memory Usage: 180.1 MB

Login information

No response

Anything else we need to know?

No response

jeffery9 avatar Jul 16 '25 11:07 jeffery9

same problem

CLI Version 0.1.12 │ │ Git Commit b29c02dd (local modifications) │ │ Model gemini-2.5-pro │ │ Sandbox no sandbox │ │ OS darwin │ │ Auth Method OAuth

jax-max avatar Jul 16 '25 11:07 jax-max

This should have been fixed in https://github.com/google-gemini/gemini-cli/pull/4150

Can either of you @jeffery9 @jax-max try using latest code and see if you encounter issue still?

npx https://github.com/google-gemini/gemini-cli

jackwotherspoon avatar Jul 16 '25 12:07 jackwotherspoon

Based on the Git commit for both users above, they are using versions of Gemini CLI that pre-dates the fix, so upgrading to latest code should resolve the issue 👍

jackwotherspoon avatar Jul 16 '25 12:07 jackwotherspoon

Going to close but please comment if you are still seeing this on latest code and I will re-open 😄

jackwotherspoon avatar Jul 16 '25 12:07 jackwotherspoon

Going to close but please comment if you are still seeing this on latest code and I will re-open 😄

I’ve only sent under 40 requests,, so it's highly unlikely that I've reached the daily quota and I still got this ERROR

Image

JGPliskin avatar Jul 16 '25 15:07 JGPliskin

@JGPliskin the error in this issue is unrelated to quota...

jackwotherspoon avatar Jul 16 '25 15:07 jackwotherspoon

This should have been fixed in #4150

Can either of you @jeffery9 @jax-max try using latest code and see if you encounter issue still?

npx https://github.com/google-gemini/gemini-cli

LGTM , thanks !

jax-max avatar Jul 16 '25 15:07 jax-max

@JGPliskin the error in this issue is unrelated to quota...

npx https://github.com/google-gemini/gemini-cli I'm using the latest client, and it reminds me that I’ve reached the quota. If I continue, it says it will switch to Flash. but when I try to run Gemini without updating, it keeps throwing this '[Converting circular structure to JSON]' error.

Image

JGPliskin avatar Jul 16 '25 16:07 JGPliskin