# \[Solved\] Firebase \_ScopeVariableInfo cloud variable error notification

**URL:** <https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341>\
**Category:** Questions about Thunkable X\
**Tags:** firebase, solved\
**Created:** [September 20, 2019, 4:14am UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341 "2019-09-20T04:14:43Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhou\_Sicong](https://avatars.discourse-cdn.com/v4/letter/z/df788c/32.png) [@Zhou\_Sicong](https://community.thunkable.com/u/Zhou_Sicong)\
**Post date:** [September 20, 2019, 4:14am UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/1 "2019-09-20T04:14:44Z")

</div>

Hi i was trying to store a list to firebase using the blocks below. If i use the cloud variable, it stores fine in the firebase (see last image), but i also want to detect any error so i prefer to use the realtime blocks.

However, when i use the realtime blocks (See 2nd image), automatically an item \_scopevariableinfo gets added to the list and block further actions to the list (see 1st image)…not sure why…

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

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/5/85d54d155f9b766d72d8d5f5685b3b245d38a1f2.png)

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [September 20, 2019, 10:58am UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/2 "2019-09-20T10:58:34Z")

</div>

Hi,

Lock the list is due to incorrect index. Your structure root ClansList is an array of objects. And to access the array elements using numeric indices. But in the second image instead of a number index you add the text in root ClansList. Therefore, block further actions to the list.

---

<div class="post-metadata">

**Author:** ![Zhou\_Sicong](https://avatars.discourse-cdn.com/v4/letter/z/df788c/32.png) [@Zhou\_Sicong](https://community.thunkable.com/u/Zhou_Sicong)\
**Post date:** [September 20, 2019, 4:30pm UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/3 "2019-09-20T16:30:36Z")

</div>

Sorry i don’t fully get you.  
i understand app ClansList is a list. I’m adding the list as a value to the key ClansList in Firebase, is that not allowed? But if so, why is the third image ok because i seem to be doing the same thing just using cloud variable instead.

But thank you for your response!

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [September 20, 2019, 6:06pm UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/4 "2019-09-20T18:06:07Z")

</div>

@Zhou_Sicong, You have hit upon a bug in Thunkable, whereby ordinary list operations do not work on lists that are obtained from the `Realtime DB` component. Until it is fixed, I will suggest a workaround. The basic idea of the workaround is to copy the list that you obtain from the `Realtime DB` component. Unfortunately, you can’t use most of the normal list operations to do do that, for example, the `length of` block. So, what you’ll need to do is to save the length of the list the `Realtime DB` component along with the list itself and use that length to copy the list after you retrieve it from the `Realtime DB` component. Then you can use that copy with ordinary list operations.

As an example, here is a very simple example project that uses the technique suggested above: [Thunkable](https://x.thunkable.com/copy/45b59e92e03130294e2173a567eeb9bc)

And here is a screenshot of the blocks in that project:

 ![48%20AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/8/287676c1d22f34431e616a7a25525616cd336476.png)

I hope this helps.

-Mark

---

<div class="post-metadata">

**Author:** ![mrmazzone](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mrmazzone/32/39431_2.png) [@mrmazzone](https://community.thunkable.com/u/mrmazzone)\
**Post date:** [September 21, 2019, 12:14am UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/5 "2019-09-21T00:14:08Z")

</div>

I’ve had issues with lists while using cloud variables and realtime db.

What I have done is store the list as text on the cloud var/realtime db and convert it back and forth with the `make list from text` and `make text from list` blocks.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/7/479a60e9d30a992441a225cae85a7ccf3f2778c2.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/6/7615a2f72cdf349f8162cb230e3d45edfb7d7bef.png)

---

<div class="post-metadata">

**Author:** ![Zhou\_Sicong](https://avatars.discourse-cdn.com/v4/letter/z/df788c/32.png) [@Zhou\_Sicong](https://community.thunkable.com/u/Zhou_Sicong)\
**Post date:** [September 21, 2019, 9:17am UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/6 "2019-09-21T09:17:43Z")

</div>

I think the problem may also lies with using an If block within the realtime db get block.

I was able to execute all the lines of codes correctly if i pull them out of the if block separately.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/7/97e531d8f5ca94cff1c86f55c1e360affe62dcf5.png)

I also check that the if condition return a true separately.

Yet when i put the above two together, they don’t execute.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/9/29d76f5eed3e7e9bd417b032c3a8deeaf6a8bcf1.png)

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [September 21, 2019, 9:17am UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/7 "2019-09-21T09:17:43Z")

</div>

The problem associated with the use of global variables. Suppose we have a numeric list of three items 1,2,3

If the list is stored in the variable function, the list of preservation takes place when it is stored in Firebase

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/d/cd1bad66a9bea63cfc02a8dd00b30be36bd6dda5.png)

, and upon receipt we will see:

[1,2,3] - this is the list. That is, a list of saved correctly

If the list is stored in a global variable, then when you save it in the happens Firebase object preservation:

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/5/954e9ba3852c9259dde28944a554d26a991da0c4.png)

For get a list, you can use these blocks:

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/a/1a655f0453ae65ee927c1b7e4f200a44aa909a31.png)

---

<div class="post-metadata">

**Author:** ![Zhou\_Sicong](https://avatars.discourse-cdn.com/v4/letter/z/df788c/32.png) [@Zhou\_Sicong](https://community.thunkable.com/u/Zhou_Sicong)\
**Post date:** [September 21, 2019, 9:20am UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/8 "2019-09-21T09:20:26Z")

</div>

O awesome, i think it will solve my problem! Thanks so much!

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [September 22, 2019, 5:53pm UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/9 "2019-09-22T17:53:08Z")

</div>

Ah yes, @actech, that’s an even better approach than mine! I would just suggest putting the blocks in the `'then do'` into a function, so it could be used in other places (i.e. with other `'RealtimeDB call Get'` blocks).

-Mark

---

<div class="post-metadata">

**Author:** ![tuffla](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@tuffla](https://community.thunkable.com/u/tuffla)\
**Post date:** [December 27, 2020, 3:12am UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/10 "2020-12-27T03:12:54Z")

</div>

Hi. I realized recently this is a big problem when working with firebase / Thunkable. The issue is that a list gets converted into a set, and the \_scopeVariableInfo gets added. The simplest solution I’ve found to this is that every time You update, get rid of the \_scopeVariableInfo by saving not the list, but the list, with the last entry omitted, so in the value, don’t use ‘app ClansList’ but from the list drawer use the 'in list \_\_\_ get sublist from #1 to …" and put a minus block from math in, and create ‘length of ClansList -1’. This will eliminate the last entry in the object created (ie. \_scopeVariableInfo), and create a list which is not an app variable, resulting in the save to be an array. See below:

 ![_scopeVariableInfo](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/c/8c7b443efe5600f0e3649c8719e1f10c32af5604.jpeg)

When You save, not update, use the length of the list itself.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 27, 2020, 1:33pm UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/11 "2020-12-27T13:33:04Z")

</div>

Using the cloud variables is an easy workaround for the issue you describe.

This problem has been solved! Eventually the Firebase blocks will disappear I’d imagine!

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [January 9, 2021, 2:38pm UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/12 "2021-01-09T14:38:20Z")

</div>

> [@jared](#):
>
> Eventually the Firebase blocks will disappear I’d imagine!

We’ll continue to support them in legacy projects @jared, but at the moment - if you’re creating a new project then yes, we recommend that you use cloud variables for this.

@tuffla - would cloud variables work for your particular use case?

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [February 25, 2021, 6:16pm UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/13 "2021-02-25T18:16:36Z")

</div>

Try this:

 ![Screenshot 2021-02-25 at 20.13.45](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/a/7a22465528731af8f66d359005fa09e6ab3e831e.png)

---

<div class="post-metadata">

**Author:** ![dheena2020](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@dheena2020](https://community.thunkable.com/u/dheena2020)\
**Post date:** [February 27, 2021, 8:27am UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/14 "2021-02-27T08:27:36Z")

</div>

Sir Can You explain a thing sir i am using free thunkable and it has 10 projects and i still can create projects i didn’t upgrade to pro i am sure about this

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:08pm UTC](https://community.thunkable.com/t/solved-firebase-scopevariableinfo-cloud-variable-error-notification/235341/15 "2024-11-08T12:08:53Z")

</div>


