Sanity Studio stuck on "loading items" after fresh install

18 replies
Last updated: Mar 16, 2021
Hi! I am trying to get started with Sanity for the first time, and haven't been able to get the studio to work yet. I did a clean install with the cli and used the "blog" schema template. I ran sanity start right away and everything seemed to spin up correctly. I was able to go to the desk at localhost:3333 but when I click on a content type, it just says "loading items" indefinitely and I am unable to add new items. I tried a clean install and then I tried another clean install without the blog schema template -- same thing each time. Does anyone else have any advice on this? I'm about ready to move on to a different CMS, which is too bad because Sanity seems cool 😞
AI Update

Don't give up on Sanity just yet! This "loading items" issue is almost always a CORS configuration problem, and it's super easy to fix. Here's what's happening and how to solve it:

The Problem

When you run sanity start locally, your Studio is trying to fetch data from Sanity's cloud APIs, but your browser is blocking these requests because http://localhost:3333 (or whatever port you're using) isn't registered as an allowed origin in your project settings.

The Solution

You need to add your localhost URL to your project's CORS origins:

  1. Go to manage.sanity.io
  2. Select your project
  3. Navigate to Settings → API → CORS Origins
  4. Click Add CORS origin
  5. Enter http://localhost:3333 (use the exact port number you see in your terminal)
  6. Important: Check the "Allow credentials" checkbox
  7. Click Save

That's it! Refresh your Studio and you should see your content types load properly.

Why This Happens

Sanity Studio runs in your browser and makes API calls to Sanity's cloud. For security reasons, browsers block cross-origin requests unless the server (Sanity) explicitly allows them. Fresh projects don't have localhost configured by default, so you need to add it manually. The CORS Origins feature is a security configuration that controls which domains can access your Sanity project data with credentials.

Additional Tips

  • If you change ports (like localhost:3000), you'll need to add that as a separate CORS origin
  • When you deploy your Studio to production, you'll need to add that domain too
  • Make sure to include the protocol (http:// or https://) - it matters!
  • The "Allow credentials" checkbox is required for authenticated requests, which Studio uses

This is one of the most common "gotchas" for new Sanity users, so you're definitely not alone. Once you've added the CORS origin, everything should work smoothly. Let us know if you're still having issues after adding the CORS origin!

Show original thread
18 replies
Hi User. Sorry to hear there’s been some trouble getting started! Were there any error messages worth noting—either in the bottom-right corner or in your Developer Tools?
Nope! Nothing in chrome developer console or terminal
Would you be comfortable trying something in the terminal?
Yep!
If you go to your studio directory and run
sanity documents create
, you should get something like this:

{
  "_id": "c9d4c90b-c053-4e6b-8bd8-0d48a49cf7ac",
  "_type": "specify-me"
}
Set the
_type
to a document type that’s in your schema. Could be post, author, etc.
When you save the file, I’m curious to know if you get a “Created” response back with the
_id
.
Would that response come in the terminal window? Not seeing anything
Hang on, I had to close the text window. Got an id back
Yes, the response would normally come back in the terminal after having saved the file.
yep got an idea, had to close the file first
*id
Okay, that’s a good sign that you can interact via the CLI.
Could you try running
sanity logout && sanity login
, then
sanity start
again and see if that helps. I’m not confident it’ll solve the problem but at least we can tick it off.
aha!
That seems to have worked
Hey! Nice!
Thank you for helping out!
Strange though
Any time! Enjoy getting started and thanks for sticking it out. 🙂

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?