I’m experiencing an issue when using multiple Firebase Realtime Database components in Kodular.
My Setup
I’m using three Firebase Realtime Database components connected to the same database but with different Project Paths:
Firebase1:rooms/39495/player/player1 – Used only for listening to player1 changes
Firebase2:rooms/39495/player/player2 – Used only for listening to player2 changes
Firebase3:rooms/39495/player – Used for GetValue and StoreValue operations.
Issue
When Firebase1 or Firebase2 is actively listening for changes through the DataChanged event, calling GetValue or StoreValue using Firebase3 causes the other components to stop receiving DataChanged events.
However, if I subsequently call GetValue using Firebase2, its DataChanged listener starts working again.
Expected Behavior
Each Firebase component should maintain its own DataChanged listener independently, regardless of GetValue or StoreValue operations performed by other Firebase components.
Actual Behavior
Using GetValue or StoreValue on one Firebase component appears to interfere with the active listeners of other Firebase components.
Question
Is this a known issue with the latest Kodular Firebase Realtime Database component? Is there a workaround to keep multiple Firebase components listening independently without having to call GetValue again to reactivate their listeners?
I believe the main issue is that you’re using multiple Firebase components.
You should only use one. This is not a bug.
The solution is to use a single component with its path pointing to a parent node that contains all the different paths you’re currently using (rooms/39495).
Then, handle each response within the app and determine which node it comes from.
I understand that using a single Firebase component with a common parent path is an alternative. However, my intention is to listen only to specific nodes rather than the entire parent, which contains frequently updated data. Using a single component at the parent level could result in unnecessary DataChanged events and additional data processing.
Also, I noticed that calling GetValue on one component causes its DataChanged listener to start working again after another component has been used.
Is using multiple Firebase Realtime Database components officially unsupported in Kodular, or is this an unintended limitation? Ideally, I’d like to maintain independent listeners for different database paths.
From what I understand, this extension uses Firebase’s REST streaming API to receive real-time database changes without relying on the built-in Firebase component.
This looks like a promising workaround for my issue. However, I’m using Kodular with Firebase Authentication.
Does this extension work reliably with Kodular, including authenticated Firebase RTDB connections? Have you tested it with multiple listeners?
Not tested it on Kodular, you can be the first!, but the REST API works OK with the Web component on Kodular. You will probably need to use multiple instances of the extension…
Thanks for the clarification! I’ll test the extension in Kodular with multiple instances and Firebase Authentication to see if it works reliably.
However, I’m still looking for clarification regarding the behavior of multiple Firebase Realtime Database components in Kodular.
I found an earlier discussion where Kodular developer Diego suggested using different Project Path prefixes in separate Firebase components within the same database:
This suggests that using multiple Firebase components should be supported.
Could someone from the Kodular team confirm whether multiple instances of the new Firebase Realtime Database component are officially supported?
In my case, all three components use the same database with different Project Paths. Calling GetValue or StoreValue on one component causes the others to stop receiving DataChanged events until GetValue is called on them again.
I’d appreciate clarification on whether this is expected behavior or a bug in the current implementation.