Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Error users/me?tag=sanity.studio.users.get-current #1615

Open
justincavery opened this issue Jun 27, 2024 · 2 comments
Open

Request Error users/me?tag=sanity.studio.users.get-current #1615

justincavery opened this issue Jun 27, 2024 · 2 comments

Comments

@justincavery
Copy link

I've just gone through the steps of adding the studio to an existing project from here https://www.sanity.io/get-started?ref=navbar and doing npm create sanity@latest -- --project ew7rp6z0 --dataset production --provider google

When I load up the sanity studio at localhost:3001/studio I get the following error

Error: Request error while attempting to reach is https://ew7rp6z0.api.sanity.io/v2021-06-07/users/me?tag=sanity.studio.users.get-current
httpRequester/xhr.onerror@webpack-internal:///(app-pages-browser)/./node_modules/get-it/dist/index.browser.js:184:7

The logs show

 ✓ Compiled in 7.4s (4531 modules)
 GET /studio 200 in 214ms
 GET /favicon.ico 200 in 24ms

I also tried just doing yarn add @sanity/cli and then yarn sanity init --project ew7rp6z0 --dataset production --provider google but I'm ending up with the same thing.

I've confirmed that I'm logged in with the right user, and I've added the local host to the CORS (with the port).

I've also deployed this to vercel on a deployment link, added the link to the Sanity CORS, created a new admin user using a different email address, logged into Sanity on a new browser with the new email address and tried to visit the site again, same error.

@pixel-toys-chris-evans
Copy link

Did you ever get this resolved?

@justincavery
Copy link
Author

Did you ever get this resolved?

From memory it had something to do with me including https:// on the local host when it was in fact only http://

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants