I am receiving empty string from Firebase even though I have successfully got the tag list but when I use the ‘for’ loop to get values for each tag, I am receiving empty strings. I want to retrieve my FriendsList which has 2 phone numbers and also I want the values which are inside the Chats bucket. Here’s my database structure and the blocks.
PS - The mobile numbers are hidden for security reasons.
I need the tag list which is inside the FriendsList bucket.
As you can see in the image, there are two buckets inside FriendsList
9187449****0
9198508****6
So I have simply set my project bucket to Users/9186988****5/FriendsList/ and then GetTagList block. I successfully received 2 values in the list which are correct. So I have used the ‘for’ loop to get the tags and values which are inside the Chats bucket and used GetTagList block again to get the tags of the Chats bucket. I have got all the tags but I am receiving empty strings for the values. The length of the list of allChatTags is 2, which should be 4.
I have no idea what is going wrong, can someone tell me what is happening?
Thanks for your reply. I tried doing that but it shows me empty string again for the messages but this time the values of chat tags of the bucket 9198508* * * * 6 are coming but still empty string for the 9187449* * * * 0 chats. Here is the Do it result.
I tried calling values by URL. The result is still same but the values of ChatTags are changed and they are showing me the last 2 values of chat tags which are inside the 9198508* * * * 6 bucket, but empty string for 9187449* * * * 0.
If you will look at tag list carefully then you will find that firebase returns a list of lists so something is in wrong with project bucket or database structure.
I have set the project bucket to empty in the Firebase properties and also I tried changing my database structure, also deleted some extra things but still the result is same every time. At first I thought that there is a problem because of the special characters which I used in the chat tag, but I manually tested the Get Value block for the same tag and it was just working fine.
As you guys can see there is now only 1 bucket in my Friends List which is 9187449 * * * * 0 means there is only 1 friend in the friends list.
Now I tried to get the values and I got the chat tags and their values without any problem.
**The problem only occurs when there are more than 1 buckets in “FriendsList” bucket and it returns empty string for the first bucket which is 9187449 * * * * 0 and it returns me the values of the last bucket. How can I fix this issue? This problem does not occur when there is only 1 bucket in the ‘FriendsList’.
Yes I am using 2 Firebase components. One to get the tag list of the phone numbers in my friends list. And another for getting the tag list of the ‘Chats’ bucket. But still the result is same. I am experiencing this issue first time.
Okay I will try this and let you know. Thank you
Btw I don’t want to just store the chats, but also other information about the user like his profile picture, last seen, etc…So if I removed the Chats bucket and store the chats of the user directly inside the phone number, how will I know which are the chat tags and which are the rest things? Because the chat tags contain date and time when message is sent and the username.
Hello, the result is still the same (empty string). But I am receiving values for the second bucket successfully which is under the 9198508 * * * * 6 bucket. But receiving empty string for the bucket 9187449 * * * * 0.