Unable to delete or archive Sanity instances and tokens created through Vercel installation.

9 replies
Last updated: Feb 14, 2024
Hi 🙂 I'm testing out starter installations from Vercel with Sanity connection — where I've got serval errors. So now I have multiple new Sanity instances, which I can't delete or archive. I'm getting the error "Could not delete project". I'm the creator on the project and my role is set to administrator.
The Vercel installation also created some tokens to the projects, and I can't delete these either.

Anybody knows what to do?
AI Update

Good news! I found the exact issue you're experiencing, and there's a simple solution.

The "Could not delete project" error and inability to delete tokens is typically caused by a browser cache issue. Even though you're an administrator on the project, stale session data in your browser can interfere with the delete operations in the Manage interface.

Solution

Try one of these approaches:

  1. Use a private/incognito browser tab - Open manage.sanity.io in a private browsing window and try deleting the projects and tokens again
  2. Clear your browser cache - Clear your browser's cache and cookies, then log back into the Manage interface
  3. Try a different browser - If the above doesn't work, attempt the deletion from a completely different browser

This issue has been confirmed by Sanity support to resolve the problem for users experiencing the exact same symptoms you described.

Why This Happens

When Vercel creates Sanity projects during template installations, it also generates API tokens automatically. Sometimes the browser caches authentication state that conflicts with administrative operations, preventing the deletion even when you have the correct permissions.

Additional Context

According to the Sanity documentation on projects and organizations, to delete a project you need to be an administrator, which you are. The deletion process should work through the Manage interface under your project's Settings, but the cached browser state is what's blocking you.

If the Problem Persists

If clearing your cache doesn't resolve the issue, you can also try using the Sanity CLI, though based on the community thread for this exact issue, the browser cache solution has consistently worked for others experiencing this problem.

For future reference, when testing multiple Vercel starters with Sanity, you might want to use incognito mode from the start to avoid cache-related issues.

👋 Are you deleting through the CLI or in the Manage interface?
Through the Manage interface
Can you try using a private tab or a different browser?
sure — 1 sec
Ahh.. that worked!
So clearing my browser cache would solve this
I’m glad it fixed it!
Thank you so much!!
You’re welcome!

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?