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

[Bug]: In long chats, letting the page load in the background causes no messages to be rendered #5185

Closed
1 task done
AetherMagee opened this issue Jan 5, 2025 · 3 comments · Fixed by #5189
Closed
1 task done
Labels
bug Something isn't working

Comments

@AetherMagee
Copy link

What happened?

The main desc is in steps to reproduce, here are some other things I observed:

  1. This bug can also occur normally, without alt-tabbing, althought that appears random and rare
  2. I also observed that pretty much any operation that causes the messages div to update somehow causes this error, which makes the website completely inoperable (all the button handlers are dead, etc)

Steps to Reproduce

  1. Import a long conversation (example - long.json)
  2. Open the conversation and quickly switch to a new tab
  3. Wait for ~15-20 seconds for the convo to load
  4. Open the conversation tab
  5. observe le bug

What browsers are you seeing the problem on?

Chrome, Microsoft Edge, Mobile (Android)

Relevant log output

vendor.9TVOqDrM.js:40 Uncaught RangeError: Maximum call stack size exceeded
    at Ss (vendor.9TVOqDrM.js:40:27132)
    at Lee (vendor.9TVOqDrM.js:40:27903)
    at Ss (vendor.9TVOqDrM.js:40:27591)
    at Lee (vendor.9TVOqDrM.js:40:27706)
    at Ss (vendor.9TVOqDrM.js:40:27591)
    at Lee (vendor.9TVOqDrM.js:40:27706)
    at Ss (vendor.9TVOqDrM.js:40:27591)
    at Lee (vendor.9TVOqDrM.js:40:27706)
    at Ss (vendor.9TVOqDrM.js:40:27591)
    at Lee (vendor.9TVOqDrM.js:40:27706)
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
Ss @ vendor.9TVOqDrM.js:40
Lee @ vendor.9TVOqDrM.js:40
setTimeout
(anonymous) @ vendor.9TVOqDrM.js:76
gre @ vendor.9TVOqDrM.js:76
vz @ vendor.9TVOqDrM.js:76
s @ vendor.9TVOqDrM.js:76
i @ vendor.9TVOqDrM.js:76
dispatch @ vendor.9TVOqDrM.js:76
setData @ vendor.9TVOqDrM.js:76
onSuccess @ vendor.9TVOqDrM.js:76
v @ vendor.9TVOqDrM.js:76
vendor.9TVOqDrM.js:40 Uncaught Error: Minified React error #327; visit https://reactjs.org/docs/error-decoder.html?invariant=327 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at Fee (vendor.9TVOqDrM.js:40:34560)
    at N (vendor.9TVOqDrM.js:25:1535)
    at MessagePort.u (vendor.9TVOqDrM.js:25:1894)
Fee @ vendor.9TVOqDrM.js:40
N @ vendor.9TVOqDrM.js:25
u @ vendor.9TVOqDrM.js:25

Screenshots

image

Code of Conduct

  • I agree to follow this project's Code of Conduct
@AetherMagee AetherMagee added the bug Something isn't working label Jan 5, 2025
@danny-avila
Copy link
Owner

At over 2,300 messages, I recommend forking conversations.

For me it doesn't fail when first mounting this amount of messages, but it does fail on unmounting. I will look into optimizations here.

@danny-avila
Copy link
Owner

danny-avila commented Jan 6, 2025

Made improvement in #5189 that prevents the maximum recursion crash by preventing the message tree from being recalculated more than once on first load.

Your mileage might vary from machine to machine, but this way, I can no longer reliably reproduce the crash. I'm able to load the long conversation (takes a couple of seconds), visit another chat or start a new chat, then go back to the long chat without crashes.

I can even continue the conversation, even if the performance on the page is not great and the AI may take a while to process all the context:

chrome_eFvyNMR1mu

We can make many more improvements here but would need a serious, major refactoring of the current message rendering/branching logic.

It's not out of the question but not in scope at the moment.

@AetherMagee
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants