Docs › Troubleshooting › Sign-in problems

Sign-in problems

Fix a sign-in that never finishes, a browser page that will not load, a pasted code that is refused, and being signed out.

On this page

Signing in opens your browser, you approve, and the browser hands a one-time answer back to the editor on 127.0.0.1, this computer. Most problems are that hand-back failing, and the fix is to sign in with a code instead. How sign-in works is on Signing in.

The browser shows 127.0.0.1 refused to connect

The editor shows The editor stopped waiting for the browser sign-in. If the browser now shows a 127.0.0.1 page that will not load, that is why.

Cause: the editor waits 30 minutes for the browser, and you approved after that, so nothing was listening any more.

  1. Close the browser tab.
  2. Choose Sign in again on the warning. You are already signed in on the site, so it takes one click in the browser.
  3. If the page still will not load, choose Use a code instead and follow the next section.

Sign-in never finishes on a remote machine or in a container

Cause: in a Remote SSH, WSL, Codespaces or dev container window, or on a locked-down machine, the browser cannot reach 127.0.0.1 on the machine the editor runs on. Sign in with a code: the browser shows a code and you paste it into the editor. In a remote window the editor offers this on its own.

  1. Run AstraCode: Sign In. Elsewhere, wait for Still waiting for your browser. If it cannot reach this computer, sign in with a code instead. (about 45 seconds) and choose Use a code instead.
  2. In the browser, approve the sign-in on Sign in to AstraCode desktop.
  3. The page Paste this code into AstraCode shows a code. Choose Copy.
  4. Paste it into the editor's box, Approve the sign-in in your browser, then paste the code it shows., and press Enter.
  5. The editor says Signed in to AstraCode.

Paste the code only into an AstraCode you started yourself, just now. AstraCode never asks for it by email, chat or on any other website.

The pasted code is not accepted

The editor shows That sign-in code is not valid. Start again from the editor. or That code was not accepted., followed by A code works once, for five minutes.

Cause: the code was already used, is more than five minutes old, or came from an earlier attempt.

  1. Choose Try again. A new browser page opens with a new code.
  2. Copy the newest code and paste it within five minutes. Line breaks and spaces in what you paste are ignored.

Sign-in was declined in the browser

The editor shows Sign-in was declined in the browser, so AstraCode is still signed out. or The site did not accept that sign-in, so AstraCode is still signed out. The browser may show Sign-in was refused. You can close this tab.

Cause: the sign-in was refused on the site, or the account could not sign in.

  1. Choose Try again on the warning.
  2. On Sign in to AstraCode desktop, check the account shown. To use another, choose or sign in with another account.
  3. Choose Sign in.

Sign-in did not finish

The editor shows Sign-in did not finish, so AstraCode is still signed out., or an error such as Could not reach the gateway to finish signing in. or Sign-in failed. Start again from the editor.

Cause: the last step, when the editor turns the browser's answer into a session, could not reach AstraCode or was refused.

  1. Check that this machine can reach api.astracode.io. A VPN or corporate proxy may be blocking it.
  2. If you run your own gateway, check astracode.gatewayUrl in AstraCode Settings > Browser & Network > Gateway.
  3. Choose Try again, or run AstraCode: Sign In.

The account service could not be reached. Try again shortly. means the problem is on our side; wait a moment and sign in again.

You pressed Cancel in the browser and the editor keeps waiting

Cause: Cancel on the browser page does not tell the editor, so it keeps waiting.

  1. In the editor, choose Cancel on the Signing in to AstraCode in your browser notification.
  2. Run AstraCode: Sign In again when you are ready.

The browser asks you to verify your email

Cause: a new account has to confirm its email before it can sign in to the editor.

  1. Open the email from AstraCode and confirm your address.
  2. Continue in the browser. It returns to Sign in to AstraCode desktop.

The browser shows That link did not come from AstraCode., Malformed sign-in link or Unrecognised redirect.

Cause: the page was opened from an old or edited link, not from the editor that is signing in.

  1. Close the tab.
  2. Start again from the editor with AstraCode: Sign In.

That sign-in answer came from a different server than the one AstraCode asked, so it was not used. means the answer came from somewhere other than your gateway. Check astracode.gatewayUrl, then sign in again.

You are signed out, or the sign-in window keeps coming back

Requests fail with You are signed out, the send button reads Log in, or the sign-in window covers the editor again.

Cause: a session lasts 36 hours and the editor renews it on its own before then. It is ended only when AstraCode refuses it: the session expired while the editor was closed for a long time, it was ended on the site, or the account changed. Being offline never signs you out.

  1. Choose Log In on the sign-in window, or run AstraCode: Sign In.
  2. Approve in the browser.

The send button's tooltip The gateway rejected this token. Log in again means the stored session was refused; signing in again replaces it.

The gateway rejected this token after Sign In with a Token

The model picker or composer says The gateway rejected this token. Run "AstraCode: Sign In" again.

Cause: AstraCode: Sign In with a Token stores whatever you paste without checking it. It is for organisations that run their own gateway and issue their own tokens.

  1. If you do not run your own gateway, run AstraCode: Sign In instead.
  2. If you do, ask your gateway's operator for a new token and paste it again.

Signed in to the wrong account

  1. Open AstraCode Settings > General and choose Log out, then Log Out to confirm.
  2. Run AstraCode: Sign In.
  3. On Sign in to AstraCode desktop, choose or sign in with another account.

Signing in from the CLI

astracode-agent has its own session and its own messages. See CLI problems.

← Troubleshooting Install and update problems →

All documentation

Get started

Using the editor

Agent

Context

Workspaces

Connectors

Extending AstraCode

CLI

Account and usage

Troubleshooting

Reference