Dear Bubblers
I’m writing this post to save you the headache and frustration I’ve been experiencing during the final testing phase of my application. After countless hours of debugging and a back-and-forth with Bubble support, I’ve identified a critical issue that might be affecting many of us.
The Problem
When using Schedule API Workflow on a List (SAWOL) to trigger multiple workflows that write data to the same Thing (or same field), some data simply vanishes into thin air. The most frustrating part? The logs confirm that the data was written successfully, but when you check the Thing, the data is missing.
This isn’t a one-time glitch. It happens consistently and reliably at the same action points in my workflows.
What’s Actually Happening
According to Bubble support, this behavior is related to recent “improvements” on the speed and power of scheduling an API workflow on a list. In their words:
“If you have an action that makes changes to the same exact thing in each instance of the workflow, then it can cause complications trying to add different things to the same field at roughly the same time (This race condition only occurs when a ‘Schedule API Workflow on a list’ action schedules an API workflow that contain an action to make changes the same thing).”
In simpler terms: When multiple workflows are simultaneously attempting to write to the same Thing, they step on each other’s toes, and some writes simply get dropped - despite the logs showing successful completion.
Why This Is a Major Flaw
This is, in my opinion, a MAJOR FLAW in the platform, especially when there’s not a big warning in the SAWOL expression tab – moreover when the recommended behavior (no interval) in the tab is causing the issue (according to support). We’re building applications on the premise that when we instruct the system to perform certain actions, those actions will be executed as intended, especially when we cannot control the sequence of actions. This race condition undermines that basic trust in the platform.
The most disturbing part is that there’s no error message. The logs report success, making this extremely difficult to debug. I spent days checking and rechecking my expressions and logic, convinced that I had made a logical mistake somewhere.
The Workaround
Bubble support suggests adding an interval when scheduling API workflows on a list:
“A way to avoid this would be to add an interval to when you schedule the API workflow on the list to give more breathing room between each run of the workflow. We recommend starting with an interval of 2 seconds, and then adjusting based on the results from testing.”
My Implementation
For those facing similar issues, here’s what worked for me:
- Added database triggers that check for data inconsitencies and write data if missing (adding major WU overhead to my app)
- For critical data operations, implemented a simple queue system to process writes sequentially rather than in parallel
- scheduled intended workflow that should happen when data in list A matched data in list B (to check if all workflows are completed) just enough into the future where I’m 99% sure everything that ought to be executed, was executed.
Questions for the Community
Is anyone else experiencing similar issues? Have you found better workarounds than adding delay intervals or without the need to restructure your apps?
It’s really frustrating to have a program not execute exactly what you tell it to do - especially when the logs tell you everything worked perfectly.
Let me know your thoughts and experiences!