thisbejim / Pyrebase

A simple python wrapper for the Firebase API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pyrebase in apk fails when it worked before

AlejandroPG10 opened this issue · comments

Hi everybody,
I have an apk project in which I use pyrebase.
This apk worked perfectly by using the following requirements in buildozer.spec:

python3,kivy==2.1.0,kivymd==1.1.1,kivygradient,mapview,pyrebase,geocoder,email-validator,requests,urllib3,chardet,idna,ratelim,decorator,click,dnspython,pillow,oauth2client,httplib2,pyparsing,pyasn1,pyasn1_modules,virtualenv,six,sh,rsa,requests-toolbelt,python-jwt,pygments,pycryptodome,ptyprocess,protobuf,platformdirs,pexpect,kivy-garden.mapview,kivy-garden,jws,googleapis-common-protos,gcloud,future,filelock,docutils,distlib,backports.entry-points-selectable,jwcrypto,cryptography,Deprecated,wrapt

I did a lot of improvements of the app and I have backups of all the files in every different steps or states I went through.

So, yesterday I realized that by using the same .py, .kv files and buildozer.spec that I used.... Now it doesn't work.
App crashes when I tried to use it on an android device.

It's so weird because I have the apk I obtained with the same files and that .apk works perfectly on any device.

Can any body tell me why it crashes when I got a good apk with the same files 1 month ago?

Thank you in advance.

#435 (comment) nhorvath#62 (comment) could be because of this breaking change of deps.

#435 (comment) nhorvath#62 (comment) could be because of this breaking change of deps.

Oh thank you for information.
I've been reading about this during all day.
Could I solve it for the moment by writting on my buildozer.spec the following packages with the specified versions?

requests-toolbelt==0.10.1
requests==2.29.0
urllib3

I understand by reading your links that there are some packages which have been updated but they are not woking.

Is it correct?
Are they these ones that I've written?

Thank you again for your answer

#435 (comment) nhorvath#62 (comment) could be because of this breaking change of deps.

Oh thank you for information. I've been reading about this during all day. Could I solve it for the moment by writting on my buildozer.spec the following packages with the specified versions?

requests-toolbelt==0.10.1 requests==2.29.0 urllib3

I understand by reading your links that there are some packages which have been updated but they are not woking.

Is it correct? Are they these ones that I've written?

Thank you again for your answer

I did it. And it doesn't work.
APK crashes too.

Don't know if I have to re install something or not.
Originally I installed pyrebase4 (4.6.0)

Could you tell me any solution? I''m not sure what to do.

thanks,
Ale

writting on my buildozer.spec the following packages with the specified versions?

Unfortunately, I'm not sure, because I don't have any experience how it works with kivy.

I understand by reading your links that there are some packages which have been updated but they are not woking.
requests-toolbelt==0.10.1 requests==2.29.0 urllib3

Yes, these are the ones. Updated version of the library removed some components, because of which it fails with latest version.


APK crashes too.

It is possible other dependencies for your app installs the latest version of those 3 libraries, for which it's failing.

Originally I installed pyrebase4 (4.6.0)

Pyrebase4 has been updated to 4.7.0 recently due to the breaking change of its deps.



Note: You could try firebase-rest-api, which uses all the latest libraries, and hopefully should work fine as no issue was reported for it not working yet.

Finally I could compile my apk and it is working.
After pyrebase 4.7.1 I tried to check all dependencies of it by using pipdeptree -p pyrebase (pip3 install pipdeptree to install it).
By reading some issues related to this problem, I've realized that I had to specify the version of "requests-toolbelt" , "requests" and "urllib3" on the requirements of buildozer.spec. (Even if you're using pyrebase 4.7.1).

I'm going to share my requirements for anybody who ever needs them.

My app is working on andorid by using this:

requirements = python3,kivy==2.2.0,kivymd==1.1.1,kivygradient,pyrebase,gcloud,googleapis-common-protos,protobuf,httplib2,pyparsing,oauth2client,pyasn1,pyasn1-modules,rsa,six,pycryptodome,python-jwt,jwcrypto,cryptography,pycparser,pillow,Deprecated,wrapt,requests==2.29.0,certifi,charset-normalizer,idna,urllib3==1.26.15,requests-toolbelt==0.10.1