Forum Documentation Showcase Pricing Learn more

Bug with events conditions


#1

Hi,

I recently noticed a bug related to conditions on events, on a page of my app.
It worked correctly until lately, and I can’t understand why this bug happens.

To sum up, 2 events are related to a button, on click:

  • if the number of a type of data is 0, a warning text appears on the page;
  • if the number is superior or equal to 1, the next question appears.

The bug is that the 2 events happen, whereas only 1 condition can be true.
I used the debugger to try to understand, and even though one of the 2 conditons appears in red, it is still executed when it ususally stopped the workflow.

I built a simplified version of this part of my app here:
https://app0test.bubbleapps.io/version-test/event_conditons
the bug doesn’t appear in this simplified version but it follows the same process, the only differences are that the original app (that I can’t share because it’s private) includes more actions in the event and the data includes more fields.

Any idea? @josh


#2

And could you provide screen grabs of the conditions on the event? And perhaps a couple of screengrabs of the debug where you see it evaluating? Can you do that without revealing the private things? A working simplified demo does not really help to get to the bottom of a problem. We need more.


#3

Yes, sure!

First, here are the screenshots of the conditions on the 2 events:

condition when count is 0

condition when count is superior or equal to 1

And here are the screenshots of the debugger step by step in the order it is executed when I click the button:

I specify that the current user currently has no customers in database, so the repeating group is empty right now, and therefore the condition “count is 0” should be the only one to be executed.

Thanks!


#4

Those screengrabs are great @recrutbox but like you, I’m still stumped.

Your screengrabs show what current users list of customers count is/is not (oui/non) but don’t show what the actual value is. Can you post what it says the value is at the two points where the condition is evaluated?

It’s late here now and I’m finishing for today but I hoping someone else will jump to the rescue now you have shown the sort of detail they will need.


#5

Here are the numerical values, as shown in the debugger.

Thanks anyway @patricia for trying to help!


#6

@recrutbox I had hoped you would have a solution by now. Disappointed to see nobody else chimed in. That honestly looks like a bug unless the two of us are simply missing something obvious. I’m afraid I have only two suggestions.

  1. Try creating two brand new events and copy your workflow actions across. I’ve lost count of how many times recreating something in bubble fixes a problem, although I’m doubtful in this case.

  2. Report it as a bug to bubble on https://bubble.is/bug_report but they will need into the app to debug the problem so you may have to accede to allowing that.


#7

Thank you @patricia for your suggestions, I was going to apply the first one when I thought I didn’t try to test the page with another user and surprisingly, when I log in with any other user, everything works fine: the debugger doesn’t execute the false condition.
Then, when comparing the specific profile with the others, I didn’t notice anything odd, so I randomly modified its email field (directly via the data tab) and the bug didn’t occur anymore.
I believe that maybe the change via the data tab somehow fixed the unknown issue with this user.

So, now, everything is ok, but it’s still frustrating not knowing the cause of the issue, in case similar bugs happen in the future.

Thanks again @patricia for taking time to reply!


#8

You are welcome @recrutbox. I know how frustrating those bugs can be and when they have no apparent cause we need to reverse diagnose one tiny step at a time, even trying things that shouldn’t make a difference. Bubble is immensely powerful but any online tool suffers little glitches occasionally. I’m just delighted you’ve got it solved.