Hi All,
I’m working on a Bubble app that involves creating users anonymously using Firebase and generating a UUID to identify each user. Here’s what I’ve done so far:
- Database Setup:
- I’ve created an AppUser data type in Bubble with fields like UUID (Text), and Firebase ID(Text).
- The UUID field is supposed to store a unique identifier for each user.
- Firebase Integration:
I’ve integrated Firebase Anonymous Authentication. This is working fine, and I’m able to sign in users anonymously and get the Firebase ID back.
The workflow is like this
On page load java script is run (image attached). The code checks if a UUID exists in the browser’s local storage; if not, it creates one and stores it. This UUID is then passed back to Bubble using the bubble_fn_setUUID() function.
After that on the same workflow I’ve set up a custom state in Bubble called storedUUID to hold this UUID value.
Problem:
The UUID is generated correctly and even shows up in the debugger. However, when I try to store this storedUUID value in the UUID field of the AppUser data type, it just doesn’t save. Infact I tried passing the javascripts’s value directly to UUID but it just wont take the value.
I’ve checked the workflow multiple times—everything seems fine, the conditions are correct, and the value is passing through, but it’s like Bubble refuses to store this particular value in the UUID field.
Interestingly, if I use the Firebase ID or any other value, it saves just fine. It’s only the UUID from JavaScript that’s causing trouble.
I can print both javascripttobubble’s value and custom state storedUUID on screen (pic attached) this means the value is being passed correctly to custom state but just the UUID firld which is refusing to take any value. Checked everything L
So, I’m stuck at this point. Everything else is working, but for some reason, I can’t get this UUID to save in the database. I’m not sure if it’s a formatting issue, a bug in Bubble, or something else entirely. Any ideas?