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?