-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Streamable UIs Disappear in Production Builds When Calling .done() #1558
Comments
confirming this on nextjs 14.2.3 |
Same here. I should also add that nested streamable UIs were working in Next.js 14.1.3 |
Same issue with AI 3.1.9 and Next 14.2.2. My product is not yet on production, so that's OK, but that's bummer if you rely on this feature 😅 I hope there will be a fix soon. Let us know if we can provide more details. |
Same thing here... locally it works fine not sure what the issue is. If someone is willing to drop a hint I'd be welcome to help take a look |
This issue has been fixed in React, and will be provided with the upcoming Next.js release. You can verify that in your repro with these commands: npm add ai zod next@canary react@beta react-dom@beta --legacy-peer-deps
npm run build && npm start Reference:
Related: |
Thank you so much! You're a hero 🫡 |
Thanks @unstubbable, that's awesome. Can you point to the Next.js release that we'll have to upgrade to? Will it be 14.3.0 or a minor release of 14.2? |
Just looking in from the outside, it appears that the team is currently in the process of preparing the release of Next.js 15, which will include React 19. The aforementioned React fixes have been integrated here: vercel/next.js#65058 |
hey @unstubbable i actually tested by upgrading to your suggested versions
however, this not only doesn't solve it, the issue now appears locally.. 🤔 any ideas here? |
Did you test it with https://github.com/amcclure-super/ai-streamableUI, or somewhere else? |
I tested in my own app based on https://github.com/vercel/ai-chatbot where i'm using function_calling to call external APIs to get back a response. Does it have to be the repo above? |
No, but if the update doesn't help your case it's possible that you have a different situation. In this case it might make sense to create a separate issue with your own minimal reproduction. |
I'm still a bit confused with this one. Should we wait for Next.js 15 to be released or is there a suitable workaround for this? It's still in the docs, so it's supposedly supported, right? |
OK so it seems to work on AI SDK 3.1.x. But when you upgrade to 3.2.x, it breaks again. Any ideas how we can fix that? That's quite annoying as it's in the docs, it's working fine locally and breaks only when deploying to production... |
Are you running next release candidate @lionelrudaz ? 3.2.x is working for me in production |
Hey @amcclure-super, no I'm using Next 14.2.4. I had to specify this version as it was working with it. What's your Next version? |
I'm trying to upgrade to 3.3.3, and I still have exactly the same issue. Upgraded to Next 14.2.5, still the same. You can see it live on my test server: https://release.tasters.ch/ Tell me if you need me to share some pieces of code. |
Just updated to Next 14.2.13 and to AI SDK 3.4.2 and it's still doesn't work. Does that mean we'll have to wait for Next 15 to go out in production? |
Description
When nesting createStreamableUI values inside another createStreamableUI, the final result disappears in production builds. The issue does not surface in local development.
Here is a reproducible example which works in dev but not after running
pnpm build
: https://github.com/amcclure-super/ai-streamableUIHere are a couple videos. The first video in a dev build shows that the values do not disappear after marking ui.done(). The second video shows the values disappearing after ui.done() is called in a production build.
In dev, the UI does not disappear after ui.done():
2024-05-10.16-27-27.mp4
In a production build, the UI disappears after ui.done() is called:
2024-05-10.16-28-35.mp4
Code example
Full repo: https://github.com/amcclure-super/ai-streamableUI
Relevant code:
The text was updated successfully, but these errors were encountered: