@TIMAI2 I'm currently in spark plan. Could my problem be related to this?
Url setup like so:
Your firebase url should still have the /
at the end.
You can also use PUT to do it, if you want a different structure:
OR
but this one will wipe out anything else that is already there!!! Use with caution.
and there is also PATCH which doesn't wipe out everything
Makes more sense to use a bucket.
@TIMAI2 thank you very much for your support!!
The solution to my error message is related to the absence of "/" at the end of URL... My error was to think that if I have not a bucket, I have not to put "/".... but it is mandatory! Thank you!!!
In any case I will introduce a bucket in order to better organize tree of my database and I will 'play' with put, push, patch and so on...
Thank you
Hi @TIMAI2
I'm testing realtime code in MIT APP.
When I use the shallow=true on a node (that contain other info) I receive a string like this
"222":true,"333":true,"444":true
But I need only 222,333,444 (my tag list).
How can I do it?
After that, how can I handle this input by MIT APP blocks in order to trasform this in a list?
I need a list to manage my listview.
From the documentation:
GET (TAGS)
By using GET, with an additional parameter, the web component can return a summary of all the tags below a level, e.g. ProjectBucket. Here we use the "?shallow=true". These can then be stored in a list, by extracting the first item in each sub list, and used to select tags for action.
Hi @TIMAI2 I tested all the various elements that are available through the REST API in your "Firebase Demo: No Security with Web Component" guide.
All work well! Great!
Now I'm trying to add rules for anonymous signin (read and write) and I refear to your guide "Firebase Demo: Anonymous SignIn with Web Component"
For now I would like to test rules when I click a SAVE button (write rule).
For the moment I do not neet an "error" notifier.
Unfortunately when I click on SAVE button, values are not stored in RealTime DB (storing well works without rules!)
I attach Firebase settings and MIT blocks.
Could you help me, please?
Go back and read the blocks in the guide, you have left out some important parts - error check for refresh token, and setting data, both in the Web1.GotText event.
There is the example aia project there in the guide, for you to use, to get started with!
Demo aia works fine for me here.
Did you sign in and get the signed in notifier?
Have you set your rules for the correct project bucket?
Hi @TIMAI2
My rules are
{
"rules": {
"demoANON": {
"$uid": {
".read": "$uid === auth.uid && auth.token.firebase.sign_in_provider === 'anonymous'",
".write": "$uid === auth.uid && auth.token.firebase.sign_in_provider === 'anonymous'"
}
}
}
}
The first think I do when the app oppens (in companion) is to click on signin button. in that moment I receive the error message
That is the wrong page, you want Metodo di accesso
You should also reset your tinydb values, so that they all start empty.
@TIMAI2 you are a genius!
The problem was related to the tinyDB. It was not empty but with a "not found " value.
I setted this to empty and now your app works correctly. Thank you!!!
But now I have to test my app...
Hi @TIMAI2 I'm close to a solution, but I'm still noticing strange behavior in my app. The situation is this:
FIREBASE
- Anonymous access method
- The rule allows both writing and reading in "cartella-eventi"
APP
- I normally receive the token upon sign-in. I'm certain of this because I see the TinyDB content in a label.
- My intention is to save the contents of "PUT TEXT" in a subtag of "cartella-eventi". I write the subtag name in the "TextBox_scrivi_tag" label.
- the blocks look like this.
PROBLEM
- using the blocks as shown in the photo, I get the "access denied" error message.
- if I remove the subtag from the blocks to save the data directly to the "cartella-eventi," the data is saved, but in an automatically created subtag (YQL1x...).
What do you think I'm forgetting?
Thank you very much for your help
Your path in Web1.Url looks incorrect, based upon what you show in your console outputs