Hey @louis2 - here is what happened from Bubble support…
The found the reason I was having an issue with my app (The issue I was trying to troubleshoot with debug mode) It was a workflow thing…
When I asked why I couldn’t troubleshoot it myself in Debug mode, here is the answer that they gave me:
The debug mode runs each action step by step and does not always wait for the completion of each action before itself due to the different execution rules, which is why the behavior might slightly differ at times.
I was able to isolate the workflow that caused this by working on a local copy and disabling each workflow that had to do with the ‘zero scored category’ custom state until I found the error no longer reproduced. It looks like the custom event is being triggered at a point in run mode which is causing the state to get populated.
If it’s at all helpful (in case you have a similar set up) my issue was stemming from a Workflow set to “Trigger when”
Many thanks for your reply @ian11, I might have found the workflow that causes the issue. It seems to be a Workflow Do Y Only When custom state = X and I’m looping over it.
But it get stucked at the first iteration in run mode
I need to test an alternate way to achieve this easily.
I simply put the yes/no custom states (that indicates if the script has to loop again) visible in a text element in the app. Set it to 1x1px to make it invisible for the user. And it works…