Skip to content
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

Streamable object crashes on client side after 2s of streaming in production only #1910

Closed
aaronvg opened this issue Jun 11, 2024 · 2 comments
Labels
ai/rsc bug Something isn't working

Comments

@aaronvg
Copy link

aaronvg commented Jun 11, 2024

Description

Check out this sample project, and click on the RAG example: https://github.com/BoundaryML/baml-examples/tree/main/nextjs-starter . Locally it works completely fine, but after deploying to vercel, clicking on the "answer question" button to start streaming will crash with a client-side error after 2 secs of streaming, saying that it can't construct a URL.

All you need is an OPENAI_API_KEY to test.

Code example

No response

Additional context

No response

@aaronvg
Copy link
Author

aaronvg commented Jun 11, 2024

tried with 14.2.0, and now with nextjs15, same crash.

@lgrammel lgrammel added bug Something isn't working ai/rsc labels Jun 11, 2024
@aaronvg
Copy link
Author

aaronvg commented Jun 11, 2024

I found the issue -- when rendering a Link with a partial string response (while it's streaming), the url is invalid. I now only render links when the stream is complete.

Although super weird i only saw this in production.

@aaronvg aaronvg closed this as completed Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/rsc bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants