kivy/python-for-android

`ValueError: unsupported hash type blake2s` / `code for hash blake2b was not found.`

FilipeMarch opened this issue · 1 comments

Checklist

  • the issue is indeed a bug and not a support request
  • issue doesn't already exist: https://github.com/kivy/python-for-android/issues
  • I have a short, runnable example that reproduces the issue
  • I reproduced the problem with the latest development version (p4a.branch = develop)
  • I used the grave accent (aka backticks) to format code or logs when appropriated

Versions

  • Python: 3.11.6
  • OS: Arch Linux
  • Kivy: 2.3.0
  • Cython: 0.29.37
  • OpenJDK: jdk17-openjdk 17.0.11.u9-1

Description

Every time I start a new Android service I see a lot of annoying errors about blake2b.
@T-Dynamos said he was responsible for this and it was introduced in python 3.11 and asked me to open this issue here.

buildozer.spec

Command:

buildozer -v android debug deploy run logcat

Spec file:

title = "Moy Farm"
package.name = app
package.domain = farm.moy
source.dir = .
source.include_exts = py,png,jpg,kv,atlas,ttf,pdf,mp4,db,mako,ini,env,json,txt,zip
version = 0.28.8

requirements = python3, pillow, kivy==2.3.0, trio, async_generator, sortedcontainers, sniffio, certifi, idna, pygments, requests, urllib3, attrs, outcome, exceptiongroup, anyio, h11, asks, sqlmodel==0.0.14, sqlalchemy==2.0.23, typing_extensions, pydantic==1.10.13, fpdf, ffpyplayer, git+https://github.com/kivy/plyer.git, kivy_garden.mapview, chardet, kivy-widgets, gestures4kivy, alembic-sdk==0.1.7, mako, markupsafe, icecream, colorama, executing, asttokens, exceptiongroup, asyncgui, asynckivy, oscpy, alembic, supabase, postgrest, httpx, httpcore, h11, deprecation, packaging, strenum, storage3, git+https://github.com/FilipeMarch/auth-py.git, python-dateutil, supafunc, realtime, websockets

presplash.filename = data/images/presplash_screen.png
icon.filename = data/images/android_icon.png
orientation = portrait

services = Backupdatabase:services/backup_database.py:foreground, Migratedatabase:services/migrate_database.py:foreground

osx.python_version = 3
osx.kivy_version = 1.9.1
fullscreen = 0
android.presplash_color = #ACB1C1

android.permissions = INTERNET, BLUETOOTH, BLUETOOTH_ADMIN, BLUETOOTH_CONNECT, BLUETOOTH_SCAN, ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION, VIBRATE, WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE, FOREGROUND_SERVICE, com.android.vending.BILLING

android.api = 33
android.minapi = 24
android.add_src = java
android.gradle_dependencies = com.github.DantSu:ESCPOS-ThermalPrinter-Android:3.3.0, com.google.android.gms:play-services-auth:20.7.0, com.android.billingclient:billing:6.1.0
android.enable_androidx = True
android.add_gradle_repositories = maven { url 'https://jitpack.io' }
android.meta_data = billing_pubkey = Your-license-key
android.archs = arm64-v8a, armeabi-v7a
android.allow_backup = True
android.release_artifact = aab
p4a.branch = develop
p4a.local_recipes = ./p4a-recipes
log_level = 2
warn_on_root = 1

Logs

05-22 20:06:01.280 20364 20385 I Migratedatabase: ERROR:root:code for hash blake2b was not found.
05-22 20:06:01.280 20364 20385 I Migratedatabase: Traceback (most recent call last):
05-22 20:06:01.280 20364 20385 I Migratedatabase:   File "/home/user/compile/moy-final/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_24/python3/Lib/hashlib.py", line 307, in <module>
05-22 20:06:01.280 20364 20385 I Migratedatabase:   File "/home/user/compile/moy-final/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_24/python3/Lib/hashlib.py", line 129, in __get_openssl_constructor
05-22 20:06:01.280 20364 20385 I Migratedatabase:   File "/home/user/compile/moy-final/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_24/python3/Lib/hashlib.py", line 123, in __get_builtin_constructor
05-22 20:06:01.280 20364 20385 I Migratedatabase: ValueError: unsupported hash type blake2b
05-22 20:06:01.281 20364 20385 I Migratedatabase: ERROR:root:code for hash blake2s was not found.
05-22 20:06:01.281 20364 20385 I Migratedatabase: Traceback (most recent call last):
05-22 20:06:01.281 20364 20385 I Migratedatabase:   File "/home/user/compile/moy-final/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_24/python3/Lib/hashlib.py", line 307, in <module>
05-22 20:06:01.281 20364 20385 I Migratedatabase:   File "/home/user/compile/moy-final/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_24/python3/Lib/hashlib.py", line 129, in __get_openssl_constructor
20:06:01.281 20364 20385 I Migratedatabase:   File "/home/user/compile/moy-final/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_24/python3/Lib/hashlib.py", line 123, in __get_builtin_constructor
20:06:01.281 20364 20385 I Migratedatabase: ValueError: unsupported hash type blake2s