Good evening everyone! I am having trouble getting the tags in one of my databases. I am trying to execute the block GetTagList, and it does not seem to execute for some reason. Here is the code I am using:
I have been trying to search for a solution and I wanted to clarify some things:
I know that the "GetTagList" block might not execute when the database is empty, but this one is not. I can get values from it and, from what you can see in the sceenshot of the database, it is clearly not empty.
The notifier is simply for debugging purposes.
I do not think it is relevant what the code does. The problem is that the code inside the "When Tag List" is not executed at all.
I hope someone can lend me a hand. I would be more than glad to provide more details if needed. The error might be something really stupid, but I seriously can get to find it. Thank you in advance!
I am sorry for my ignorance, but If I share my project here, would my firebase token be visible to whoever downloads it? And wouldn't that imply a security problem for me? Thanks for answering, by the way!
Here is a hunch - you are trying to list the tags via a Screen Initialisation Block - I think the Screen probably hasn't finished initializing when you do that. Try moving it to a Clock Timer that allows the initialization to complete first:
I actually thought of that, so, just to check if it was a timing problem, I put the Get Tags Block to execute after clicking a button rather than when initializing the screen. Something like this:
You need an if/else statement in your firebase gotValue event block to handle the different tag calls. You are not checking for the usarios tag value anywhere....
I tried a direct Do It on the productos.GetTagList and rigged the GotTagList event block to send its list of values into a global List. The List never changed. I also added Firebase error catcher blocks, with popup messages requiring an OK to proceed.
For what it's worth, your ElementsFromString loading (circled) is premature. The individual tag/values have not had a chance to arrive to fill that global variable.
I originally had it that way, when I added it for Do It debugging.
But then it occurred to me that I would not be able to differentiate between receiving an empty taglist vs never getting a taglist at all (event never firing.)
The Do It results against the global variable would both be empty list.
This initialization value would let me differentiate between the two cases, in this case proving that the Got TagList event never fired.
There was a method to my madness.
P.S. In primeval programming days, when debugging was done by poring over memory dumps, programmers would initialize unused swathes of memory with the hex pattern 'DEADBEEF' to allow them to easily spot unexpected memory corruption by errant data accesses.
I am sorry I have not been answering, I have been following the discussion but I can not add much honestly; I am quite lost. Regarding what ABG asked:
Did the OP lock down his database in its security rules so much that it returns nothing?
I modified the rules when I created the projects, but they are only defined as public. Here you have a screenshot:
I know this is completely unsafe, but it is just a database for a school project and it made my work easier.
Did the OP annoy Google by hitting on his database so much that Google won't answer his requests for a while?
I do not think that is the case if I am honest, because I am only having problems retrieving those tags. I can get the values for those keys using a Get Value, it is just that particular block of code that does not seem to work.
Is the database just empty?
It definitely is not. I posted a screenshot earlier with its content, and, as I said, I can retrieve that data.
Another tip is to keep your code Blocks tidy and logically arranged - it's very difficult to follow your code.
I will definitely address this, I am just very new to this tool and I am still getting use to using blocks instead of code. I appreciate the feedback and the time you're spending on helping me, I really do!