Error: Maximum update depth exceeded. #88

Open
opened 2026-02-15 19:15:49 -05:00 by yindo · 4 comments
Owner

Originally created by @cognitiveRobot on GitHub (Oct 27, 2024).

Originally assigned to: @thucpn on GitHub.

I am building an RAG application and the following error is blocking my deployment.
Error message received:

react-dom.development.js:26793 Uncaught (in promise) Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
    at throwIfInfiniteUpdateLoopDetected (react-dom.development.js:26793:11)
    at getRootForUpdatedFiber (react-dom.development.js:7627:3)
    at enqueueConcurrentRenderForLane (react-dom.development.js:7549:10)
    at forceStoreRerender (react-dom.development.js:12049:14)
    at handleStoreChange (react-dom.development.js:12028:7)
    at eval (index.mjs:155:42)
    at Array.setter (index.mjs:456:21)
    at eval (index.mjs:141:25)
    at mutateByKey (index.mjs:399:21)
    at internalMutate (index.mjs:302:12)
    at eval (index.mjs:380:76)
    at onUpdate (index.mjs:260:7)
    at processDataProtocolResponse (index.mjs:939:5)
    at async callChatApi (index.mjs:1031:14)
    at async getStreamedResponse (index.mjs:222:10)
    at async processChatStream (index.mjs:1243:42)
    at async eval (index.mjs:338:9)

Set up details:

Next.js 14.2.14
"@llamaindex/core": "^0.2.6"
"ai": "3.3.42",
"ajv": "^8.12.0",

Model: `llama-3.1-8b-instant` 
Model Provider: `qroq`.

To reproduce:

  1. Run npx create-llama@latest from v0.3.8
  2. Follow default setup with python back-end.
  3. Send query couple of times.

Can you please help me to fix the issue?

Originally created by @cognitiveRobot on GitHub (Oct 27, 2024). Originally assigned to: @thucpn on GitHub. I am building an RAG application and the following error is blocking my deployment. `Error` message received: ``` react-dom.development.js:26793 Uncaught (in promise) Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops. at throwIfInfiniteUpdateLoopDetected (react-dom.development.js:26793:11) at getRootForUpdatedFiber (react-dom.development.js:7627:3) at enqueueConcurrentRenderForLane (react-dom.development.js:7549:10) at forceStoreRerender (react-dom.development.js:12049:14) at handleStoreChange (react-dom.development.js:12028:7) at eval (index.mjs:155:42) at Array.setter (index.mjs:456:21) at eval (index.mjs:141:25) at mutateByKey (index.mjs:399:21) at internalMutate (index.mjs:302:12) at eval (index.mjs:380:76) at onUpdate (index.mjs:260:7) at processDataProtocolResponse (index.mjs:939:5) at async callChatApi (index.mjs:1031:14) at async getStreamedResponse (index.mjs:222:10) at async processChatStream (index.mjs:1243:42) at async eval (index.mjs:338:9) ``` Set up details: ``` Next.js 14.2.14 "@llamaindex/core": "^0.2.6" "ai": "3.3.42", "ajv": "^8.12.0", Model: `llama-3.1-8b-instant` Model Provider: `qroq`. ``` To reproduce: 1. Run `npx create-llama@latest` from v0.3.8 2. Follow default setup with python back-end. 3. Send query couple of times. Can you please help me to fix the issue?
Author
Owner

@marcusschiesser commented on GitHub (Oct 28, 2024):

It's caused by this vercel/ai issue: https://github.com/vercel/ai/issues/1610 - we'll add a workaround to the https://github.com/run-llama/chat-ui components

@marcusschiesser commented on GitHub (Oct 28, 2024): It's caused by this vercel/ai issue: https://github.com/vercel/ai/issues/1610 - we'll add a workaround to the https://github.com/run-llama/chat-ui components
Author
Owner

@cognitiveRobot commented on GitHub (Oct 28, 2024):

@marcusschiesser Thanks for the reply. What is the expected date of this workaround?

@cognitiveRobot commented on GitHub (Oct 28, 2024): @marcusschiesser Thanks for the reply. What is the expected date of this workaround?
Author
Owner

@marcusschiesser commented on GitHub (Oct 29, 2024):

It's only in dev mode so it's not a blocker, but we should have the workaround next week

@marcusschiesser commented on GitHub (Oct 29, 2024): It's only in dev mode so it's not a blocker, but we should have the workaround next week
Author
Owner

@cognitiveRobot commented on GitHub (Nov 5, 2024):

I get the same error on prod when send query "physical standards for letters?"

fd9d1056-3022f0b0fc61dde2.js:1 Uncaught (in promise) Error: Minified React error #185; visit https://react.dev/errors/185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at ik (fd9d1056-3022f0b0fc61dde2.js:1:110228)
    at nf (fd9d1056-3022f0b0fc61dde2.js:1:26356)
    at ns (fd9d1056-3022f0b0fc61dde2.js:1:25972)
    at rj (fd9d1056-3022f0b0fc61dde2.js:1:44328)
    at fd9d1056-3022f0b0fc61dde2.js:1:44206
    at 570-ca2dfee6f5294646.js:1:1201783
    at Array.l (570-ca2dfee6f5294646.js:1:1198620)
    at 570-ca2dfee6f5294646.js:1:1196369
    at u (570-ca2dfee6f5294646.js:1:1198253)
    at em (570-ca2dfee6f5294646.js:1:1197684)

Run commands

//@backend
$ python main.py

//@frontend
$ npm run build
$npx serve@latest out

app created from v0.3.11

Cheers

@cognitiveRobot commented on GitHub (Nov 5, 2024): I get the same error on prod when send query "physical standards for letters?" ``` fd9d1056-3022f0b0fc61dde2.js:1 Uncaught (in promise) Error: Minified React error #185; visit https://react.dev/errors/185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at ik (fd9d1056-3022f0b0fc61dde2.js:1:110228) at nf (fd9d1056-3022f0b0fc61dde2.js:1:26356) at ns (fd9d1056-3022f0b0fc61dde2.js:1:25972) at rj (fd9d1056-3022f0b0fc61dde2.js:1:44328) at fd9d1056-3022f0b0fc61dde2.js:1:44206 at 570-ca2dfee6f5294646.js:1:1201783 at Array.l (570-ca2dfee6f5294646.js:1:1198620) at 570-ca2dfee6f5294646.js:1:1196369 at u (570-ca2dfee6f5294646.js:1:1198253) at em (570-ca2dfee6f5294646.js:1:1197684) ``` Run commands ``` //@backend $ python main.py //@frontend $ npm run build $npx serve@latest out ``` app created from `v0.3.11` Cheers
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/create-llama#88