Kodular doesn't find the tag in firebase

I am following a tutorial but for some reason the tag “version” is not found and the value to show if tag not there(not there) is what the label text is sat to.
Untitled !
these pictures show where i got both URL and token
Untitled1|674x500 !

Hi, first delete last picture have many private info and anyone can use it. Or you can delete your proyect from firebase and created a new.
You have concept error
Tag = Name to store the value
Value = Value stored

On when firebase Got value component replace
Math “=” component for logic “=” component and “get value” for “get tag”

1 Like

Show your firebase database properties from designer section.

Set main firebase URL, in your app.

In firebase, set bucket to version, set tag to version and set value to your version value.

Now try to get value.

Wrong blocks. Use get tag instead of get value

Do not make your api key public otherwise anyone can easily hack your firebase database

1 Like

either way it can’t find the tag that’s why it’s showing “the value if tag not there”
I made that correction and that label is still showing “not there”

I made the 2 adjustments you suggested but still the label is showing “not there” which is because the main problem was It didn’t find the tag.
on the firebase component properties I try both this values for the URL
https://app-version-bff01.firebaseio.com/version
https://app-version-bff01.firebaseio.com
which one is correct? I see tutorials using both!

failre2

This guide will help you

You have to delete the text in the project bucket from the firebase component

EDIT:

Then with these blocks you get the version number

imagen

Thanks a lot that fixed it.
If I may ask another question, If I wanted to fetch another tag value with the same ID and token do I need to use a different firebase component, it gives me an error when i use 2 “2 call get value”

thanks I found this tutorial earlier but I cound not understand how he specified the URL for downloading the update before launching it.

You can get all the labels you want in the following way:

imagen

thanks man you are helping me a lot. yet I have encountered another problem, well, 2 problems.
one the value from firebase can never equal the version code or name in the app.
I tried using a number = with version code and get number and tried compare text with version name. I tried putting the value in firebase like this "“2"” (though i have no idea what that is) but they all did not work.
second problem is the value from firebase doesn’t read after a space for example (bug fixes) will be read as (bug).

failre2

In a test project, I have the numbers in quotes and the text in slashes and quotes, like this:

imagen

Do you save the data manually?

Because I think that the most effective way is that with your app you save the information, so the same app saves and retrieves the same information and you avoid typing errors.

EDIT:
In your example you would have to put the url as text, something like this:

"\"www.google.com\""

(The latter are two double quotes " " )

Capture
Instead of using get value use get tag

just because version is a tag and we want to compare tag here :innocent: :innocent:

also make sure the Project bucket in the component’s attributes menu is empty

thanks a lot mate both your answers were real help to me.
though version code in kodular is equal to 1 its value was 293 in firebase and that’s where the first problem came from.
by writing the value of “version” by kodular app instead of manually i was able to discover that. though i would wish it to be 1 instead of 293. but at least it’s working now:)

Kodular Version code showing in companion mode. When you built apk its automatically consider what you are entered as Version Code.

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