[Solved] Cloud variable values do not appear in Realtime Database

I took a bit of a hiatus from Thunkable X when my last app completely collapsed after an update (don’t get me started).

In that app, I created cloud variable which stored objects. The values for those variables were visible in the Firebase Realtime Database panel. Now I am unable to replicate this. If I use the Realtime DB Save block, the objects are visible in my Realtime Database. But cloud variables are not. The cloud variables WORK, but I cannot see the values. This makes debugging REALLY complicated!

I know I had this working previously, because I still have those firebase databases populated with data. But none of the permutations of SET objects seem to work the way they did before. That or I have some secret trick buried in my code somewhere. But I don’t think so.

Below are images of the database contents and the blocks used to generate them.

Thanks in advance

image

sorry to hear about this - did anyone ever look into this for you?

In relation to Firebase vs Cloud variables, have you added your FIrebase credentials to your project settings?


I wouldn’t rule this out - it’s possible that there was a work-around that no longer works? (but I’m not aware of one!)

Also, just wondering why you’d opt to use both Cloud variables and RealtimeDB in your app here, would you be able to get by with just one of them?

I figured it out again! Create the variable using the realtimedb SAVE block with the a key. Then create a cloud variable with a name matching the Key used in the SAVE block. You can then read the values from firebase using the cloud variable.

1 Like

Domhnall,

The loss of my recursion I worked around. The bigger issue in the collapse was the generating of internal errors with stored and cloud variables with if/elseif blocks. I submitted a git hub ticket 6 weeks ago. https://github.com/thunkable/thunkable-issues/issues/548#issue-627769514. I received one question, but haven’t heard anyting else in almost 3 weeks. Closure would be nice :wink:

Agreed. Just had a look at that ticket there now.

The main issue is that we weren’t able to reproduce the error on our end. While it’s clear from your screenshots and video that this issue was happening to you, we weren’t able to get it to happen again.

One thing I noticed was that you shared a copy link. If you try making a copy of your own project it’s quite likely that this will resolved the issue.

If that doesn’t work feel free to send me (via PM if you’d like) your project link so I can take a closer look.

Thanks.

Regarding the else if…github ticket. I tested this issue again by creating a fresh project and adding only the blocks shown. The same error is still occuring. I then took your advice and made a copy of the project. The error continues to occur.

Not working

By not working, do you mean the error appears or that no error appears?

i’ll figure it out maybe my blocks are wrong