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

Document streaming: Maximum update depth exceeded #639

Closed
ctjlewis opened this issue Dec 19, 2024 · 7 comments
Closed

Document streaming: Maximum update depth exceeded #639

ctjlewis opened this issue Dec 19, 2024 · 7 comments

Comments

@ctjlewis
Copy link

ctjlewis commented Dec 19, 2024

Reporting same issue as #589. Actually very hard to debug, can't tell where the loop is coming from or how to break it. The stream gets passed from useChat() to <BlockStreamHandler> and somewhere along the line it apparently loops.

Screenshot 2024-12-18 at 6 05 24 PM

  • It happens whenever you have the document open and it is being written for the first time. I don't know if it happens for edits.
  • If you use experimental_throttle in useChat, you can avoid it somehow, or the layout doesn't jank - but then chunks are missed (which is confusing, I'd think that would just space the chunks out).

It is a pretty big issue with the template, and the template/layout is not really stable until this is fixed. I've tried to debug it for a few days but ultimately would be fastest for original authors to find the leak. Aside from that, it's beautiful and I'm shocked this supports documents/canvas now, very helpful. I'm just streaming document output to regular message boxes for now to work around this.

cc @jeremyphilemon

@MEESKON
Copy link

MEESKON commented Dec 19, 2024

Agree, please fix. Before this is fixed the template is unusable.

@athrael-soju
Copy link

@ctjlewis since this is already mentioned here: #589 there's no need for a duplicate. Can you please update that one instead?

@ctjlewis
Copy link
Author

@athrael-soju It's two weeks old, so I intentionally re-raised the issue as a duplicate.

@jeremyphilemon
Copy link
Collaborator

@ctjlewis thanks for reporting this issue! this should've been fixed in #637 – can you confirm?

@ctjlewis
Copy link
Author

Let me clone and verify, I'll self-close for you, thanks so much.

@ctjlewis
Copy link
Author

ctjlewis commented Dec 20, 2024

@jeremyphilemon This is absolutely fixed, just tested deploy flow, really good work. #589 is the original issue.

@MEESKON
Copy link

MEESKON commented Dec 23, 2024

Thankyou @jeremyphilemon !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants