📆 Don't miss our Sanity Showcase virtual meetup on March 20th!

Session mismatch error solved by generating new token

3 replies
Last updated: Apr 26, 2020
I have stumble upon a weird bug about my session not matching project host. Anyone knows why? I have used
sanity logout
and
sanity login
and it still doesn’t work
Error: Session does not match project host
    at Object.getRemoteGraphQLSchema (.../node_modules/gatsby-source-sanity/lib/util/remoteGraphQLSchema.js:25:15)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Apr 26, 2020, 7:23 PM
It sounds like you're using a token that is generated for a different project than what you've configured for Gatsby
Apr 26, 2020, 7:54 PM
Eg the token was generated for project
abc123
but the Gatsby configuration tells it to use project
xyz987
Apr 26, 2020, 7:55 PM
Ah, seems I have mixed up the tokens from different sites. It is solved by generating new token. Thank you for the help!
Apr 26, 2020, 7:58 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?

Related contributions

Turbo Start Sanity
- Template

The battle-tested Sanity template that powers Roboto Studio's websites

Go to Turbo Start Sanity

Schema UI - Next.js Sanity Starter
- Template

A Next.js starter template with Next.js 15, Tailwind CSS, shadcn/ui, and Sanity CMS with Live Editing. Get production-ready React components with matching Sanity schemas and queries. Build dynamic pages faster while keeping full control over customization.

Serge Ovcharenko
Go to Schema UI - Next.js Sanity Starter

The Swaddle
- Made with Sanity

A new brand identity to represent a more mature company, to signify The Swaddle’s evolution from publisher to production house, combined with an easier to navigate platform that can surface multiple content types - drawing readers through The Swaddle’s content offering.

Nightjar
Go to The Swaddle