CDN URLs Missing from Referenced Documents - Urgent Production Issue

11 repliesLast updated: Dec 1, 2025

Dear Sanity team,
We are experiencing a serious issue on our audiobook app which seems to be caused by Sanity and is currently preventing all of our users from downloading new audiobooks on the app. For this reason we would really appreciate a quick response.

All of a sudden our cdn downloads don't respond with the entities that we expect, which leads to un-downloadable content for our users.

After lengthy investigations over the weekend we discovered that the illustrations array and the respective illustration object does not contain the cdn url anymore. This means our illustration images can not be resolved.
The references do not work, meaning that anything that is referenced in another document seems to no longer be resolved.

We have not changed anything on our side. We have not changed the Sanity studio version nor the GROQ query. The issue described is happening on both our production and staging apps, on both Android and iOS.

For now we have reached the conclusion that something might have changed on Sanity's side? Has anything GROQ related deprecated? All the other assets can be loaded smoothly.

I hope you understand how urgent and potentially damaging this is for our business - we'd really appreciate some support! Thank you.
AI Update

I completely understand the urgency of this situation - having your users unable to download audiobooks is a critical issue. Let me help you troubleshoot this systematically.

Most Likely Cause: API Version Configuration

Based on your symptoms (references suddenly not resolving, missing CDN URLs in illustration objects), the most probable cause is related to how your Sanity client is configured, particularly around API versioning.

What May Have Changed

If you weren't explicitly setting an apiVersion in your Sanity client configuration, your application may have started defaulting to a newer API version. Sanity uses a date-based API versioning system, and when no version is specified, the behavior can change when new versions are released.

The most recent API version (v2025-02-19, released February 24, 2025) includes a significant change: the default perspective switched from raw to published. Depending on when you're experiencing this issue, this could be relevant - but regardless, the principle remains the same for any API version change.

Immediate Fix Options

Option 1: Explicitly lock to a stable API version (fastest way to restore service):

const client = createClient({
  projectId: 'your-project-id',
  dataset: 'your-dataset',
  apiVersion: '2024-05-01', // or another stable date you know worked
  useCdn: true,
})

Option 2: Explicitly set the perspective to raw:

const client = createClient({
  projectId: 'your-project-id',
  dataset: 'your-dataset',
  apiVersion: '2024-05-01', // use a specific version
  perspective: 'raw', // explicitly request all content including drafts
  useCdn: true,
})

Additional Troubleshooting Steps

Why References Might Not Resolve

The Image Pipeline serves images through cdn.sanity.io URLs that are constructed from asset references. When references don't resolve properly, the asset object (which contains the url field) won't be included in your query results. This typically happens when:

Next Steps

The fix should be a quick configuration change that you can deploy across all platforms. Since you mentioned this is affecting both production and staging identically, and you haven't changed anything on your side, this strongly suggests an API version or configuration issue rather than a code bug.

Please try these fixes and let me know if this resolves the issue. If not, share your GROQ query and client configuration (with sensitive data removed) so we can dig deeper!

Show original thread
11 replies

Was this answer helpful?

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.

Related contributions