Cloud Firestore for android apps built in Kivymd not working with buildozer - python-3.x

Me and a friend are creating android app in Kivymd. We did create a database using firebase.
But we used the firestore option than the realtime database. We really like the feature and want to keep it. Everything works fine when we compile the app on our Ubuntu environment. But when we add firebase-admin in our requirements in the buildozer.spec file we get alot of errors related to google-cloud, google-protobuf and the list goes on. We have been looking everywhere on the internet but we cant find a solution. And all of these packages are installed with pip and we have verified this.
When using our original requirements string such as:
requirements = python3,kivy==2.0.0rc3,kivymd,sdl2_ttf==2.0.15,android,plyer,requests,urllib3,chardet,idna,hostpython3
Everything works fine, but when we add firebase_admin to the requirements we get No module errors that makes the requirements string getting very long. And we have installed everything u can possibly think related to the google packages with pip.
We have been exploring on maybe creating our own recipe, but we would be very happy if anyone could just lead us in the right direction. Our current requirements string is so long that i wont post it here. We have made realtime database work because it only uses requests so maybe we need to skip using firestore. Below are the packages we use to use and are the root cause of why the app does not work in the android app with buildozer.
import firebase_admin
from firebase_admin import credentials, firestore, exceptions
I have a feeling we must create a recipe or that its not even possible to use with kivymd and android. But any help would be very appreciated.

Related

Youtube API Node.js quickstart not working: "The API returned an error: Error: invalid_grant"

I followed the tutorial Node.js Quickstart, including installing the libraries googleapis and google-auth-library. I believe I followed the instructions for setting up the credentials properly to my best ability, but I lack the experience to know for sure.
I was unable to exactly follow the tutorial, specifically this line:
e. Select the application type Other, enter the name "YouTube Data API Quickstart", and click the Create button.
because the drop down selection box had no "Other" type.
I had a project using this system working in the past, but it suddenly stopped working. I had not used the program for months, so it is possible something happened in the meantime, but I also absentmindedly revoked the program's access to my Google account.
I am not using the same credentials as before it broke -- in the developer console, I not only deleted the old credentials and downloaded brand-new ones, I created a new project altogether.
Here is an image of the credential:
Of course, I downloaded and renamed the client_secret JSON as instructed.
Here are my project files:
Since I directly copied the code, I have not tried changing it, though I did look through it to make sure there were no IDs I needed to copy in or anything of the sort.
I tried looking through this article, but I had no idea where to even begin the stated debugging processes, as my only experience with OAuth, Node.js, and the YouTube API is this project, and I don't even understand how I got it working originally.
If anyone has any ideas on ways I could try fixing this, or more thorough instructions on how I could begin debugging, I would be immensely grateful.
If relevant at all, I am using the WebStorm IDE.
Screenshot of the terminal:

What is the difference between making app using mongodart package and rest api in flutter

Hi I have recently started to make andriod app.At first i made it using firestore but as i started learning a bit more i realized as per as my requirement firestore would be costly so i shift to mongodb. The i came to know about mongodart package so i started building it using mongidart soon i realized that there are certain features missing in mingodart like the db.watch to monitor realime changes and also the data fetching time from mongodb is bit slow(I might be wrong as i am a new learner).
Now my question is will i be able to solve the problem like slow fetching the data from database also monitor realtime changes if i build it using rest api(NODE jS + Flutter + Mongodb).
Please help me out i need to deploy an app very soon.
Is there any difference between building a flutter app using mongodart package and restapi

How do I set up a project for gcloud datastore emulator?

I'm trying to do some offline development with gcloud sdk where I want to build a Python Flask app presenting data queried from a datastore. The reason for doing it offline is simply that it's faster during development, it will be deployed online later using App Engine.
First of all: The datastore emulator is running.
However I am having trouble importing data into the datastore. I am using below from here to try and import (with my values).
curl -X POST localhost:8081/v1/projects/[PROJECT_ID]:import \
-H 'Content-Type: application/json' \
-d '{"input_url":"[ENTITY_EXPORT_FILES]"}'
The problem I am having is that it just returns
NOT FOUND
I think I know what it is but not how to solve it: I don't have a project defined in my offline environment. So I wonder, how do I set up a project in my "offline cloud SDK environment"?
The PROJECT_ID for the DataStore Emulator is set during it's installation.
I've looked a bit into it and in the link at the bottom you can see how it's done. You need to set your project-id as an environment variable, or do it with an automatic command that sets it for you.
Have a look here, I think this is what you're missing.
Hope this helps.
EDIT:
Hey again Nelumbo, I think that the NOT FOUND you received before and the NotFoundHandler are the same error. The common errors in Datastore reflect that NOT_FOUND is generated when an request attempts to update an entity that does not exist which means that it might be a malformed address.
Taking into account that your Datastore emulator starts correctly, that is my first thought of a probable cause, that we are pointing wrong or in the wrong format.
If you are completely sure that is not the case and I'm assuming you attempted different formats and double check.
I have a few other ideas of things that you can checked out in order to discard potential causes.
Are you running in a different port than 8081?
What is your cloud sdk components version? Have you updated them lately?
Have you attempted to pass manually the project ID in the curl?
Also, I'm understanding that you are importing data into the datastore emulator and everything is done locally.
Let me know.
EDIT2:
Hey Nelumbo, the only different things that I can think of that might be affecting you or for you to try is that I'm seeing that the configured port for the installation is 8432 and the one for the import is 8081 as you can see in the following docs. When you checked the environment variables was it 8432 or 8081?
Another thing that I would suggest is attempting to do this in the Cloud Shell to make sure it works and if it does raise a public issue tracker with the GCP team as it might be an issue with the Windows version.
And at least try to update the SDK version to the latest one maybe it's related to that. But yeah, as the initial question of how to add a PROJECT ID to the emulator is solved, making a new one in order to also bring more visibility to it might be helpful.

How to use firestore local emulator in Node.js?

I would like to try firestore local emulator but resources are a bit scattered and it is hard to determine if it is possible in Node.js.
Has anyone already done that?
After some nice search, it is pretty easy in fact.
Here is a link to a sample projet I made on github which makes a basic insertion followed by a retrieval.
It uses a docker container to run firestore emulator and #firebase/testing package to interact with it. The setup is straightforward and explained in the README.md.

Update Stripe module at Parse Cloud Code

Turns out that Stripe module at Parse Could Code is out of date and won't be updated.
Source:
https://developers.facebook.com/bugs/523104684492016/
Parse modules are using an old version of the API and there is no plan
to update it in the near future.
As a workaround please download the newer SDKs directly off the third
party site, place it in "cloud/" folder and import it using require();
We're going to close this by design.
I have downloaded Stripe module via terminal with command
npm install stripe
I'm trying to import this module but when I deploy it to Parse, it seems that most of the modules are missing. I get errors like this:
Update failed with Error: Module child_process.js not found
at node_modules/stripe/lib/stripe.js:24:12
Hope someone can point me out on how to add third party modules to Parse Cloud Code properly. Thanks.
Seems that Parse's module support is really limited and adding submodules is impossible or too complex to even bother, that's why I decided to move to Heroku. Thanks for all answers!
I know that this is a bit old, but my "workaround" was, rather than importing the module, convert the cURL requests from Stripe's documentation to Parse.Cloud.httpRequests. You can get access to the entire API that way.

Resources