login was cancelled in the browser
Error: login was cancelled in the browser
Variants of the message:
Error: timed out waiting for browser confirmation
Error: login was cancelled
tuna login prints this error and exits. No session is saved, and the previous login on the device stays as it was.
Causeโ
tuna login opens a confirmation page in the browser and waits for a response. The login didn't complete:
login was cancelled in the browserโ someone clicked cancel on the confirmation page;timed out waiting for browser confirmationโ the login wasn't confirmed in time: in the browser flow, the CLI waits 5 minutes, and the link for confirming from another device (--no-browser) is valid for a limited time;login was cancelledโ the login was interrupted before confirmation.
A common cause of the timeout is logging in over SSH. The browser confirms the login by redirecting to 127.0.0.1 on the machine where the browser runs, and that redirect never reaches the server. In an SSH session, the CLI warns about this:
WARN[12:00:00] This looks like an SSH session: the browser must run on this machine to finish the login, use `tuna login --no-browser` to confirm it from another device
What to doโ
-
Run
tuna loginagain and confirm the login within 5 minutes. -
Make sure the browser has the dashboard of the right account open.
-
On a server you reached over SSH, log in with a link:
tuna login --no-browserThe CLI shows a link and a code. Open the link on any device where you're signed in to the dashboard and check that the code on the page matches.
-
If there's nowhere to confirm the login in a browser, use an API key:
tuna login --with-api-key.
See Sessions and API keys for details.