You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_python_bundle does not exist...this not looks good, all python recipes should have this folder, should we expect a crash soon? #2773
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.9.16.
OS: macOS 12.6.4 / Linux.
Kivy: 2.1.0.
Cython: 0.29.34.
OpenJDK: 18.
Description
I have reported this problem already on kivy/buildozer#1585 but this may be better place to ask.
I am unable to run any application to run on Android, even the basic kivy examples from a release, there is always this _python_bundle does not exist error on application run.
private.tar contains only p4a_env_vars.txt.
libpybundle.so has only 60 bytes and does not contain any bundle.
I have cleared the whole python venv and buildozer workdirs (appclean / distclean / home).
macOS: Kivy 2.1.0 Buildozer 1.5.0 Python 3.9 gives Compass and TakePicure (includes buildozer.spec) apk with no python bundle.
macOS: Kivy 2.1.0 Buildozer 1.5.0 Python 3.10 gives Compass and TakePicure (includes buildozer.spec) apk with no python bundle.
macOS: Kivy 2.1.0 Buildozer 1.5.1dev0 master Python 3.10 gives Compass and TakePicture apk with no python bundle.
Debian Linux: Kivy 2.1.0 Buildozer 1.5.0 Python 3.0 gives Compass and TakePicture apk with no python bundle.
LUbuntu Linux: Kivy 2.1.0 Buildozer 1.5.0 Python 3.10 gives Compass and TakePicture apk with no python bundle.
Attached below is the full kivy-2.1.0/examples/android/compass directory with build log, android logcat, and the produced apk. The same is for examples/android/takepicture that provides default buildozer.spec that should work out of the box right?
I am out of ideas help! :-(
Files
All source code, logs, and produced apk is included here.
Can you please check the content of /Users/cederom/cederom/work/CeDeROM/lab/mobile/python/kivy/kivy.git/examples/android/compass/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a_x86_x86_64/dists/myapp/_python_bundle__x86 ?
Ofter month of testing/updates/upgrades/downgrades I can now build my application again, arm64-v8a_armeabi-v7a_x86_x86_64-debug.apk is created, and I have the same problem with _python_bundle does not exist. Work in progress ;-)
@misl6, the content of the requested dir (for my app) is (also the same for other platforms). I will also try soon with the android examples from kivy and report back :-)
@misl6 I still have this problem with latest release of buildozer (1.5.0) and P4A (v2023.09.16). This is a critical blocker. Please help.
This may be related to logcat part mentioning ANDROID_ARGUMEN location?
10-03 05:27:33.876 10303 12998 I python : Initializing Python for Android
10-03 05:27:33.876 10303 12998 I python : Setting additional env vars from p4a_env_vars.txt
10-03 05:27:33.876 10303 12998 I python : Changing directory to the one provided by ANDROID_ARGUMENT
10-03 05:27:33.876 10303 12998 I python : /data/user/0/com.org.app/files/app
10-03 05:27:33.876 10303 12998 I python : Preparing to initialize python
10-03 05:27:33.876 10303 12998 I python : _python_bundle does not exist...this not looks good, all python recipes should have this folder, should we expect a crash soon?
I cannot access and/or browse that location /data/user/0/com.org.app/files/app (permission denied) either from adb shell or local tmux running on a test device or any other application.
How can I browse local application data? :-)
Update 1: Looking at the log the app data seems to be located in /data/app/com.org.app-XXX-YYY==/ where XXX and YYY seems to be a some sort of hash. There is a lib/arm64/libpython3.10.so in there that weights 3.1MB. So the P4A seems to be looking in a bad location that does not exist?
Finally all the stuff about libpython is a red herring.
It refers to the progress messages in a previous p4a version and ignores the last lines saying loading
04-01 01:02:50.302 3147 3147 V pythonutil: Library loading error: dlopen failed: library "libpython3.8.so" not found
04-01 01:02:50.302 3147 3147 V pythonutil: Loading library: python3.9
04-01 01:02:50.303 3147 3147 V pythonutil: Loading library: main
04-01 01:02:50.305 3147 3147 V pythonutil: Loaded everything!
Thanks @RobertFlatt ! I have bought new mac machine to have support for up to date AndroidStudio and XCode + emulators. Looking at the location I was not able to search on a physical device I found it there and some files.. but some files are missing. The loader screen is showing up, there is a problem with loading the target application, probably a build problem + buildozer defaults does not work with even a simple Hello World application.. will continue on buildozer issue until it turns out p4a issue:
Activity
misl6 commentedon Apr 14, 2023
Hi @cederom !
Can you please check the content of
/Users/cederom/cederom/work/CeDeROM/lab/mobile/python/kivy/kivy.git/examples/android/compass/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a_x86_x86_64/dists/myapp/_python_bundle__x86?cederom commentedon Apr 22, 2023
Ofter month of testing/updates/upgrades/downgrades I can now build my application again,
arm64-v8a_armeabi-v7a_x86_x86_64-debug.apkis created, and I have the same problem with_python_bundle does not exist. Work in progress ;-)@misl6, the content of the requested dir (for my app) is (also the same for other platforms). I will also try soon with the android examples from kivy and report back :-)
Now if you go to see the apk contents:
Any hints welcome :-)
cederom commentedon Apr 22, 2023
kivy.git/examples/android/takepictureas it has its own predefinedbuildozer.specand this file is unmodified code.x86build archs so I could chceck its operations on a local android emulator and report back in next message.cederom commentedon Apr 22, 2023
Good news, TakePicture starts on Android, then crashes instantly on load.. but at least there is no python bundle missing error ;-)
cederom commentedon Oct 3, 2023
@misl6 I still have this problem with latest release of buildozer (1.5.0) and P4A (v2023.09.16). This is a critical blocker. Please help.
ANDROID_ARGUMENlocation?/data/user/0/com.org.app/files/app(permission denied) either fromadb shellor localtmuxrunning on a test device or any other application./data/app/com.org.app-XXX-YYY==/where XXX and YYY seems to be a some sort of hash. There is alib/arm64/libpython3.10.soin there that weights 3.1MB. So the P4A seems to be looking in a bad location that does not exist?RobertFlatt commentedon Oct 15, 2023
I looked at this on GoogleGroups https://groups.google.com/g/kivy-users/c/r8s1VfKyK20/m/lbKi92_lAwAJ
The issue is that the example is a Kivy Android example that uses a deprecated Android API.
I filed an issue kivy/kivy#8407
In addition that Kivy example references code in p4a that uses deprecated apis
https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/bootstraps/common/build/src/main/java/org/renpy/android/Hardware.java I think this should be removed. (some of it has been deprecated since Android 15! see GG post for details)
Finally all the stuff about libpython is a red herring.
It refers to the progress messages in a previous p4a version and ignores the last lines saying loading
cederom commentedon Oct 16, 2023
Thanks @RobertFlatt ! I have bought new mac machine to have support for up to date AndroidStudio and XCode + emulators. Looking at the location I was not able to search on a physical device I found it there and some files.. but some files are missing. The loader screen is showing up, there is a problem with loading the target application, probably a build problem + buildozer defaults does not work with even a simple Hello World application.. will continue on buildozer issue until it turns out p4a issue:
kivy/buildozer#1585
Julian-O commentedon Nov 20, 2023
I interpret this as being a duplicate of kivy/kivy's 8407.
Closing as not planned.