# Cloud variable not storing in firebase

**URL:** <https://community.thunkable.com/t/cloud-variable-not-storing-in-firebase/1787587>\
**Category:** Questions about Thunkable X\
**Created:** [March 16, 2022, 5:59pm UTC](https://community.thunkable.com/t/cloud-variable-not-storing-in-firebase/1787587 "2022-03-16T17:59:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sklemmer233hj9x](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@sklemmer233hj9x](https://community.thunkable.com/u/sklemmer233hj9x)\
**Post date:** [March 16, 2022, 5:59pm UTC](https://community.thunkable.com/t/cloud-variable-not-storing-in-firebase/1787587/1 "2022-03-16T17:59:18Z")

</div>

I am trying to save information in a cloud variable for my app, but it does not show up in my database even though I have input the API key and database url into the app and have the firebase public. Can someone help me find what I am doing wrong?  
Here are screenshots:

 ![Screen Shot 2022-03-16 at 10.56.55](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/6/86975e78cdd1c12e4510248e05fb235c96e53eb4.png)  
 ![Screen Shot 2022-03-16 at 10.58.21](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/3/6363c0231553ebb14db95bc443a701809df96ad7.png)  
Thanks!

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 16, 2022, 6:50pm UTC](https://community.thunkable.com/t/cloud-variable-not-storing-in-firebase/1787587/2 "2022-03-16T18:50:14Z")

</div>

Your screenshots do not give the full picture. What does `app variable iserID` contains?

You are mixing between `cloud variables` and `app variables` in the same block. Is this intentional?

---

<div class="post-metadata">

**Author:** ![sklemmer233hj9x](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@sklemmer233hj9x](https://community.thunkable.com/u/sklemmer233hj9x)\
**Post date:** [March 16, 2022, 8:19pm UTC](https://community.thunkable.com/t/cloud-variable-not-storing-in-firebase/1787587/3 "2022-03-16T20:19:10Z")

</div>

sorry! The app variable userID contains the userID from the login function. I mixed between cloud and app variables because I was following this thunkable tutorial: [Cloud Variables - Save User Data to the Cloud in Thunkable Drag and Drop UI - YouTube](https://www.youtube.com/watch?v=KvFvSkG6G-k)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 16, 2022, 8:28pm UTC](https://community.thunkable.com/t/cloud-variable-not-storing-in-firebase/1787587/4 "2022-03-16T20:28:04Z")

</div>

That should work.

1. Are you able to change ANY values in Firebase from within Thunkable?
2. Have you added your Firebase database url and authentication key to Thunkable?
3. Are your Firebase rules set to allow logged in users to read/write data?
4. Are you signing in before running the code in those blocks?
5. Is any data in Firebase changing?
6. If you assign the app variable userID to a label, does the label display a value that also appears as a node in Firebase with the fields you defined? What happens if you replace all of the null blocks in the create object block with blank text strings ("")?

---

<div class="post-metadata">

**Author:** ![sklemmer233hj9x](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@sklemmer233hj9x](https://community.thunkable.com/u/sklemmer233hj9x)\
**Post date:** [March 16, 2022, 11:51pm UTC](https://community.thunkable.com/t/cloud-variable-not-storing-in-firebase/1787587/5 "2022-03-16T23:51:15Z")

</div>

1. No
2. Yes
3. Yes
4. Yes
5. No
6. No. Nothing changes if I replace it with blank text strings.

I think I may make a new Firebase account and see if maybe I messed something up in Firebase.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 17, 2022, 12:03am UTC](https://community.thunkable.com/t/cloud-variable-not-storing-in-firebase/1787587/6 "2022-03-17T00:03:53Z")

</div>

Since you can’t change ANY values in Thunkable, the problem does seem to be with Firebase itself.

As a simple test, you should be able to sign in and then do something like this:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/0/b08a77a26a18604adf191a1e6cbdb81205f14746.png)

You should then see this in Firebase:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/b/bb547ea8b1e2bd800d8ee4978fd26f94853c9989.png)

Until you have that working, it won’t work to do anything else in Thunkable related to Firebase.

---

<div class="post-metadata">

**Author:** ![sklemmer233hj9x](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@sklemmer233hj9x](https://community.thunkable.com/u/sklemmer233hj9x)\
**Post date:** [March 17, 2022, 12:04am UTC](https://community.thunkable.com/t/cloud-variable-not-storing-in-firebase/1787587/7 "2022-03-17T00:04:49Z")

</div>

Okay. Yay! It worked when I started a new project. 🙂 I’m not quite sure what was wrong with it but sorry to take up your time!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [June 15, 2022, 12:04am UTC](https://community.thunkable.com/t/cloud-variable-not-storing-in-firebase/1787587/8 "2022-06-15T00:04:51Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
