Issue with portable text causing crashes in Sanity Studio 3.29.0
Good news! This was a known bug in Sanity Studio 3.29.0 that was quickly identified and fixed. The solution is to upgrade to version 3.29.1 or later.
This was a regression introduced in version 3.29.0 that caused a maximum call stack error when using portable text/block arrays. The error manifested as RangeError: Maximum call stack size exceeded at getRandomValues, and it would crash the Structure tool whenever you tried to open a document containing a block array field.
As you can see from the community thread I found, multiple developers reported this exact issue on February 14, 2024, and the Sanity team identified and released a fix the same day.
To fix this issue:
npm install sanity@latest
# or
yarn add sanity@latestThen restart your dev server. The fix was released in version 3.29.1, so updating to that version or any later version will resolve the problem.
Your schema is perfectly fine - there's nothing wrong with how you've defined your block array:
{
name: 'content',
type: 'array',
title: 'Content',
of: [
{
type: 'block'
}
]
}This was purely a bug in that specific Studio version that affected all portable text implementations, regardless of configuration. The Sanity team was incredibly responsive, pushing out version 3.29.1 within hours of the reports coming in.
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.