Hello Bubble Community,
I am encountering an issue with my app where the number of items associated with a datatype Audioboard appears correctly initially on the frontend/debugger but does not match the actual database entries. After refreshing the page it then matches up with the database entry (which is incorrect). And its not due to a custom state because at the end of the workflow I go to another page so it refreshes once already.
Detailed Description of the Problem: I have set up a workflow where multiple items are added to an AudioBoard. This process involves:
- Creating an AudioBoard.
- Adding items to the AudioBoard using an API workflow that processes each item individually.
When I navigate to the page where the AudioBoard is supposed to play these items, all items appear as expected, and everything functions correctly initially. The debugger shows all the items under the AudioBoard, and they can be interacted with without any issues.
Issue:
- Upon initial inspection right after the items are added, the frontend shows all 8 items linked to the AudioBoard.
- However, when checking the database directly, it only lists 2 items associated with the AudioBoard.
- If I refresh the page, the frontend then updates and shows only the 2 items, reflecting what is in the database.
Additional Observations:
- The discrepancy between the frontend display and the database persists even though the API call to add items appears successful, and the audio files can be played initially.
- There are no visible errors in the debugger or logs that explain why only 2 items are recorded in the database when 8 are expected.
Attempts to Resolve:
- Ensured that the workflow completes before navigating away from the creation page.
- Checked for any asynchronous operations that might not complete in time.
- Looked for potential race conditions or database write conflicts without any definitive findings.
Questions:
- What might be causing the frontend to display all items initially but the database to show a different number, and why does this change after a refresh?
- Are there known issues with race conditions or database updates in Bubble that I might not be accounting for?
Any insights or suggestions would be greatly appreciated as I’m currently unable to determine the cause of this inconsistency.
Thank you!