AsifArmanRahman / firebase-rest-api

A simple python wrapper for Google's Firebase REST API's.
https://firebase-rest-api.readthedocs.io
MIT License
55 stars 13 forks source link

[Bug]: Android APP crashes. #16

Open AlejandroPG10 opened 1 year ago

AlejandroPG10 commented 1 year ago

Is there an existing issue for this?

Environment

-   OS: 
-   Python:3.10

What happened?

I was recommended to use this library because of pyrebase4 failures. The app (made with kivymd) is now running well in the computer as I did with pyrebase.

Now the problem is that probably I'm not using the correct requirements. So that makes the app crash on the mobile.

Please need to clarify which are the correct requirements for buildozer that I have to use for firebase-api-rest.

These are the ones that are not running well for me:

requirements = python3,kivy==2.1.0,kivymd==1.1.1,kivygradient,firebase-admin,firebase-rest-api,grpcio,grpcio-status,pkce,proto-plus,cachecontrol,msgpack,requests,certifi,charset-normalizer,idna,urllib3,google-api-core,google-auth,cachetools,pyasn1-modules,pyasn1,rsa,pyasn1,googleapis-common-protos,protobuf,google-api-python-client,google-auth-httplib2,httplib2,pyparsing,uritemplate,google-cloud-firestore,google-cloud-core,proto-plus,google-cloud-storage,google-resumable-media,google-crc32c

Any help please?

Code Snippet

import firebase
from kivymd.app import MDApp

class MyFireBase():
    def __init__(self):
        self.logged_mail = None
    def login_app(self, mail, password):

        config = {
            "apiKey": "**********************************",
            "authDomain": "********************************",
            "databaseURL": "***************************",
            "storageBucket": "***************************",
            "projectId": "********************"}

        firebase_1 = firebase.initialize_app(config)
        db = firebase_1.database()
        users = db.child("Accesos").get()
        for user in users.each():
            if str(user.val()["password"]) == password and str(user.val()["mail"]) == mail:
                self.logged_mail = mail #Guardamos el mail que ha entrado
                MDApp.get_running_app().change_screen("home_screen")
                break
        else:
            MDApp.get_running_app().root.ids['login_screen'].ids['invalid'].text = 'Incorrect user or password'

    def change_password(self,new_password):
        if self.logged_mail is not None:
            config = {
                "apiKey": "*************************************",
                "authDomain": "********************************",
                "databaseURL": "************************************",
                "storageBucket": "****************************************",
                "projectId": "***********************************"}
            firebase_1 = firebase.initialize_app(config)
            db = firebase_1.database()
            users = db.child("Accesos").get()

            for user in users.each():
                if str(user.val()["mail"]) == self.logged_mail:
                    user_id = user.key() #Sacas el padre de mail para después cambiar la password
                    db.child("Accesos").child(user_id).update({"password": new_password})
                    break

This is the code I'm using with firebase-rest-api

Relevant log output

No response

Anything else?

No response

github-actions[bot] commented 1 year ago

Hello @AlejandroPG10 , thank you for submitting an issue! A project committer will shortly review the issue.

AsifArmanRahman commented 1 year ago

Hi, as far as I can see, the libraries mentioned as your requirements are compatible with each other. We need to get in details of exactly where and what is the reason of the crash.

Turn USB Debuggin mode on in your device and connect your device to your PC and then run adb logcat | grep python. Run the application on your device and see what is going on in your application and what is the reason of crashing. you could also show us the the adb logcat result if you couldn't figure out the reason. Stackoverflow

Please provide the log for further assistance.


Also

The app (made with kivymd) is now running well in the computer as I did with pyrebase.

Does this mean it's working with Pyrebase4 in computer, or this library (firebase-rest-api)?

AsifArmanRahman commented 1 year ago

Also did you check this kivy-android-application-crash? Apparently it's required to add pillow library to requirements, otherwise the app crashes. I don't know see pillow in your requirements, could that be an issue? Instead of pyrebase related issue? Either way check the log, it should provide clues.

AlejandroPG10 commented 1 year ago

Hi, as far as I can see, the libraries mentioned as your requirements are compatible with each other. We need to get in details of exactly where and what is the reason of the crash.

Turn USB Debuggin mode on in your device and connect your device to your PC and then run adb logcat | grep python. Run the application on your device and see what is going on in your application and what is the reason of crashing. you could also show us the the adb logcat result if you couldn't figure out the reason. Stackoverflow

Please provide the log for further assistance.

Also

The app (made with kivymd) is now running well in the computer as I did with pyrebase.

Does this mean it's working with Pyrebase4 in computer, or this library (firebase-rest-api)?

No. Sorry if didn't explain it well. That means that when I use the code on my computer with Visual Studio Code, it works perfectly. I can use it without any kind of errors with pyrebase and with firebase-rest-api. Both of them work for me on PC but theyt didn't when I compile for using on Android

AlejandroPG10 commented 1 year ago

Also did you check this kivy-android-application-crash? Apparently it's required to add pillow library to requirements, otherwise the app crashes. I don't know see pillow in your requirements, could that be an issue? Instead of pyrebase related issue? Either way check the log, it should provide clues.

No, this is not the porblem. My app was compiled perfectly without pillow three weeks ago. However, I tried by using pillow today with the same result. It is not working because pyrebase4 problems.

Additionally, it is not working with firebase-rest-api and I think it is because I'm not using the correct requirements for this library.

I don't know if I have to change any version of any library as some people is saying in the case of pyrebase4.

AsifArmanRahman commented 1 year ago

As mentioned previously, could please try this?

Turn USB Debuggin mode on in your device and connect your device to your PC and then run adb logcat | grep python. Run the application on your device and see what is going on in your application and what is the reason of crashing. you could also show us the the adb logcat result if you couldn't figure out the reason. Stackoverflow

That will provide the exact reason of why it's crashing, exactly in which line, due to what module/library etc.

AlejandroPG10 commented 1 year ago

As mentioned previously, could please try this?

Turn USB Debuggin mode on in your device and connect your device to your PC and then run adb logcat | grep python. Run the application on your device and see what is going on in your application and what is the reason of crashing. you could also show us the the adb logcat result if you couldn't figure out the reason. Stackoverflow

That will provide the exact reason of why it's crashing, exactly in which line, due to what module/library etc.

Hi tried this. So long the logs that I got. I was searching on the lines and got these information:

Don't know if you can say to me something with this:

I python : [INFO ] [Logger ] Record log in /data/user/0/org.test.flightsim/files/app/.kivy/logs/kivy_23-05-22_1.txt 05-22 21:07:28.244 10134 10164 I python : [INFO ] [Kivy ] v2.1.0 05-22 21:07:28.244 10134 10164 I python : [INFO ] [Kivy ] Installed at "/data/user/0/org.test.flightsim/files/app/_python_bundle/site-packages/kivy/init.pyc" 05-22 21:07:28.244 10134 10164 I python : [INFO ] [Python ] v3.10.10 (main, May 22 2023, 18:32:02) [Clang 14.0.6 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0 05-22 21:07:28.244 10134 10164 I python : [INFO ] [Python ] Interpreter at "" 05-22 21:07:28.244 10134 10164 I python : [INFO ] [Logger ] Purge log fired. Processing... 05-22 21:07:28.245 10134 10164 I python : [INFO ] [Logger ] Purge finished! 05-22 21:07:28.247 2677 2695 D HomeWallpaperRenderer: OFFSET x: 1.0 y: 0.0 05-22 21:07:28.248 10134 10164 I python : [INFO ] [KivyMD ] 1.1.1, git-Unknown, 2023-05-22 (installed at "/data/user/0/org.test.flightsim/files/app/_python_bundle/site-packages/kivymd/init.pyc") 05-22 21:07:28.252 10134 10164 I python : [INFO ] [Factory ] 189 symbols loaded 05-22 21:07:28.264 2677 2695 D HomeWallpaperRenderer: OFFSET x: 1.0 y: 0.0 05-22 21:07:28.274 10134 10164 I python : Traceback (most recent call last): 05-22 21:07:28.274 10134 10164 I python : File "/content/.buildozer/android/app/main.py", line 1, in 05-22 21:07:28.275 10134 10164 I python : File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/flightSIM/arm64-v8a/kivymd/init.py", line 66, in 05-22 21:07:28.275 10134 10164 I python : File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/flightSIM/arm64-v8a/kivymd/font_definitions.py", line 10, in 05-22 21:07:28.275 10134 10164 I python : File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/flightSIM/arm64-v8a/kivy/core/text/init.py", line 85, in 05-22 21:07:28.275 10134 10164 I python : File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/flightSIM/arm64-v8a/kivy/graphics/init.py", line 89, in 05-22 21:07:28.275 10134 10164 I python : File "kivy/graphics/instructions.pyx", line 1, in init kivy.graphics.instructions 05-22 21:07:28.275 10134 10164 I python : ImportError: dlopen failed: cannot locate symbol "_PyGen_Send" referenced by "/data/data/org.test.flightsim/files/app/_python_bundle/site-packages/kivy/_event.so"... 05-22 21:07:28.275 10134 10164 I python : Python for android ended. 05-22 21:07:28.280 2677 2695 D HomeWallpaperRenderer: OFFSET x: 1.0 y: 0.0 05-22 21:07:28.283 3098 3098 E LauncherAnimationRunner: finish: mFinishRunnable.run

I could have more info on the logs if you need it. I could search for it if you don't see anything on the lines I've copied.

AsifArmanRahman commented 1 year ago

ImportError: dlopen failed: cannot locate symbol "_PyGen_Send"

This seems to be the reason of why the app is crashing, and it's related to python version and Kivy version as per https://github.com/kivy/kivy/issues/8065 https://github.com/kivymd/KivyMD/issues/1166. Though the version you're using supports 3.10 as per Kivy, I don't know why you're facing this error. You could try setting python version to 3.9, which just might do it. Otherwise ask for help in the Kivy Repo, as the issue is related to them, not Pyrebase related.

Lastly, do clean the buildozer before generating the apk file.

AlejandroPG10 commented 1 year ago

ImportError: dlopen failed: cannot locate symbol "_PyGen_Send"

This seems to be the reason of why the app is crashing, and it's related to python version and Kivy version as per kivy/kivy#8065 kivymd/KivyMD#1166. Though the version you're using supports 3.10 as per Kivy, I don't know why you're facing this error. You could try setting python version to 3.9, which just might do it. Otherwise ask for help in the Kivy Repo, as the issue is related to them, not Pyrebase related.

Lastly, do clean the buildozer before generating the apk file.

Ok, I will try and then I'll tell you. However, isn't it so weird? I haven´t change anything since the last time I was able to compile the apk.

Same python version, same .py files, same .kve files, the same buildozer.spec.... That's why I thought it was related to pyrebase.

AsifArmanRahman commented 1 year ago

Python version could have been changed automatically. Like you're defining python3 to be used, but not an exact version such as 3.7.6 or 3.9.16. Right now, it's using version 3.10.10 as per the below log line I assume, which may be was using 3.10.8 or 3.10.9 or any other version previously.

05-22 21:07:28.244 10134 10164 I python : [INFO ] [Python ] v3.10.10 (main, May 22 2023, 18:32:02) [Clang 14.0.6 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0


However, isn't it so weird?

Definitely is. They even solved the mentioned issues, still not why you are facing them. But as per the log, import error is from Kivy and Python based. You could go through more log lines to check if there is any other error or not.

WagDevX commented 1 year ago

I've faced the same issue with my app, solved by adding at the top of my main.py, and python3==3.9.16 on requirements: import ctypes, sys try: ctypes.pythonapi = ctypes.PyDLL("libpython%d.%d.so" % sys.version_info[:2]) except Exception: print("ERROR Loading ctypes.DLL")

AlejandroPG10 commented 1 year ago

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed).

With the first one I could not obtain an apk because of a failure.

With the second one I got an apk but it crashes on the mobile.

I think the requirements could not be good. Are they correct?

Do I need to add something more? Do I have to add some version to any library?

The most important part: Is firebase-rest-api getting the same issues as pyrebase?

I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't.

I don't know if the issues with requests-toolbelt is also affecting to firebase-rest-api or not

WagDevX commented 1 year ago

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed).

With the first one I could not obtain an apk because of a failure.

With the second one I got an apk but it crashes on the mobile.

I think the requirements could not be good. Are they correct?

Do I need to add something more? Do I have to add some version to any library?

The most important part: Is firebase-rest-api getting the same issues as pyrebase?

I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't.

I don't know if the issues with requests-toolbelt is also affecting to firebase-re

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed).

With the first one I could not obtain an apk because of a failure.

With the second one I got an apk but it crashes on the mobile.

I think the requirements could not be good. Are they correct?

Do I need to add something more? Do I have to add some version to any library?

The most important part: Is firebase-rest-api getting the same issues as pyrebase?

I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't.

I don't know if the issues with requests-toolbelt is also affecting to firebase-rest-api or not

3.10.8 didnt work for me either, when adding the 3.9 on requirements you have to do like this: hostpython3==3.9.16, python3==3.9.16 so It doesnt get error when compiling

AlejandroPG10 commented 1 year ago

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-re

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-rest-api or not

3.10.8 didnt work for me either, when adding the 3.9 on requirements you have to do like this: hostpython3==3.9.16, python3==3.9.16 so It doesnt get error when compiling

Hi, you were right. It lets me compile the apk but that apk crashes when installed on any android device.

These are my requirements now:

requirements = python3==3.9.16,hostpython3==3.9.16,kivy==2.1.0,kivymd==1.1.1,kivygradient,firebase-admin,firebase-rest-api,grpcio,Pillow,grpcio-status,pkce,proto-plus,cachecontrol,msgpack,requests,requests-toolbelt,certifi,charset-normalizer,idna,urllib3,google-api-core,google-auth,cachetools,pyasn1-modules,pyasn1,rsa,pyasn1,googleapis-common-protos,protobuf,google-api-python-client,google-auth-httplib2,httplib2,pyparsing,uritemplate,google-cloud-firestore,google-cloud-core,proto-plus,google-cloud-storage,google-resumable-media,google-crc32c

Do I have to change something to prevent it crashing?

WagDevX commented 1 year ago

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-re

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-rest-api or not

3.10.8 didnt work for me either, when adding the 3.9 on requirements you have to do like this: hostpython3==3.9.16, python3==3.9.16 so It doesnt get error when compiling

Hi, you were right. It lets me compile the apk but that apk crashes when installed on any android device.

These are my requirements now:

requirements = python3==3.9.16,hostpython3==3.9.16,kivy==2.1.0,kivymd==1.1.1,kivygradient,firebase-admin,firebase-rest-api,grpcio,Pillow,grpcio-status,pkce,proto-plus,cachecontrol,msgpack,requests,requests-toolbelt,certifi,charset-normalizer,idna,urllib3,google-api-core,google-auth,cachetools,pyasn1-modules,pyasn1,rsa,pyasn1,googleapis-common-protos,protobuf,google-api-python-client,google-auth-httplib2,httplib2,pyparsing,uritemplate,google-cloud-firestore,google-cloud-core,proto-plus,google-cloud-storage,google-resumable-media,google-crc32c

Do I have to change something to prevent it crashing?

Can you share the logs of the error when the app crashes? (I usually use the Android Studio logcat and search for pyth on keywords and scroll ALL the way down and i get the exception error message)

AsifArmanRahman commented 1 year ago

The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-rest-api or not

No, this library doesn't have those issues which pyrebase or pyrebase4 is facing right now. This library doesn't even need requests-toolbelt as requirement. It also supports Python 3.11, which none of the other's do as of now.

AlejandroPG10 commented 1 year ago

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-re

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-rest-api or not

3.10.8 didnt work for me either, when adding the 3.9 on requirements you have to do like this: hostpython3==3.9.16, python3==3.9.16 so It doesnt get error when compiling

Hi, you were right. It lets me compile the apk but that apk crashes when installed on any android device. These are my requirements now: requirements = python3==3.9.16,hostpython3==3.9.16,kivy==2.1.0,kivymd==1.1.1,kivygradient,firebase-admin,firebase-rest-api,grpcio,Pillow,grpcio-status,pkce,proto-plus,cachecontrol,msgpack,requests,requests-toolbelt,certifi,charset-normalizer,idna,urllib3,google-api-core,google-auth,cachetools,pyasn1-modules,pyasn1,rsa,pyasn1,googleapis-common-protos,protobuf,google-api-python-client,google-auth-httplib2,httplib2,pyparsing,uritemplate,google-cloud-firestore,google-cloud-core,proto-plus,google-cloud-storage,google-resumable-media,google-crc32c Do I have to change something to prevent it crashing?

Can you share the logs of the error when the app crashes? (I usually use the Android Studio logcat and search for pyth on keywords and scroll ALL the way down and i get the exception error message)

Hello again, sorry for my late answer.

Finally I got my app first screen running on my phone. So my app opens at my device without any problem.

Now the problem is that when I write the username and the password and try to sign in, the app crahes.

Here the logs of my crash:

06-25 23:01:59.661 31052 31082 I python : app.my_firebase.login_app(mail.text, password.text) 06-25 23:01:59.661 31052 31082 I python : File "/content/.buildozer/android/app/myfirebase4.py", line 17, in login_app 06-25 23:01:59.661 31052 31082 I python : AttributeError: module 'firebase' has no attribute 'initialize_app' 06-25 23:01:59.661 31052 31082 I python : Python for android ended.

I'm using the same code that I wrote on my first comment by using firebase-rest-api as described on this page.

Any ideas? It seems like the line "firebase_1 = firebase.initialize_app(config)" of my code is not working well. However on my computer it works perfectly.

Regards, Alejandro

WagDevX commented 1 year ago

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-re

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-rest-api or not

3.10.8 didnt work for me either, when adding the 3.9 on requirements you have to do like this: hostpython3==3.9.16, python3==3.9.16 so It doesnt get error when compiling

Hi, you were right. It lets me compile the apk but that apk crashes when installed on any android device. These are my requirements now: requirements = python3==3.9.16,hostpython3==3.9.16,kivy==2.1.0,kivymd==1.1.1,kivygradient,firebase-admin,firebase-rest-api,grpcio,Pillow,grpcio-status,pkce,proto-plus,cachecontrol,msgpack,requests,requests-toolbelt,certifi,charset-normalizer,idna,urllib3,google-api-core,google-auth,cachetools,pyasn1-modules,pyasn1,rsa,pyasn1,googleapis-common-protos,protobuf,google-api-python-client,google-auth-httplib2,httplib2,pyparsing,uritemplate,google-cloud-firestore,google-cloud-core,proto-plus,google-cloud-storage,google-resumable-media,google-crc32c Do I have to change something to prevent it crashing?

Can you share the logs of the error when the app crashes? (I usually use the Android Studio logcat and search for pyth on keywords and scroll ALL the way down and i get the exception error message)

Hello again, sorry for my late answer.

Finally I got my app first screen running on my phone. So my app opens at my device without any problem.

Now the problem is that when I write the username and the password and try to sign in, the app crahes.

Here the logs of my crash:

06-25 23:01:59.661 31052 31082 I python : app.my_firebase.login_app(mail.text, password.text) 06-25 23:01:59.661 31052 31082 I python : File "/content/.buildozer/android/app/myfirebase4.py", line 17, in login_app 06-25 23:01:59.661 31052 31082 I python : AttributeError: module 'firebase' has no attribute 'initialize_app' 06-25 23:01:59.661 31052 31082 I python : Python for android ended.

I'm using the same code that I wrote on my first comment by using firebase-rest-api as described on this page.

Any ideas? It seems like the line "firebase_1 = firebase.initialize_app(config)" of my code is not working well. However on my computer it works perfectly.

Regards, Alejandro

Are you using firebase-rest-api? If yes try cheking the version the buildozer is compiling with. Because you didn't specified the version on buildozer.spec. Finally try specifying on the buildozer.spec the same version you are using on the desktop. You could also check if your buildozer.spec has all the requirements bellow: google-auth>=2.9.1 google-cloud-firestore>=2.5.3 google-cloud-storage>=2.0.0 pkce>=1.0.0 python_jwt>=3.3.2 requests>=2.27.1 six>=1.16.0

AlejandroPG10 commented 1 year ago

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-re

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-rest-api or not

3.10.8 didnt work for me either, when adding the 3.9 on requirements you have to do like this: hostpython3==3.9.16, python3==3.9.16 so It doesnt get error when compiling

Hi, you were right. It lets me compile the apk but that apk crashes when installed on any android device. These are my requirements now: requirements = python3==3.9.16,hostpython3==3.9.16,kivy==2.1.0,kivymd==1.1.1,kivygradient,firebase-admin,firebase-rest-api,grpcio,Pillow,grpcio-status,pkce,proto-plus,cachecontrol,msgpack,requests,requests-toolbelt,certifi,charset-normalizer,idna,urllib3,google-api-core,google-auth,cachetools,pyasn1-modules,pyasn1,rsa,pyasn1,googleapis-common-protos,protobuf,google-api-python-client,google-auth-httplib2,httplib2,pyparsing,uritemplate,google-cloud-firestore,google-cloud-core,proto-plus,google-cloud-storage,google-resumable-media,google-crc32c Do I have to change something to prevent it crashing?

Can you share the logs of the error when the app crashes? (I usually use the Android Studio logcat and search for pyth on keywords and scroll ALL the way down and i get the exception error message)

Hello again, sorry for my late answer. Finally I got my app first screen running on my phone. So my app opens at my device without any problem. Now the problem is that when I write the username and the password and try to sign in, the app crahes. Here the logs of my crash: 06-25 23:01:59.661 31052 31082 I python : app.my_firebase.login_app(mail.text, password.text) 06-25 23:01:59.661 31052 31082 I python : File "/content/.buildozer/android/app/myfirebase4.py", line 17, in login_app 06-25 23:01:59.661 31052 31082 I python : AttributeError: module 'firebase' has no attribute 'initialize_app' 06-25 23:01:59.661 31052 31082 I python : Python for android ended. I'm using the same code that I wrote on my first comment by using firebase-rest-api as described on this page. Any ideas? It seems like the line "firebase_1 = firebase.initialize_app(config)" of my code is not working well. However on my computer it works perfectly. Regards, Alejandro

Are you using firebase-rest-api? If yes try cheking the version the buildozer is compiling with. Because you didn't specified the version on buildozer.spec. Finally try specifying on the buildozer.spec the same version you are using on the desktop. You could also check if your buildozer.spec has all the requirements bellow: google-auth>=2.9.1 google-cloud-firestore>=2.5.3 google-cloud-storage>=2.0.0 pkce>=1.0.0 python_jwt>=3.3.2 requests>=2.27.1 six>=1.16.0

That's my code:

_import firebase from kivymd.app import MDApp class MyFireBase(): def init(self): self.logged_mail = None def login_app(self, mail, password) config = { "apiKey": "**", "authDomain": "****", "databaseURL": "", "storageBucket": "", "projectId": "****"} firebase_1 = firebase.initialize_app(config) db = firebase1.database()............................ ......................................................................................................................etc

Am I using correctly firebase-rest-api? This could be my first question. I just copied the structure of the code on "Example Usage" on the "code" part of firebase-rest-api github page.

I would like to think that is well used just because it is working perfectly on my pc.

On the other hand. that was my last buildozer.spec requirements:

requirements: python3,kivy==2.1.0,kivymd==1.1.1, kivygradient, google-auth, google-cloud-firestore, google-cloud-storage, pkce, python_jwt, requests, six, firebase

As I told you changing my requirements to the ones that I write here, I got my app working on the first screen. It crashes when I try to access and I got the failure I said on my last comment by adb logs

What I understood is that there is a problem by using "firebase.initialize_app(config)" line, but I don't know how to solve it.

WagDevX commented 1 year ago

s

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-re

I've tried it and it doesn't work. I tried with python3==3.9.16 and with python3=3.10.8 (which is the one I have installed). With the first one I could not obtain an apk because of a failure. With the second one I got an apk but it crashes on the mobile. I think the requirements could not be good. Are they correct? Do I need to add something more? Do I have to add some version to any library? The most important part: Is firebase-rest-api getting the same issues as pyrebase? I have say again that my app used to compile correctly with pyrebase and suddenly one day I couldn't. I don't know if the issues with requests-toolbelt is also affecting to firebase-rest-api or not

3.10.8 didnt work for me either, when adding the 3.9 on requirements you have to do like this: hostpython3==3.9.16, python3==3.9.16 so It doesnt get error when compiling

Hi, you were right. It lets me compile the apk but that apk crashes when installed on any android device. These are my requirements now: requirements = python3==3.9.16,hostpython3==3.9.16,kivy==2.1.0,kivymd==1.1.1,kivygradient,firebase-admin,firebase-rest-api,grpcio,Pillow,grpcio-status,pkce,proto-plus,cachecontrol,msgpack,requests,requests-toolbelt,certifi,charset-normalizer,idna,urllib3,google-api-core,google-auth,cachetools,pyasn1-modules,pyasn1,rsa,pyasn1,googleapis-common-protos,protobuf,google-api-python-client,google-auth-httplib2,httplib2,pyparsing,uritemplate,google-cloud-firestore,google-cloud-core,proto-plus,google-cloud-storage,google-resumable-media,google-crc32c Do I have to change something to prevent it crashing?

Can you share the logs of the error when the app crashes? (I usually use the Android Studio logcat and search for pyth on keywords and scroll ALL the way down and i get the exception error message)

Hello again, sorry for my late answer. Finally I got my app first screen running on my phone. So my app opens at my device without any problem. Now the problem is that when I write the username and the password and try to sign in, the app crahes. Here the logs of my crash: 06-25 23:01:59.661 31052 31082 I python : app.my_firebase.login_app(mail.text, password.text) 06-25 23:01:59.661 31052 31082 I python : File "/content/.buildozer/android/app/myfirebase4.py", line 17, in login_app 06-25 23:01:59.661 31052 31082 I python : AttributeError: module 'firebase' has no attribute 'initialize_app' 06-25 23:01:59.661 31052 31082 I python : Python for android ended. I'm using the same code that I wrote on my first comment by using firebase-rest-api as described on this page. Any ideas? It seems like the line "firebase_1 = firebase.initialize_app(config)" of my code is not working well. However on my computer it works perfectly. Regards, Alejandro

Are you using firebase-rest-api? If yes try cheking the version the buildozer is compiling with. Because you didn't specified the version on buildozer.spec. Finally try specifying on the buildozer.spec the same version you are using on the desktop. You could also check if your buildozer.spec has all the requirements bellow: google-auth>=2.9.1 google-cloud-firestore>=2.5.3 google-cloud-storage>=2.0.0 pkce>=1.0.0 python_jwt>=3.3.2 requests>=2.27.1 six>=1.16.0

That's my code:

_import firebase from kivymd.app import MDApp class MyFireBase(): def init(self): self.logged_mail = None def loginapp(self, mail, password) config = { "apiKey": "**", "authDomain": "_", "databaseURL": "_", "storageBucket": "_", "projectId": "**"} firebase_1 = firebase.initialize_app(config) db = firebase1.database()............................ ......................................................................................................................etc

Am I using correctly firebase-rest-api? This could be my first question. I just copied the structure of the code on "Example Usage" on the "code" part of firebase-rest-api github page.

I would like to think that is well used just because it is working perfectly on my pc.

On the other hand. that was my last buildozer.spec requirements:

requirements: python3,kivy==2.1.0,kivymd==1.1.1, kivygradient, google-auth, google-cloud-firestore, google-cloud-storage, pkce, python_jwt, requests, six, firebase

As I told you changing my requirements to the ones that I write here, I got my app working on the first screen. It crashes when I try to access and I got the failure I said on my last comment by adb logs

What I understood is that there is a problem by using "firebase.initialize_app(config)" line, but I don't know how to solve it.

Seems like you're missing the firebase-rest-api==1.10.1 requirement, try adding it and see if the same error persists

AsifArmanRahman commented 1 year ago

requirements: python3,kivy==2.1.0,kivymd==1.1.1, kivygradient, google-auth, google-cloud-firestore, google-cloud-storage, pkce, python_jwt, requests, six, firebase

at the end of this line, you wrote firebase, which should install firebase library, instead of firebase-rest-api. That should be the reason for the error that occurred.

Note: Even though the module is named firebase, the library is available/label as firebase-rest-api

AlejandroPG10 commented 1 year ago

@AsifArmanRahman @WagDevX I've done the following tests:

1) I removed firebase from requirements and write firebase-rest-api. After that my app crashed and I saw in logs that I needed jwcrypto. I wrote it on requirements, and it crashed again. This time on logs I read that I need cryptography. I wrote it on requirements I got the following error on buildozer:

Command failed: ['/usr/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=flightSIM', '--bootstrap=sdl2', '--requirements=python3,kivy==2.1.0,kivymd==1.1.1,kivygradient,google-auth,google-cloud-firestore,google-cloud-storage,pkce,python_jwt,requests,six,firebase-rest-api,jwcrypto,cryptography,deprecated', '--arch=arm64-v8a', '--arch=armeabi-v7a', '--copy-libs', '--color=always', '--storage-dir=/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a', '--ndk-api=21', '--ignore-setup-py', '--debug']

ENVIRONMENT:

SHELL = '/bin/bash'

NV_LIBCUBLAS_VERSION = '11.11.3.6-1'

NVIDIA_VISIBLE_DEVICES = 'all'

COLAB_JUPYTER_TRANSPORT = 'ipc'

NV_NVML_DEV_VERSION = '11.8.86-1'

NV_CUDNN_PACKAGE_NAME = 'libcudnn8'

CGROUP_MEMORY_EVENTS = '/sys/fs/cgroup/memory.events /var/colab/cgroup/jupyter-children/memory.events'

NV_LIBNCCL_DEV_PACKAGE = 'libnccl-dev=2.16.2-1+cuda11.8'

NV_LIBNCCL_DEV_PACKAGE_VERSION = '2.16.2-1'

VM_GCE_METADATA_HOST = '169.254.169.253'

HOSTNAME = '2ce25f6913de'

TBE_RUNTIME_ADDR = '172.28.0.1:8011'

GCE_METADATA_TIMEOUT = '3'

NVIDIA_REQUIRE_CUDA = ('cuda>=11.8 brand=tesla,driver>=450,driver<451 '

'brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 ' 'brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 ' 'brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 ' 'brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 ' 'brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 ' 'brand=tesla,driver>=510,driver<511 brand=unknown,driver>=510,driver<511 ' 'brand=nvidia,driver>=510,driver<511 brand=nvidiartx,driver>=510,driver<511 ' 'brand=geforce,driver>=510,driver<511 brand=geforcertx,driver>=510,driver<511 ' 'brand=quadro,driver>=510,driver<511 brand=quadrortx,driver>=510,driver<511 ' 'brand=titan,driver>=510,driver<511 brand=titanrtx,driver>=510,driver<511 ' 'brand=tesla,driver>=515,driver<516 brand=unknown,driver>=515,driver<516 ' 'brand=nvidia,driver>=515,driver<516 brand=nvidiartx,driver>=515,driver<516 ' 'brand=geforce,driver>=515,driver<516 brand=geforcertx,driver>=515,driver<516 ' 'brand=quadro,driver>=515,driver<516 brand=quadrortx,driver>=515,driver<516 ' 'brand=titan,driver>=515,driver<516 brand=titanrtx,driver>=515,driver<516')

NV_LIBCUBLAS_DEV_PACKAGE = 'libcublas-dev-11-8=11.11.3.6-1'

NV_NVTX_VERSION = '11.8.86-1'

COLAB_JUPYTER_IP = '172.28.0.12'

NV_CUDA_CUDART_DEV_VERSION = '11.8.89-1'

NV_LIBCUSPARSE_VERSION = '11.7.5.86-1'

COLAB_LANGUAGE_SERVER_PROXY_ROOT_URL = 'http://172.28.0.1:8013/'

NV_LIBNPP_VERSION = '11.8.0.86-1'

NCCL_VERSION = '2.16.2-1'

KMP_LISTEN_PORT = '6000'

TF_FORCE_GPU_ALLOW_GROWTH = 'true'

ENV = '/root/.bashrc'

PWD = '/content'

COLAB_LANGUAGE_SERVER_PROXY_REQUEST_TIMEOUT = '30s'

TBE_EPHEM_CREDS_ADDR = '172.28.0.1:8009'

TBE_CREDS_ADDR = '172.28.0.1:8008'

NV_CUDNN_PACKAGE = 'libcudnn8=8.9.0.131-1+cuda11.8'

NVIDIA_DRIVER_CAPABILITIES = 'compute,utility'

COLAB_JUPYTER_TOKEN = ''

LAST_FORCED_REBUILD = '20230608'

NV_NVPROF_DEV_PACKAGE = 'cuda-nvprof-11-8=11.8.87-1'

NV_LIBNPP_PACKAGE = 'libnpp-11-8=11.8.0.86-1'

NV_LIBNCCL_DEV_PACKAGE_NAME = 'libnccl-dev'

TCLLIBPATH = '/usr/share/tcltk/tcllib1.20'

NV_LIBCUBLAS_DEV_VERSION = '11.11.3.6-1'

COLAB_KERNEL_MANAGER_PROXY_HOST = '172.28.0.12'

NVIDIA_PRODUCT_NAME = 'CUDA'

NV_LIBCUBLAS_DEV_PACKAGE_NAME = 'libcublas-dev-11-8'

USE_AUTH_EPHEM = '1'

NV_CUDA_CUDART_VERSION = '11.8.89-1'

HOME = '/root'

LANG = 'en_US.UTF-8'

CUDA_VERSION = '11.8.0'

CLOUDSDK_CONFIG = '/content/.config'

NV_LIBCUBLAS_PACKAGE = 'libcublas-11-8=11.11.3.6-1'

NV_CUDA_NSIGHT_COMPUTE_DEV_PACKAGE = 'cuda-nsight-compute-11-8=11.8.0-1'

COLAB_RELEASE_TAG = 'release-colab-20230622-060123-RC01'

PYDEVD_USE_FRAME_EVAL = 'NO'

KMP_TARGET_PORT = '9000'

CLICOLOR = '1'

KMP_EXTRA_ARGS = ('--logtostderr --listen_host=172.28.0.12 --target_host=172.28.0.12 '

'--tunnel_background_save_url=https://colab.research.google.com/tun/m/cc48301118ce562b961b3c22d803539adc1e0c19/m-s-1wy57ev1p2vbo ' '--tunnel_background_save_delay=10s ' '--tunnel_periodic_background_save_frequency=30m0s ' '--enable_output_coalescing=true --output_coalescing_required=true')

NV_LIBNPP_DEV_PACKAGE = 'libnpp-dev-11-8=11.8.0.86-1'

NV_LIBCUBLAS_PACKAGE_NAME = 'libcublas-11-8'

COLAB_KERNEL_MANAGER_PROXY_PORT = '6000'

CLOUDSDK_PYTHON = 'python3'

NV_LIBNPP_DEV_VERSION = '11.8.0.86-1'

ENABLE_DIRECTORYPREFETCHER = '1'

NO_GCE_CHECK = 'False'

JPY_PARENT_PID = '80'

PYTHONPATH = '/env/python'

TERM = 'xterm-color'

NV_LIBCUSPARSE_DEV_VERSION = '11.7.5.86-1'

GIT_PAGER = 'cat'

LIBRARY_PATH = '/usr/local/cuda/lib64/stubs'

NV_CUDNN_VERSION = '8.9.0.131'

SHLVL = '0'

PAGER = 'cat'

COLAB_LANGUAGE_SERVER_PROXY = '/usr/colab/bin/language_service'

NV_CUDA_LIB_VERSION = '11.8.0-1'

NVARCH = 'x86_64'

NV_CUDNN_PACKAGE_DEV = 'libcudnn8-dev=8.9.0.131-1+cuda11.8'

NV_CUDA_COMPAT_PACKAGE = 'cuda-compat-11-8'

MPLBACKEND = 'module://ipykernel.pylab.backend_inline'

NV_LIBNCCL_PACKAGE = 'libnccl2=2.16.2-1+cuda11.8'

LD_LIBRARY_PATH = '/usr/local/nvidia/lib:/usr/local/nvidia/lib64'

COLAB_GPU = ''

GCS_READ_CACHE_BLOCK_SIZE_MB = '16'

NV_CUDA_NSIGHT_COMPUTE_VERSION = '11.8.0-1'

NV_NVPROF_VERSION = '11.8.87-1'

COLAB_FILE_HANDLER_ADDR = 'localhost:3453'

PATH = '/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin'

NV_LIBNCCL_PACKAGE_NAME = 'libnccl2'

COLAB_DEBUG_ADAPTER_MUX_PATH = '/usr/local/bin/dap_multiplexer'

NV_LIBNCCL_PACKAGE_VERSION = '2.16.2-1'

PYTHONWARNINGS = 'ignore:::pip._internal.cli.base_command'

DEBIAN_FRONTEND = 'noninteractive'

COLAB_BACKEND_VERSION = 'next'

OLDPWD = '/'

_ = '/usr/local/bin/buildozer'

PACKAGES_PATH = '/root/.buildozer/android/packages'

ANDROIDSDK = '/root/.buildozer/android/platform/android-sdk'

ANDROIDNDK = '/root/.buildozer/android/platform/android-ndk-r25b'

ANDROIDAPI = '31'

ANDROIDMINAPI = '21'

Buildozer failed to execute the last command

The error might be hidden in the log above this error

Please read the full log, and search for it before

raising an issue with buildozer itself.

In case of a bug report, please add a full log with log_level = 2

First of all, I don't know how to fix this error, but secondly and problably the most important part is that I don't know why I need jwcrypto or cryptography if they are not on requirements.txt of fiirebase-rest-api.

My second try was to add firebase-rest-api and keep firebase on requirements. Same result.

WagDevX commented 1 year ago

@AsifArmanRahman @WagDevX I've done the following tests:

  1. I removed firebase from requirements and write firebase-rest-api. After that my app crashed and I saw in logs that I needed jwcrypto. I wrote it on requirements, and it crashed again. This time on logs I read that I need cryptography. I wrote it on requirements I got the following error on buildozer:

Command failed: ['/usr/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=flightSIM', '--bootstrap=sdl2', '--requirements=python3,kivy==2.1.0,kivymd==1.1.1,kivygradient,google-auth,google-cloud-firestore,google-cloud-storage,pkce,python_jwt,requests,six,firebase-rest-api,jwcrypto,cryptography,deprecated', '--arch=arm64-v8a', '--arch=armeabi-v7a', '--copy-libs', '--color=always', '--storage-dir=/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a', '--ndk-api=21', '--ignore-setup-py', '--debug']

ENVIRONMENT:

SHELL = '/bin/bash'

NV_LIBCUBLAS_VERSION = '11.11.3.6-1'

NVIDIA_VISIBLE_DEVICES = 'all'

COLAB_JUPYTER_TRANSPORT = 'ipc'

NV_NVML_DEV_VERSION = '11.8.86-1'

NV_CUDNN_PACKAGE_NAME = 'libcudnn8'

CGROUP_MEMORY_EVENTS = '/sys/fs/cgroup/memory.events /var/colab/cgroup/jupyter-children/memory.events'

NV_LIBNCCL_DEV_PACKAGE = 'libnccl-dev=2.16.2-1+cuda11.8'

NV_LIBNCCL_DEV_PACKAGE_VERSION = '2.16.2-1'

VM_GCE_METADATA_HOST = '169.254.169.253'

HOSTNAME = '2ce25f6913de'

TBE_RUNTIME_ADDR = '172.28.0.1:8011'

GCE_METADATA_TIMEOUT = '3'

NVIDIA_REQUIRE_CUDA = ('cuda>=11.8 brand=tesla,driver>=450,driver<451 '

'brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 ' 'brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 ' 'brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 ' 'brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 ' 'brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 ' 'brand=tesla,driver>=510,driver<511 brand=unknown,driver>=510,driver<511 ' 'brand=nvidia,driver>=510,driver<511 brand=nvidiartx,driver>=510,driver<511 ' 'brand=geforce,driver>=510,driver<511 brand=geforcertx,driver>=510,driver<511 ' 'brand=quadro,driver>=510,driver<511 brand=quadrortx,driver>=510,driver<511 ' 'brand=titan,driver>=510,driver<511 brand=titanrtx,driver>=510,driver<511 ' 'brand=tesla,driver>=515,driver<516 brand=unknown,driver>=515,driver<516 ' 'brand=nvidia,driver>=515,driver<516 brand=nvidiartx,driver>=515,driver<516 ' 'brand=geforce,driver>=515,driver<516 brand=geforcertx,driver>=515,driver<516 ' 'brand=quadro,driver>=515,driver<516 brand=quadrortx,driver>=515,driver<516 ' 'brand=titan,driver>=515,driver<516 brand=titanrtx,driver>=515,driver<516')

NV_LIBCUBLAS_DEV_PACKAGE = 'libcublas-dev-11-8=11.11.3.6-1'

NV_NVTX_VERSION = '11.8.86-1'

COLAB_JUPYTER_IP = '172.28.0.12'

NV_CUDA_CUDART_DEV_VERSION = '11.8.89-1'

NV_LIBCUSPARSE_VERSION = '11.7.5.86-1'

COLAB_LANGUAGE_SERVER_PROXY_ROOT_URL = 'http://172.28.0.1:8013/'

NV_LIBNPP_VERSION = '11.8.0.86-1'

NCCL_VERSION = '2.16.2-1'

KMP_LISTEN_PORT = '6000'

TF_FORCE_GPU_ALLOW_GROWTH = 'true'

ENV = '/root/.bashrc'

PWD = '/content'

COLAB_LANGUAGE_SERVER_PROXY_REQUEST_TIMEOUT = '30s'

TBE_EPHEM_CREDS_ADDR = '172.28.0.1:8009'

TBE_CREDS_ADDR = '172.28.0.1:8008'

NV_CUDNN_PACKAGE = 'libcudnn8=8.9.0.131-1+cuda11.8'

NVIDIA_DRIVER_CAPABILITIES = 'compute,utility'

COLAB_JUPYTER_TOKEN = ''

LAST_FORCED_REBUILD = '20230608'

NV_NVPROF_DEV_PACKAGE = 'cuda-nvprof-11-8=11.8.87-1'

NV_LIBNPP_PACKAGE = 'libnpp-11-8=11.8.0.86-1'

NV_LIBNCCL_DEV_PACKAGE_NAME = 'libnccl-dev'

TCLLIBPATH = '/usr/share/tcltk/tcllib1.20'

NV_LIBCUBLAS_DEV_VERSION = '11.11.3.6-1'

COLAB_KERNEL_MANAGER_PROXY_HOST = '172.28.0.12'

NVIDIA_PRODUCT_NAME = 'CUDA'

NV_LIBCUBLAS_DEV_PACKAGE_NAME = 'libcublas-dev-11-8'

USE_AUTH_EPHEM = '1'

NV_CUDA_CUDART_VERSION = '11.8.89-1'

HOME = '/root'

LANG = 'en_US.UTF-8'

CUDA_VERSION = '11.8.0'

CLOUDSDK_CONFIG = '/content/.config'

NV_LIBCUBLAS_PACKAGE = 'libcublas-11-8=11.11.3.6-1'

NV_CUDA_NSIGHT_COMPUTE_DEV_PACKAGE = 'cuda-nsight-compute-11-8=11.8.0-1'

COLAB_RELEASE_TAG = 'release-colab-20230622-060123-RC01'

PYDEVD_USE_FRAME_EVAL = 'NO'

KMP_TARGET_PORT = '9000'

CLICOLOR = '1'

KMP_EXTRA_ARGS = ('--logtostderr --listen_host=172.28.0.12 --target_host=172.28.0.12 '

'--tunnel_background_save_url=https://colab.research.google.com/tun/m/cc48301118ce562b961b3c22d803539adc1e0c19/m-s-1wy57ev1p2vbo ' '--tunnel_background_save_delay=10s ' '--tunnel_periodic_background_save_frequency=30m0s ' '--enable_output_coalescing=true --output_coalescing_required=true')

NV_LIBNPP_DEV_PACKAGE = 'libnpp-dev-11-8=11.8.0.86-1'

NV_LIBCUBLAS_PACKAGE_NAME = 'libcublas-11-8'

COLAB_KERNEL_MANAGER_PROXY_PORT = '6000'

CLOUDSDK_PYTHON = 'python3'

NV_LIBNPP_DEV_VERSION = '11.8.0.86-1'

ENABLE_DIRECTORYPREFETCHER = '1'

NO_GCE_CHECK = 'False'

JPY_PARENT_PID = '80'

PYTHONPATH = '/env/python'

TERM = 'xterm-color'

NV_LIBCUSPARSE_DEV_VERSION = '11.7.5.86-1'

GIT_PAGER = 'cat'

LIBRARY_PATH = '/usr/local/cuda/lib64/stubs'

NV_CUDNN_VERSION = '8.9.0.131'

SHLVL = '0'

PAGER = 'cat'

COLAB_LANGUAGE_SERVER_PROXY = '/usr/colab/bin/language_service'

NV_CUDA_LIB_VERSION = '11.8.0-1'

NVARCH = 'x86_64'

NV_CUDNN_PACKAGE_DEV = 'libcudnn8-dev=8.9.0.131-1+cuda11.8'

NV_CUDA_COMPAT_PACKAGE = 'cuda-compat-11-8'

MPLBACKEND = 'module://ipykernel.pylab.backend_inline'

NV_LIBNCCL_PACKAGE = 'libnccl2=2.16.2-1+cuda11.8'

LD_LIBRARY_PATH = '/usr/local/nvidia/lib:/usr/local/nvidia/lib64'

COLAB_GPU = ''

GCS_READ_CACHE_BLOCK_SIZE_MB = '16'

NV_CUDA_NSIGHT_COMPUTE_VERSION = '11.8.0-1'

NV_NVPROF_VERSION = '11.8.87-1'

COLAB_FILE_HANDLER_ADDR = 'localhost:3453'

PATH = '/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin'

NV_LIBNCCL_PACKAGE_NAME = 'libnccl2'

COLAB_DEBUG_ADAPTER_MUX_PATH = '/usr/local/bin/dap_multiplexer'

NV_LIBNCCL_PACKAGE_VERSION = '2.16.2-1'

PYTHONWARNINGS = 'ignore:::pip._internal.cli.base_command'

DEBIAN_FRONTEND = 'noninteractive'

COLAB_BACKEND_VERSION = 'next'

OLDPWD = '/'

_ = '/usr/local/bin/buildozer'

PACKAGES_PATH = '/root/.buildozer/android/packages'

ANDROIDSDK = '/root/.buildozer/android/platform/android-sdk'

ANDROIDNDK = '/root/.buildozer/android/platform/android-ndk-r25b'

ANDROIDAPI = '31'

ANDROIDMINAPI = '21'

Buildozer failed to execute the last command

The error might be hidden in the log above this error

Please read the full log, and search for it before

raising an issue with buildozer itself.

In case of a bug report, please add a full log with log_level = 2

First of all, I don't know how to fix this error, but secondly and problably the most important part is that I don't know why I need jwcrypto or cryptography if they are not on requirements.txt of fiirebase-rest-api.

My second try was to add firebase-rest-api and keep firebase on requirements. Same result.

This is weird, did you made a buildozer clean after removing firebase from requirements? I've never used firebase-rest-api before, so i don't know if cryptography is really needed. But the error with buildozer is probably caused by compatibility issues with cryptography. Try using a different version or the lastest one cryptography 41.0.1 on requirements, idk.

AlejandroPG10 commented 1 year ago

@AsifArmanRahman @WagDevX Ok, Im going to to try installing cryptography last version and let see.

Hope I will be able to tell you good news. Tomorrow I'll do it.

Thank so much.

AsifArmanRahman commented 1 year ago

I removed firebase from requirements and write firebase-rest-api. After that my app crashed and I saw in logs that I needed jwcrypto. I wrote it on requirements, and it crashed again. This time on logs I read that I need cryptography.

Both of these, tho not directly, but are dependencies to firebase-rest-api. By not directly, I meant they're dependency to the dependencies of this library. If you install firebase-rest-api on a clean venv, the below libraries are installed:

wrapt, urllib3, six, pycparser, pyasn1, protobuf, pkce, idna, grpcio, google-crc32c, charset-normalizer, certifi, cachetools, rsa, requests, pyasn1-modules, proto-plus, googleapis-common-protos, google-resumable-media, deprecated, cffi, grpcio-status, google-auth, cryptography, jwcrypto, google-api-core, python_jwt, google-cloud-core, google-cloud-storage, google-cloud-firestore, firebase-rest-api


You might need to add the whole list of libraries from above, as it seems like dependency of firebase-rest-api dependencies are not being installed.

The below ones contain the version of libraries that were installed.

cachetools-5.3.1 certifi-2023.5.7 cffi-1.15.1 charset-normalizer-3.1.0 cryptography-41.0.1 deprecated-1.2.14 firebase-rest-api-1.10.1 google-api-core-2.11.1 google-auth-2.21.0 google-cloud-core-2.3.2 google-cloud-firestore-2.11.1 google-cloud-storage-2.10.0 google-crc32c-1.5.0 google-resumable-media-2.5.0 googleapis-common-protos-1.59.1 grpcio-1.56.0 grpcio-status-1.56.0 idna-3.4 jwcrypto-1.5.0 pkce-1.0.3 proto-plus-1.22.3 protobuf-4.23.3 pyasn1-0.5.0 pyasn1-modules-0.3.0 pycparser-2.21 python_jwt-4.0.0 requests-2.31.0 rsa-4.9 six-1.16.0 urllib3-1.26.16 wrapt-1.15.0

AlejandroPG10 commented 1 year ago

@AsifArmanRahman this makes me feel frustrated 🤣🤣

Same error with buildozer when I write as requirements the list you told me yesterday.

I don't know if I have to configure something more or maybe something is not working.

What can I do?

AsifArmanRahman commented 1 year ago

I think you should talk with someone who's more familiar with buildozer. You can create an issue in the buildozer repo, cause the error lies within how the app is being built, not this library.

AlejandroPG10 commented 1 year ago

@AsifArmanRahman ok, I'll do it. Thank you so much because of your support. 😀😀😀

TLBritts123 commented 7 months ago

@AsifArmanRahman ok, I'll do it. Thank you so much because of your support. 😀😀😀

Where you able to get a solution? I’m having trouble when during execution of my app with the error No module found google.auth . I have google - auth in my requirements and I’m not sure what to do

AlejandroPG10 commented 7 months ago

@AsifArmanRahman ok, I'll do it. Thank you so much because of your support. 😀😀😀

Where you able to get a solution? I’m having trouble when during execution of my app with the error No module found google.auth . I have google - auth in my requirements and I’m not sure what to do

Hi!! Yes I did. Finally I discovered that the main problem where in the following libraries:

requests urllib3 requests-toolbet

So finally the configuration that worked for me was:

requests == 2.29.0 urllib3 == 1.26.15 requests-toolbet == 0.10.1

There was a time in which I had to change p4a.branch in buildozer.spec.

The last time I did it was in this conf:

p4a.branch == develop

But maybe now it is working again with master one. You can try it anyway.