gatsbyjs/gatsby · error
We had trouble connecting to Gatsby Cloud to create a login
Error message
We had trouble connecting to Gatsby Cloud to create a login session. Please try again later, and if it continues to have trouble connecting file an issue.
What it means
Thrown by `createTicket` in the Gatsby Cloud login flow when the `POST https://auth.gatsbyjs.com/auth/tickets/create` request fails (network error, non-2xx response, or JSON parse failure). The login flow needs a ticket id to start the browser-based session, so without it the CLI aborts via `reporter.panic`.
Source
Thrown at packages/gatsby-cli/src/login.ts:24
interface ITicket {
verified: boolean
token?: string | null
expiration?: string | null
}
const createTicket = async (): Promise<string> => {
let ticketId
try {
const ticketResponse = await fetch(
`https://auth.gatsbyjs.com/auth/tickets/create`,
{
method: `post`,
}
)
const ticketJson = await ticketResponse.json()
ticketId = ticketJson.ticketId
} catch (e) {
reporter.panic(
`We had trouble connecting to Gatsby Cloud to create a login session.
Please try again later, and if it continues to have trouble connecting file an issue.`
)
}
return ticketId
}
const getTicket = async (ticketId: string): Promise<ITicket> => {
let ticket: ITicket = {
verified: false,
}
try {
const ticketResponse = await fetch(
`https://auth.gatsbyjs.com/auth/tickets/${ticketId}`
)
const ticketJson = await ticketResponse.json()
ticket = ticketJsonView on GitHub (pinned to 8b06340921)
Solutions
- Check connectivity to `https://auth.gatsbyjs.com` (curl/browser).
- Configure/whitelist the proxy: set `HTTPS_PROXY` and ensure the host is allowed.
- Retry later if the auth service is experiencing an outage.
- If the issue persists, file the issue referenced in the message.
Defensive patterns
Strategy: retry
Validate before calling
async function canReachAuth(): Promise<boolean> {
try { const r = await fetch('https://auth.gatsbyjs.com', { method: 'HEAD' }); return r.ok || r.status < 500 } catch { return false }
} Try / catch
let ticketId
for (let attempt = 1; attempt <= 3; attempt++) {
try { ticketId = await createTicket(); break } catch (e) { if (attempt === 3) throw e; await new Promise(r => setTimeout(r, 1000 * attempt)) }
} Prevention
- Ensure outbound network access to `auth.gatsbyjs.com`.
- Configure `HTTPS_PROXY` correctly in restricted networks.
- Retry during transient outages before filing an issue.
When it happens
Trigger: `gatsby login` invokes `createTicket`, which `fetch`-es the auth endpoint. If DNS/routing fails, the request times out, a proxy blocks it, the auth service is down, or the response body is not valid JSON containing `ticketId`, the catch block panics.
Common situations: No internet or restricted corporate proxy/firewall blocking `auth.gatsbyjs.com`; auth service outage; misconfigured `HTTPS_PROXY`/`HTTP_PROXY`; running in an environment without outbound network (CI sandbox).
Related errors
- Something went wrong when trying to add the plugins to the p
- Source GraphQL API: HTTP error ${response.status} ${response
- response.statusText
- Could not find the file specified in the Link header `${head
- {"fetchError":"Could not fetch ${pathOrUrl} from official re
AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13).
Data as JSON: /api/errors/15594c68f21d16f5.
Report an issue: GitHub.