xtekky/gpt4free · warning · RuntimeError
No input provided
Error message
No input provided
What it means
Manual login flow only: the provider prompts 'Paste redirect URL or code:' on stdin and the user submitted an empty string. Pure input-validation error — nothing about auth is wrong yet.
Source
Thrown at g4f/Provider/needs_auth/Antigravity.py:893
print(f" Project ID: {tokens['project_id']}")
return tokens
finally:
callback_server.stop()
else:
# Manual flow - ask user to paste the redirect URL or code
print(
"\nAfter completing authentication, you'll be redirected to a localhost URL."
)
print(
"Copy and paste the full redirect URL or just the authorization code below:\n"
)
user_input = input("Paste redirect URL or code: ").strip()
if not user_input:
raise RuntimeError("No input provided")
# Parse the input
if user_input.startswith("http"):
parsed = urlparse(user_input)
params = parse_qs(parsed.query)
code = params.get("code", [None])[0]
callback_state = params.get("state", [state])[0]
else:
# Assume it's just the code
code = user_input
callback_state = state
if not code:
raise RuntimeError("Could not extract authorization code")
print("\nExchanging code for tokens...")
tokens = await cls.exchange_code_for_tokens(code, callback_state)
View on GitHub (pinned to 973504e177)
Solutions
- Re-run login and paste the full redirect URL (or at minimum the authorization code) at the prompt.
- If running non-interactively, use the local-callback flow or pipe the value into stdin instead of leaving it empty.
- Copy the complete localhost redirect URL from the browser address bar after consent, not the google.com page.
Defensive patterns
Strategy: validation
Validate before calling
import sys
def stdin_ready_with_input() -> bool:
return sys.stdin is not None and not sys.stdin.isatty() is False or True
# simpler: check before calling the manual flow
if not sys.stdin.isatty() and not os.environ.get("ANTIGRAVITY_REDIRECT_URL"):
raise SystemExit("manual login needs pasted input; run in an interactive shell") Try / catch
try:
tokens = await Antigravity.login()
except RuntimeError as e:
if "No input provided" in str(e):
# rerun in an interactive terminal and paste the redirect URL
raise Prevention
- Run the manual login flow only in an interactive terminal
- In automation, prefer the local-callback flow or pipe the redirect URL via stdin
- Trim pasted input but never submit it empty
When it happens
Trigger: input() returns '' or whitespace after .strip() in the manual branch of the login flow, e.g. user pressed Enter immediately, or stdin was closed/EOF in a scripted/non-interactive context.
Common situations: Running the login flow in a non-interactive shell/CI where stdin is empty; user hitting Enter expecting a browser to open instead of pasting.
Related errors
- Could not extract authorization code
- OAuth callback timed out
- OAuth error: {OAuthCallbackHandler.callback_error}
- Failed to read OAuth credentials from {path}: {e}
- ANTIGRAVITY_SERVICE_ACCOUNT environment variable not set. Pl
AI-assisted analysis of xtekky/gpt4free@973504e177 (2026-08-14).
Data as JSON: /api/errors/e022fc8e56048ac0.
Report an issue: GitHub.