https://discord.gg/botpress logo
An error occurred on hook (origin: Improvement 1.0...
# 🤝help
m
I'm using Gemini 2.5 Flash and just now it started throwign errors on every LLMz execution, what might be the problem ? I tried changing it to ChatGPT 4 mini and still same problem. An error occurred on hook (origin: Improvement 1.0.2) after_llmz_execution "track_iterations": Error: data/iterations/0/iteration/status must be equal to one of the allowed values, data/iterations/0/iteration must be null, data/iterations/0/iteration must match a schema in anyOf Transpiled Code: 003 async function __ROOT__() { 004 var __defProp = Object.defineProperty; 005 var __name = (target, value) => __defProp(target, "name", { 006 value, 007 configurable: true 008 }); 009 async function __ROOT__() { > 010 await actions["agi/improvement"].trackIterations({ ^^^^^^^^^^ 011 iterations: execution.iterations.map(iteration => ({ 012 uri:
workflow://${execution.location?.workflowId}/${execution.location?.nodeId}
, 013 conversationId: event.conversationId, 014 executionId: execution.context.id, 015 iterationId: iteration.id, 016 eventId: event.messageId ?? event.id, 017 userId: event.userId, 018 iteration: { 019 code: iteration.code ?? "", 020 ended_ts: iteration.ended_ts, 021 started_ts: iteration.started_ts, 022 messages: iteration.messages, 023 model: iteration.llm.model, 024 mutations: iteration.mutations, 025 status: iteration.status 026 } 027 })) 028 }); 029 ; 030 } 031 __name(__ROOT__, "__ROOT__"); 032 ; > 033 return await __ROOT__(); ^^^^^^^^^^ 034 ; > 035 }; return await __ROOT__(); ^^^^^^^^^^ {"scope":"bot-hook","hookType":"after_llmz_execution","hookFile":"track_iterations"}
Can you try upgrading your improvement?
@miniature-daybreak-20569
b
I tried updating the improvement to version 2.0.0 but still getting an error: An error occurred on hook (origin: Improvement 2.0.0) before_llmz_execution "inject_learnings": Error: data/search must NOT have fewer than 1 characters
m
Also getting this error even after update 🙂
l
Will get back!
b
have anyone found an alternative so this works?
l
could you drop your workspace id
s
Nope..
Waiting for @loud-crowd-60573 with some good news. Hopefully this resolves fast
l
Can you test with different LLMs?
Waiting on the workspace ID to test on my side too
s
We tested it with GPT, Claude, Gemini
01K1FP0AG7SAY7M3H3Q3J0S1DY
@loud-crowd-60573 Any news?
l
Can we get some steps on how to recreate the error?
l
What i tried this morning, that resolved this issue was to create a copy the existing AN and paste the same one again there. Basically replacing the old NA with a new AN.
Can you test this on your end?
b
@loud-crowd-60573 I tried this and didn't worked
also different models and no success
wkspace_01K88YEJBJARE04FMDTKZX1CF1
agent name: HaciendaCafe and to replicate the error just by saying "hola" in the emulator. The AN is used as a greeting classifier
m
Seems as it has solved problem only for short amount of time. Now it started again, i tried creating new AN from scratch and replacing the old one. It worked shortly and error started occurring again... Is there anything else i can try ? This seems pretty unstable for production environment!
I also noticed that bot sometimes doesn't write to table as it should. I'm sending image of an example. I noticed this happening in other nodes. This is prompt inside AN
Copy code
### Ask user for budget
Prompt: “What’s your total budget range?”
Rules:
- Accept a single number or a range in any common currency format; ignore symbols/commas when parsing, assume euros. 
-Allow any type of format (30k, 30000, 30,000), user can write in native language, your job is to understand and parse it and then validate.

- If a single number X (accept shorten version such as 30k, 30000, 30 thousands  and natural language, just make sure to always format to full number eg. 30000):
  - If X < 20000 → “Minimum budget is €20000.”
  - If X ≥ 20000 → normalize to “€(X-5000)–€(X+5000)”.
- If a range (low–high), normalize and ensure low < high; store as “€low–€high”.
- Keep asking until {{workflow.budget}} is populated.
On success:  set {{workflow.budget}} (normalized string, e.g., “€25,000–€35,000”), don't notify user about his budget range that is set just advance to next question.
https://cdn.discordapp.com/attachments/1452608138577707060/1454043754477654047/image.png?ex=694fa745&is=694e55c5&hm=146638601b3863fc39d29826396c0b05de867f5e4500e78075d82b6d66ff5a33&
s
@loud-crowd-60573 @able-queen-43470 @limited-pencil-78283 @microscopic-shampoo-2255 @white-nest-40686 can anyone help :)? Sorry for pinging but this is taking too long 🙂
l
Hey guys, we are back from the holidays hopefully we can get this all sorted soon. Will update you when I can!
s
Hope you guys had a nice time 🙂
b
is there an ETA for this problem to be solved?
or any update on the situation?
@loud-crowd-60573 i found something useful
b
We identified an issue with the Autonomous Node (AN) where it intermittently throws an “Error Occurred”, even though the logic itself is correct. ✅ What works - The user message is correctly received (confirmed via event.preview, event.payload.text, and logs). - The input is successfully normalized before reaching the Autonomous Node. - When the Autonomous Node returns pure JSON, everything works as expected. ❌ What causes the error The issue happens when the Autonomous Node returns anything other than strict JSON, for example: - JavaScript code (workflow.variable = ...) - Comments (// comment) - Text explanations - Multiple lines outside a JSON object When this happens, Botpress fails to parse the response and throws “Error Occurred”, even though the LLM logic itself is correct.
l
Im trying to tackle the Loop exceeded error first
where did that appear?
b
just say "Hello" in the emulator and the error will appear in the logs
l
I am seeing an error however not the Loop Exceeded error
looking for this one
b
yeah, give me a sec
even if I have the Improvement 2.0.0
l
If you need more urgent help in the future I recommend signing up for the Plus plan as you have dedicated customer support engineers that can aid much better then I.
Got it will explore that next, did the Loop exceeded error go away?
b
yes, it went away. It looks like even if I have the Improvement 2.0.0 installed it's using the 1.0.2. with the 1.0.2, there is no Loop exceeded error.
l
The workflow seems to be working though @best-soccer-53074 is a function also not working?
As in, is the workflow working fine but an error is being thrown? OR is it not working as intended
b
before you entered to my workspace i was trying some workarounds, and i found that the issue happens when the Autonomous Node returns anything other than strict JSON
when I use strict json for the returns the error goes away
l
got it, will do some digging and get back shortly
b
sure, thanks!
do you need me to keep my workspace available, or can I continue testing?
l
I notified the team, you can keep testing it seems to be a bug. Will update you when I can!
b
thank you!
l
So just to be clear that loop exceeded error went away ?
What errors are you still getting @silly-kite-32458 @miniature-daybreak-20569 everything seems fine on our end!
b
loop exceded error went away. right now the error is: An error occurred on hook (origin: Improvement 1.0.2) before_llmz_execution "inject_learnings": Error: data/search must NOT have fewer than 1 characters
m
We had AN with turned off messaging, once we turned it on, it didin't give us any error. However, we do have some other problem. I have AN that formats user's budget eg. user inputs 35k it formats it to 30000-40000 There are occurances when bot saves it like this €${minBudget}–€${maxBudget} in table. I'm sending image of my prompt for AN. Do you have any ideas? Thanks in advance @silly-kite-32458 @loud-crowd-60573 https://cdn.discordapp.com/attachments/1452608138577707060/1455586164554731644/image.png?ex=695543c1&is=6953f241&hm=d0b8e196db5c0861e2c51e4b2e2d968528db29781755e0be2c2b8f2184951401&
l
It might be the euro symbol messing it up?
@best-soccer-53074 this seems to be the issue haha, so once you "Allow conversation" on the AN the error message goes away
m
Hire me as technical support haha 😆
This node is pretty "old" meaning i made it few months ago and didn't change it, this issue started few days ago. Also there is another AN with same issue for formatting number of rooms (user inputs 6 it formats to 6-7) which does not have euro symbol in it and it's still happening in there, so i doubt it's euro symbol.
l
Will do some testing on my side by copying your instructions on my end
m
Its not that always happens, just sometimes, but that breaks logic of the flow. Can this be problem because of how i set my hooks? https://cdn.discordapp.com/attachments/1452608138577707060/1457699465858383892/image.png?ex=695cf3eb&is=695ba26b&hm=9407590feb0676db15049ff2291be569b619a2dafb287a1fd3c57efb4691c948&
You can see that it happens for rooms also 🙂
11 Views