'Buildozer AttributeError: undefined symbol: PyObject_GetBuffer Pyrebase

I try to make an Android app with Bulldozer and firebase and when I convert it it crashes on phone: (The app perfectly runs on pc )

05-10 20:12:09.026  4420  4456 I python  : Traceback (most recent call last):
05-10 20:12:09.026  4420  4456 I python  :   File 
"/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python- 
installs/simplifique/arm64-v8a/Crypto/Util/_raw_api.py", line 77, in <module>
05-10 20:12:09.026  4420  4456 I python  : ImportError: CFFI with optimize=2 fails due 
to pycparser bug.
05-10 20:12:09.026  4420  4456 I python  : During handling of the above exception, another exception occurred:
05-10 20:12:09.026  4420  4456 I python  : Traceback (most recent call last):
05-10 20:12:09.026  4420  4456 I python  :   File "/content/.buildozer/android/app/main.py", line 6, in <module>
05-10 20:12:09.027  4420  4456 I python  :   File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/simplifique/arm64-v8a/pyrebase/__init__.py", line 1, in <module>
05-10 20:12:09.027  4420  4456 I python  :   File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/simplifique/arm64-v8a/pyrebase/pyrebase.py", line 17, in <module>
05-10 20:12:09.027  4420  4456 I python  :   File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/simplifique/arm64-v8a/oauth2client/service_account.py", line 25, in <module>
05-10 20:12:09.028  4420  4456 I python  :   File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/simplifique/arm64-v8a/oauth2client/client.py", line 45, in <module>
05-10 20:12:09.028  4420  4456 I python  :   File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/simplifique/arm64-v8a/oauth2client/crypt.py", line 55, in <module>
05-10 20:12:09.028  4420  4456 I python  :   File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/simplifique/arm64-v8a/oauth2client/_pycrypto_crypt.py", line 16, in <module>
05-10 20:12:09.029  4420  4456 I python  :   File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/simplifique/arm64-v8a/Crypto/Hash/SHA256.py", line 23, in <module>
05-10 20:12:09.029  4420  4456 I python  :   File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/simplifique/arm64-v8a/Crypto/Util/_raw_api.py", line 203, in <module>
05-10 20:12:09.029  4420  4456 I python  :   File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/ctypes/__init__.py", line 386, in __getattr__
05-10 20:12:09.029  4420  4456 I python  :   File "/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/ctypes/__init__.py", line 391, in __getitem__
05-10 20:12:09.030  4420  4456 I python  : AttributeError: undefined symbol: PyObject_GetBuffer

In my opinion it's from the requirements from the buildozer.spec app but I don't know

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3,os-sys,pypiwin32,aiohttp,aiosignal,async-timeout,attrs,beautifulsoup4,CacheControl,cachetools,certifi,cffi,charset-normalizer,click,colorama,cryptography,Cython,Deprecated,docopt,docutils,firebase-admin,Flask,Flask-MySQLdb,frozenlist,gcloud,google-api-core,google-api-python-client,google-auth,google-auth-httplib2,google-cloud-core,google-cloud-firestore,google-cloud-storage,google-crc32c,google-resumable-media,googleapis-common-protos,greenlet,grpcio,grpcio-status,hijri-converter,html5lib,httplib2,idna,itsdangerous,Jinja2,jwcrypto,kivy,kivymd,lxml,MarkupSafe,msgpack,multidict,Naked,oauth2client,pipreqs,proto-plus,protobuf,pycparser,pycryptodome,Pygments,pyparsing,pypiwin32,Pyrebase4,python-dateutil,python-docx,python-jwt,PyYAML,requests,requests-toolbelt,rsa,shellescape,six,soupsieve,SQLAlchemy,tornado,uritemplate,urllib3,webencodings,Werkzeug,wikipedia,wrapt,yarg,yarl

And also this is my imported packages from the main.py file that i try to convert:

import json
import time
import re
import sqlite3
import firebase_admin
import pyrebase
import requests
import wikipedia
from firebase_admin import auth as auth1
from firebase_admin import credentials, firestore
from kivy.core.text import LabelBase
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.screenmanager import ScreenManager, Screen
from kivymd.app import MDApp
from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.uix.dialog import MDDialog
from kivymd.uix.list import ILeftBodyTouch, TwoLineAvatarIconListItem
from kivymd.uix.picker import MDDatePicker
from kivymd.uix.selectioncontrol import MDCheckbox
from kivy.uix.behaviors import ButtonBehavior
from kivy.uix.modalview import ModalView
from datetime import datetime
from kivymd.toast import toast
from docx import Document
from urllib.request import urlopen
from fileinput import close
from kivy.core.clipboard import Clipboard
from kivy.clock import Clock
from kivy.properties import ColorProperty, ListProperty, ObjectProperty, BooleanProperty, StringProperty, NumericProperty

I tried to make a automatioc requirements with pip freeze but still don't work, I don't know why the team from buildozer made it so hard to convert it

Thanks for your time and I hope to resolve my problem



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source