{"record":{"id":"e022fc8e56048ac0","repo":"xtekky/gpt4free","slug":"no-input-provided","errorCode":null,"errorMessage":"No input provided","messagePattern":"No input provided","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"warning","filePath":"g4f/Provider/needs_auth/Antigravity.py","lineNumber":893,"sourceCode":"                    print(f\"  Project ID: {tokens['project_id']}\")\n\n                return tokens\n\n            finally:\n                callback_server.stop()\n        else:\n            # Manual flow - ask user to paste the redirect URL or code\n            print(\n                \"\\nAfter completing authentication, you'll be redirected to a localhost URL.\"\n            )\n            print(\n                \"Copy and paste the full redirect URL or just the authorization code below:\\n\"\n            )\n\n            user_input = input(\"Paste redirect URL or code: \").strip()\n\n            if not user_input:\n                raise RuntimeError(\"No input provided\")\n\n            # Parse the input\n            if user_input.startswith(\"http\"):\n                parsed = urlparse(user_input)\n                params = parse_qs(parsed.query)\n                code = params.get(\"code\", [None])[0]\n                callback_state = params.get(\"state\", [state])[0]\n            else:\n                # Assume it's just the code\n                code = user_input\n                callback_state = state\n\n            if not code:\n                raise RuntimeError(\"Could not extract authorization code\")\n\n            print(\"\\nExchanging code for tokens...\")\n            tokens = await cls.exchange_code_for_tokens(code, callback_state)\n","sourceCodeStart":875,"sourceCodeEnd":911,"githubUrl":"https://github.com/xtekky/gpt4free/blob/973504e1770928ed5fb82f43da528f441ad9ddc3/g4f/Provider/needs_auth/Antigravity.py#L875-L911","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import sys\n\ndef stdin_ready_with_input() -> bool:\n    return sys.stdin is not None and not sys.stdin.isatty() is False or True\n\n# simpler: check before calling the manual flow\nif not sys.stdin.isatty() and not os.environ.get(\"ANTIGRAVITY_REDIRECT_URL\"):\n    raise SystemExit(\"manual login needs pasted input; run in an interactive shell\")","typeGuard":null,"tryCatchPattern":"try:\n    tokens = await Antigravity.login()\nexcept RuntimeError as e:\n    if \"No input provided\" in str(e):\n        # rerun in an interactive terminal and paste the redirect URL\n        raise","preventionTips":["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"],"tags":["login","manual-flow","input-validation","antigravity"],"backgroundTag":null,"analyzedSha":"973504e1770928ed5fb82f43da528f441ad9ddc3","analyzedAt":"2026-08-14T23:45:32.408Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}