I’m reaching out because we’ve been running into an issue where the Builder drag-and-drop editor works fine locally but does not function in our production deployment on Vercel. I’d like to provide a detailed breakdown of our setup and the troubleshooting steps we’ve already taken so you have full context.
Setup & Environment
-
Framework: Next.js 15.4.5 (App Router)
-
React: 19.1.0
-
Builder SDKs:
-
@builder.io/react@8.2.6
-
@builder.io/sdk-react
for rendering content
-
-
Styling/UI: shadcn/ui components
-
Deployment: Vercel (production + preview)
-
We are embedding Builder inside an iframe using the Preview URL.
The Issue
-
Locally (npm run dev):
-
Builder drag-and-drop editor works correctly.
-
We can add new components and edit existing ones with no problems.
-
-
On Vercel (production):
-
The iframe loads and content renders.
-
However, the drag-and-drop editor is not functional:
- Components display in the editor but cannot be dragged, edited, or rearranged.
-
The Builder editor reports:
-
Iframe evaluation timeout – no response within 10000ms
-
Could not evaluate in iframe
(MobX-related downstream error).
-
-
Debugging Already Done
Step 0: Verified environment & networking
-
Deployment protection and
x-vercel-protection-bypass
secret configured correctly. -
Verified Preview URL works directly in browser.
-
Confirmed no ad-blockers, cookies, or proxy interference.
Code changes made for debugging:
-
Added a minimal playground layout (
src/app/builder-playground/layout.tsx
)-
Stripped out fonts, analytics, global CSS, and wrappers.
-
Only renders the iframe + Builder content.
-
-
Added diagnostic logs (
PlaygroundClient.tsx
):-
Checked
window.Builder
object,builder.apiKey
, environment, user agent. -
All values initialize correctly.
-
-
Refactored Builder initialization:
-
Created
src/lib/builder.ts
to callbuilder.init(NEXT_PUBLIC_BUILDER_API_KEY)
once. -
Imported this at the top of
layout.tsx
. -
Removed duplicate
builder.init
calls from page components.
-
-
Verified Vercel settings:
-
Proxy previews toggled ON/OFF for testing.
-
CSP headers checked.
-
Edge runtime disabled for test builds.
-
Current Status
-
All network/security/CSP issues are now resolved.
-
The app iframe loads with zero network errors.
-
The new root problem is communication between Builder editor and the iframe:
-
The parent window sends “Are you ready?” message.
-
Our app never responds within the 10s timeout.
-
This breaks drag-and-drop, while static rendering still works.
-
-
In short:
-
Builder SDK initializes correctly.
-
Content renders correctly.
-
But the bridge between editor → iframe → SDK never fully handshakes in production.
-
Questions
-
Are there known issues with
@builder.io/react@8.2.6
and Next.js 15 + React 19 in production builds? -
Is there a required placement for
builder.init()
(e.g., must run outside of React lifecycle, or inside a specific client hook) to avoid timeouts? -
Could production tree-shaking or React strict mode affect the iframe handshake timing?
-
Do you recommend additional configuration in Builder Dashboard (e.g., disabling proxy previews, adjusting iframe evaluation settings)?
Next Steps
We are very close — local works perfectly, production is just failing on the iframe handshake.
If you could guide us on best practices for Builder initialization in Next.js 15 App Router and/or any production-specific configuration, that would be extremely helpful.
Thanks in advance for your support — happy to share logs, configs, or even access to our preview deployment if needed.
Best regards,
Sunita Negi
Please fill out as many of the following questions as possible so we can help you promptly! If you don’t know how to answer or it does not apply, feel free to remove it or leave it blank.
Builder content link
e.g. Builder.io: Visual Development Platform
Builder public api key
go to Builder.io: Visual Development Platform and copy your PUBLIC api key
What are you trying to accomplish
e.g. I want to integrate builder on a landing page
Screenshots or video link
Screenshots of your issue, or even better a link to a video of what is happening or what you are trying to accomplish. We love using loom for that sort of thing
Code stack you are integrating Builder with
e.g. NextJS, react, Shopify
Reproducible code example
If you are having integration errors, please link to codesandbox or copy and paste your problematic code here. The more detail the better!