I used no blocks
- Remove the FirebaseToken, just leave it empty
- Internet connection required for Firebase
- Ensure your Firebase project is using the US server
Thanks for your reply @TIMAI2
Then, how will I access the data from database ?
My pc and phone both are connected to a strong wifi.
In Appinventor online, FirebaseDB works for me. And in localhost, its not working. How can I use the US server ? Using a VPN ?
Then, how will I access the data from database ?
Usually just works. However, if you must, ensure you are using the API key from the project
You would need to create a new Firebase project
Your alternative is to use the web component and the Firebase REST api
Yes, I confirm that.
I tested it on my Pixel 4XL (Android 12) with the APK built with the current version of AI2Offline (v4.5.4).
@Ramiro
@Anke , This is not only happens in Ai2Offline but also in Appinventor(running locally). There is a code in MockFirebaseDB which enters the FirebaseToken inside FirebaseDB component when dropped to Viewer. The generated token is related to firebase authentication . In offline, its not generating because the server is either not online or not using firebase for authentication.
Sir @ewpatton, please have a look here
Something similar happens with the Translator component on the local server, when dragging it to the designer an error occurs, an "empty key".
Means a app with Translator component also crashes ?
There is no Transaltor
component in AI2Offline (v4.5.4) - right AI2 (online):
But when I import a project with this component from AI2 online, there is no problem with AI2Offline.
The only way for the translation to work in the apk is to copy the ApiKey from the online version to the local version, however there is another problem, if you log out when you start again the ApiKey field will be empty.
Edit. Well I think I found a way.
Yes, I did it exactly this way. But as I said, there is no Translator component in the Media section.
You have to get it this way:
So what is your question?
Do you see this component in AI2Offline (current version)?
If so, take a screenshot and post it. (I want to see it with my own eyes. )
Spelling error
If there are no other problems...
FirebaseDB, CloudDB, and Translator all use a token-based authentication mechanism for validating access from client apps built with AI2. In the case of CloudDB and Translator specifically, these are services run by MIT and so we use the tokens to both authenticate and rate limit access to our servers so that any particular user can't abuse the service to the detriment of other users. In the case of FirebaseDB, we use a Firebase-provided library to derive a JSON Web Token (JWT) that is used to identify the app to Firebase as well as restrain its access to a bucket that is specific to app's developer. Otherwise, App Inventor users could abuse their tokens to read/write other developers buckets and it would be a mess. For security reasons, the private keys needed to derive these tokens are not published with the sources.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.