Unlock seamless workflows and faster delivery with our latest releases – get the details

Troubleshooting access issues to Sanity Studio for team members.

28 replies
Last updated: Jun 28, 2024
Where can someone open a ticket?
Jun 26, 2024, 10:56 PM
I think you have two options:
1. If paid for support - you have access to the team ie can open a ticket
2. Open a new issue in github
Aside from that this channel is a mix of Sanity folks + community support. Not a ticket system, more of a we will try to help you.
Jun 26, 2024, 11:05 PM
You can just ask your questions here.
Jun 26, 2024, 11:13 PM
We're on a legacy Team plan.  Right now when I invite a team member to join the project they can't even access it and get this

 Error: Could not find `source` context
Jun 26, 2024, 11:13 PM
What version of the Studio are you running? What browser does this happen in?
Jun 26, 2024, 11:15 PM
Sanity Studio version 3.40.0Google Chrome Version 125.0.6422.114 (Official Build) (arm64)
Jun 26, 2024, 11:17 PM
For context me as an Admin can access it no problem
Jun 26, 2024, 11:18 PM
but when I try to access our studio url in incognito it gives me this error instead of a login page
Jun 26, 2024, 11:20 PM
Two things: I’d recommend updating to the latest version and making sure that you’re not blocking our auth cookie in your browser.
Jun 26, 2024, 11:23 PM
Hi User, I updated Sanity to version 3.48.1 and I’m not blocking Sanity’s cookie and still invited members get this error after going through the login flow. How can I fix this?
Jun 27, 2024, 4:38 PM
Our issue is pretty much the same as this one
https://www.sanity.io/answers/stuck-on-source-context-error-in-sanity-studio-login-[…]lved-by-identifying-the-usedataset-function-causing-the-crash- Although in our case I don’t see any use of
useDataset
Jun 27, 2024, 4:46 PM
Are the invited members not blocking cookies? Are they using a VPN or firewall?
Jun 27, 2024, 5:03 PM
No, I also sent an invite to myself using another email and got the same error
Jun 27, 2024, 5:04 PM
Not sure if it helps, but I'm experiencing this same issue when trying to udpate my studio packages. My company is a Sanity partner and we have some folks helping to try to fix this, which my be a different case than yours, User. But just in case:1. Are you using a monorepo?
2. Do you have any @types/styled-components in your package.json?
Jun 27, 2024, 5:22 PM
Hey User, no it’s a studio hosted by Sanity and I don’t have any @types/styled-components in my package.json
Thanks though
Jun 27, 2024, 5:26 PM
Got it. I was just asking because we had issues with @types/styled-components and once we removed them it solved it. But we still had problems between mismatching depencies in the monorepo.
Jun 27, 2024, 6:29 PM
user M
Any idea how I can fix this and let team members access the studio?
Jun 27, 2024, 8:49 PM
It sounds to me like a browser issue, which I can’t really diagnose from my end. Especially since you said it works for you in a regular tab but not an incognito one.
Jun 27, 2024, 9:06 PM
But when I send an invite to myself using another email I get the same error and I’m not in incognito mode. It also happens to my people on my team
Jun 27, 2024, 9:08 PM
Does the original account still work for you?
Jun 27, 2024, 9:11 PM
Yes I can access the studio as an admin
Jun 27, 2024, 9:11 PM
What roles do the other accounts that don’t work have?
Jun 27, 2024, 9:12 PM
Both Editor and Administrator get the error
Jun 27, 2024, 9:21 PM
currently nobody except me can access the studio
Jun 27, 2024, 9:32 PM
To me, it still sounds like it may be a browser or cookie issue.
If that’s not it, you’ll need to take a look at your code to see if there are any errors. If this recently started happening, you’ll need to look at your most recent commits to see what you’ve changed.
Jun 27, 2024, 9:40 PM
In case that helps, I think we just figured out what was happening on our end: for some reason, a mismatch between the version of
react
was causing the issue. We had some monorepo apps/packages using
react: 18.2.0
and we had updated the studio to use
react: 18.3.1
. For some reason, this was causing the issue (not sure exactly why)...once we updated all the react versions in the mono to use
react:18.3.1
it worked.
I'd say your problem is probably an issue with one of the peer dependencies of the existing packages. If you want to share your packages with their versions here, I can try to give you some ideas on what you can try on your end.


If it's not a problem for you to delete your
package-lock.json
file
, you can try 1) deleting your lock file, then 2) deleting your
node_modules
and 3) installing all the packages again with
npm install
. This would be a problem for us, since we only had one
pnpm-lock.yaml
file which means it would end up updating other packages in our monorepo..that's why we spent some time trying to figure this out.
Jun 28, 2024, 2:29 AM
Hey
user F
thanks so much for taking the time to look into this! I figured it out and it was a problem in our code with some imports, not a browser or cookie issue. Have a great day!
Jun 28, 2024, 4:19 PM
Excellent! So glad you got it sorted. Thanks for your help
user F
Jun 28, 2024, 4:30 PM
That's great! You're welcome 🤝
Jun 28, 2024, 6:18 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?