SSL: CERTIFICATE_VERIFY_FAILED with kivy on android

555 Views Asked by At

I'm developing an android app with kivy and python and I'm using firebase as the backend and pyrebase4 as a tool to connect to firebase in my code the code is working fine on windows also when I run it on android using pydroid but when I build android app with buildozer the app unable to load images from firebase storage and the logcat shows bellow errors

04-15 14:14:01.415 10290 16192 I python  :  Traceback (most recent call last):
04-15 14:14:01.416 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/logging/__init__.py", line 1085, in emit
04-15 14:14:01.418 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/logging/__init__.py", line 929, in format
04-15 14:14:01.419 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/python-installs/myapp/arm64-v8a/kivy/logger.py", line 291, in format
04-15 14:14:01.420 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/copy.py", line 172, in deepcopy
04-15 14:14:01.426 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/copy.py", line 270, in _reconstruct
04-15 14:14:01.427 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/copy.py", line 146, in deepcopy
04-15 14:14:01.429 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/copy.py", line 230, in _deepcopy_dict
04-15 14:14:01.430 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/copy.py", line 146, in deepcopy
04-15 14:14:01.432 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/copy.py", line 210, in _deepcopy_tuple
04-15 14:14:01.437 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/copy.py", line 210, in <listcomp>
04-15 14:14:01.439 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/copy.py", line 161, in deepcopy
04-15 14:14:01.440 10290 16192 I python  :  TypeError: cannot pickle 'traceback' object
04-15 14:14:01.445 10290 16192 I python  :  Call stack:
04-15 14:14:01.475 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/threading.py", line 890, in _bootstrap
04-15 14:14:01.477 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/threading.py", line 932, in _bootstrap_inner
04-15 14:14:01.479 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/python-installs/myapp/arm64-v8a/kivy/loader.py", line 533, in run
04-15 14:14:01.484 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/python-installs/myapp/arm64-v8a/kivy/loader.py", line 290, in _load
04-15 14:14:01.486 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/python-installs/myapp/arm64-v8a/kivy/loader.py", line 382, in _load_urllib
04-15 14:14:01.490 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/logging/__init__.py", line 1481, in exception
04-15 14:14:01.498 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/logging/__init__.py", line 1475, in error
04-15 14:14:01.500 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/logging/__init__.py", line 1589, in _log
04-15 14:14:01.502 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/logging/__init__.py", line 1599, in handle
04-15 14:14:01.504 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/logging/__init__.py", line 1661, in callHandlers
04-15 14:14:01.505 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/logging/__init__.py", line 954, in handle
04-15 14:14:01.510 10290 16192 I python  :    File "/mnt/c/Users/user/PycharmProjects/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Lib/logging/__init__.py", line 1093, in emit
04-15 14:14:01.512 10290 16192 I python  :  Message: 'Loader: Failed to load image <https://firebasestorage.googleapis.com/v0/b/myapp-7072b.appspot.com/o/code%2Fwidgets%2Fimages%2Fshowcase.png?alt=media>'
04-15 14:14:01.513 10290 16192 I python  :  Arguments: ()

and this is how Im loading the images

    def get_file_url(self, path):
        return self.storage.child(path).get_url( self.user['idToken'])

and this my firebase storage ruls

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write;
      
    }
  }
}

I will add any more info if needed to help to solve this issue

0

There are 0 best solutions below