Firebase Get Record Collection exceeds Firebase limits

Hi

I’m new to AppGyver and trying to integrate with Firebase. Adding a simple Get Records data variable to my page and then getting it to refresh using a “data variable” changed trigger event has caused my reads to reach the 50K limit within a few minutes.

Can anyone explain why this has happened and how do I get the collection to refresh on the page after say adding a new record via a button on the same page?

I’m assuming the trigger is polling maybe, but surely this would have been highlighted and that you would be able to set the polling interval?

Cheers

Dave

Hi @David_Ritchie! The default behavior only fetches the data once, so I’m thinking that you might have somehow created a loop of requests – screenshots could help in understanding what’s going on :slight_smile:

To make sure that the collection only gets fetched after a new record is created, I would also attach the fetch collection logic to the button: Component tap → Create record → Get record collection → Set data variable (collection)

Hey

Thanks for the very quick response. On setting up to take a screenshot, it is now obvious where I have introduced the loop!!

I did originally think to attached a refresh to the “Add Record” button but was trying to avoid having the “Get record collection” and “Set data variable” defined in two places - I guess I need to stop thinking like a programmer :slight_smile:

As an aside, is there a way to detect this kind of loop easily? I had no idea it was looping until Google told me I had reached my limit and fortunately I was still on the Spark subscription so avoided a large bill.

Cheers

Dave

A good way to keep track of your network requests is using the Chrome developer tools’ Network tab while testing your app in the web preview. (Launch → Open app preview portal) It’s also helpful in debugging if any of your requests are erroring or not being sent as expected.