Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_python_bundle does not exist...this not looks good, all python recipes should have this folder, should we expect a crash soon? #1585

Open
cederom opened this issue Apr 1, 2023 · 27 comments

Comments

@cederom
Copy link
Contributor

cederom commented Apr 1, 2023

Versions

  • Python: 3.9.16.
  • OS: macOS 12.6.4.
  • Buildozer: 1.5.0.
  • Kivy: 2.1.0.

Description

  • I am unable to run any application to run on Android, even the basic kivy examples, 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).
  • Attached is the full kivy-2.1.0/examples/android/compass directory with build log, android logcat, and the produced apk.
  • I am out of ideas help! :-(

compass.tar.gz

@RobertFlatt
Copy link
Contributor

On Ubuntu, using the "compass" directory provided, I tried:

>buildozer android debug
>unzip -l bin/* | grep pybundle
  8774602  1981-01-01 01:01   lib/arm64-v8a/libpybundle.so
  8593957  1981-01-01 01:01   lib/armeabi-v7a/libpybundle.so
  8891747  1981-01-01 01:01   lib/x86/libpybundle.so
  9065868  1981-01-01 01:01   lib/x86_64/libpybundle.so
>unzip -l bin/* | grep private
    36714  1981-01-01 01:01   assets/private.tar

Which does not match the reported symptoms.

Please post the result of doing exactly the same on MacOS.

The differences are:

  • Ubuntu/MacOS
  • user specified environments.

I can't see anything odd in the provided log (which does not mean that there is nothing odd there)

I can't replicate the issue, and I know nothing about Buildozer on MacOS so I suggest asking here https://discord.gg/8MwBmCDg

In your post include the above results, and your equivalent results.

@cederom
Copy link
Contributor Author

cederom commented Apr 2, 2023

  • 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.

Thanks @RobertFlatt what JDK and CC/LLVM do you use? Can you please provide full build log for comparison?

What is wrong here???

I am running buildozer android debug.

@RobertFlatt
Copy link
Contributor

RobertFlatt commented Apr 6, 2023

I went back to your build and checked the file sizes in the same was as I did for my build (above)

>~/ex/yyy/compass>unzip -l bin/* | grep private
      195  1981-01-01 01:01   assets/private.tar
>~/ex/yyy/compass>unzip -l bin/* | grep pybundle
       60  1981-01-01 01:01   lib/arm64-v8a/libpybundle.so
       60  1981-01-01 01:01   lib/armeabi-v7a/libpybundle.so
       60  1981-01-01 01:01   lib/x86/libpybundle.so
       60  1981-01-01 01:01   lib/x86_64/libpybundle.so

Which confirms your diagnosis of the symptoms. But a cause eludes me.

Here I use:

  • JDK version is as specified in Buildozer install instructions (17).
  • Clang/LLVM version is that provided by NDK, by default the NDK version is specified by p4a, and p4a version by buildozer.spec

What is wrong here???

Since you are the only person to report this, it looks like it must be something site specific, but on 3 OS!!!

Do all the machines have the same .bashrc ?
Edit: can you share the result of a bash env ?

Attached is the build log from my Ubuntu build.
log.txt

@cederom
Copy link
Contributor Author

cederom commented Oct 15, 2023

  • Thanks @RobertFlatt :-)
  • Okay, our project MUST to be released this year, so I have bought brand new MacStudio 2023 where all AndroidStudio and XCode is up to date, emulators available and working in native speed, first build time is ~15 minutes.
  • I also have older setup for Android with Debian11 VM on FreeBSD (first build time ~30 minutes) with physical device connected over USB but the problem is the same.
  • In order to eliminate possible problems with our project I have decided to build kivy/examples/3Drendering example. The problem is also here.
  • I am convinced the problem is related to ANDROID_ARGUMENT does not match current Android data model?
  • Should this really be/data/user/0/org.kivy.kivy3drender/files/app?
  • Maybe android.private_storage = True part needs verification?
  • I will build now an application that does not use any external files and see what happens (https://github.com/Android-for-Python/Android-for-Python-Users#try-hello-world).
  • I am sure we will pinpoint the problem and create a fix there is no other option now :-)
10-15 17:39:44.552  5330  5359 V SDL     : Running main function SDL_main from library /data/app/~~ED3VLdpwpMJs6ZS4SpZGEg==/org.kivy.kivy3drender-B5ocqz3TBrVf94EYlZShiw==/lib/arm64/libmain.so
10-15 17:39:44.559  5330  5359 V PythonActivity: appConfirmedActive() -> preparing loading screen removal
10-15 17:39:44.560  5330  5359 V SDL     : nativeRunMain()
10-15 17:39:44.562  5330  5359 I python  : Initializing Python for Android
10-15 17:39:44.562  5330  5359 I python  : Setting additional env vars from p4a_env_vars.txt
10-15 17:39:44.563  5330  5359 I python  : Changing directory to the one provided by ANDROID_ARGUMENT
10-15 17:39:44.563  5330  5359 I python  : /data/user/0/org.kivy.kivy3drender/files/app
10-15 17:39:44.563  5330  5359 I python  : Preparing to initialize python
10-15 17:39:44.563  5330  5359 I python  : _python_bundle does not exist...this not looks good, all python recipes should have this folder, should we expect a crash soon?
10-15 17:39:44.582   391   406 I adbd    : jdwp connection from 5330
10-15 17:39:44.626   518  1487 I ImeTracker: org.kivy.kivy3drender:432a47ed: onRequestHide at ORIGIN_SERVER_HIDE_INPUT reason HIDE_REMOVE_CLIENT
10-15 17:39:44.626   518  1487 I ImeTracker: org.kivy.kivy3drender:432a47ed: onCancelled at PHASE_SERVER_SHOULD_HIDE
10-15 17:39:44.626   518  1487 I WindowManager: WIN DEATH: Window{61a3bee u0 org.kivy.kivy3drender/org.kivy.android.PythonActivity}
10-15 17:39:44.627   518  1487 W InputManager-JNI: Input channel object '61a3bee org.kivy.kivy3drender/org.kivy.android.PythonActivity (client)' was disposed without first being removed with the input manager!
10-15 17:39:44.627   518  1998 I ActivityManager: Process org.kivy.kivy3drender (pid 5330) has died: fg  TOP
10-15 17:39:44.630   518  1998 W ActivityTaskManager: Force removing ActivityRecord{a4187b7 u0 org.kivy.kivy3drender/org.kivy.android.PythonActivity t26}: app died, no saved state
10-15 17:39:44.631   518   538 D DisplayManagerService: Drop pending events for gone uid 10195
10-15 17:39:44.632   723   791 V WindowManagerShell: Transition requested: android.os.BinderProxy@d4df006 TransitionRequestInfo { type = CLOSE, triggerTask = TaskInfo{userId=0 taskId=26 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.kivy.kivy3drender/org.kivy.android.PythonActivity } baseActivity=ComponentInfo{org.kivy.kivy3drender/org.kivy.android.PythonActivity} topActivity=ComponentInfo{org.kivy.kivy3drender/org.kivy.android.PythonActivity} origActivity=null realActivity=ComponentInfo{org.kivy.kivy3drender/org.kivy.android.PythonActivity} numActivities=1 lastActiveTime=9812588 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@3f536c7} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=null topActivityInfo=ActivityInfo{b0324f4 org.kivy.android.PythonActivity} launchCookies=[android.os.BinderProxy@97a5ddf] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isVisibleRequested=true isSleeping=false topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false topActivityLetterboxed= false isFromDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 locusId=null displayAreaFeatureId=1 cameraCompatControlState=hidden}, remoteTransition = null, displayChange = null }
10-15 17:39:44.635   318   318 I Zygote  : Process 5330 exited cleanly (1)
10-15 17:39:44.648   518   549 I libprocessgroup: Successfully killed process cgroup uid 10195 pid 5330 in 20ms
10-15 17:39:44.653   370   370 E BpTransactionCompletedListener: Failed to transact (-32)

@cederom
Copy link
Contributor Author

cederom commented Oct 15, 2023

I know those documents and the others. I have tried various combinations starting from the default one.

I have tried now kivy/examples/guide/quickstart:

import kivy
kivy.require('1.0.6')  # replace with your current kivy version !

from kivy.app import App
from kivy.uix.button import Button


class MyApp(App):

    def build(self):
        return Button(text='Hello World')


if __name__ == '__main__':
    MyApp().run()

Still the same issue :-(

10-15 22:33:56.175  4344  4365 V pythonutil: Unpacking /data/app/~~bI3ztLgs8F1x9-28Zioerg==/org.kivy.helloworld-ZGZyI9L-2FHRJR2OEbkuyw==/lib/arm64/libpybundle app
10-15 22:33:56.175  4344  4365 V pythonutil: Data version is 5ceeb3a9397d32a08031eb4c8c75c64a9ab460ab
10-15 22:33:56.176  4344  4344 V pythonutil: Checking pattern libsqlite3\.so against libSDL2.so
10-15 22:33:56.177  4344  4344 V pythonutil: Checking pattern libsqlite3\.so against libSDL2_ttf.so
10-15 22:33:56.177  4344  4344 V pythonutil: Checking pattern libsqlite3\.so against libSDL2_mixer.so
10-15 22:33:56.187  4344  4344 V pythonutil: Checking pattern libsqlite3\.so against libssl1.1.so
10-15 22:33:56.187  4344  4344 V pythonutil: Checking pattern libsqlite3\.so against libpybundle.so
10-15 22:33:56.187  4344  4344 V pythonutil: Checking pattern libsqlite3\.so against libpython3.10.so
10-15 22:33:56.188  4344  4344 V pythonutil: Checking pattern libsqlite3\.so against libmain.so
10-15 22:33:56.188  4344  4344 V pythonutil: Checking pattern libsqlite3\.so against libcrypto1.1.so
10-15 22:33:56.188  4344  4344 V pythonutil: Checking pattern libsqlite3\.so against libffi.so
10-15 22:33:56.188  4344  4344 V pythonutil: Checking pattern libsqlite3\.so against libsqlite3.so
10-15 22:33:56.188  4344  4344 V pythonutil: Pattern libsqlite3\.so matched file libsqlite3.so
10-15 22:33:56.188  4344  4344 V pythonutil: Checking pattern libsqlite3\.so against libSDL2_image.so
10-15 22:33:56.188  4344  4344 V pythonutil: Checking pattern libffi\.so against libSDL2.so
10-15 22:33:56.189  4344  4344 V pythonutil: Checking pattern libffi\.so against libSDL2_ttf.so
10-15 22:33:56.189  4344  4344 V pythonutil: Checking pattern libffi\.so against libSDL2_mixer.so
10-15 22:33:56.189  4344  4344 V pythonutil: Checking pattern libffi\.so against libssl1.1.so
10-15 22:33:56.190  4344  4344 V pythonutil: Checking pattern libffi\.so against libpybundle.so
10-15 22:33:56.191  4344  4344 V pythonutil: Checking pattern libffi\.so against libpython3.10.so
10-15 22:33:56.191  4344  4344 V pythonutil: Checking pattern libffi\.so against libmain.so
10-15 22:33:56.191  4344  4344 V pythonutil: Checking pattern libffi\.so against libcrypto1.1.so
10-15 22:33:56.191  4344  4344 V pythonutil: Checking pattern libffi\.so against libffi.so
10-15 22:33:56.191  4344  4344 V pythonutil: Pattern libffi\.so matched file libffi.so
10-15 22:33:56.192  4344  4344 V pythonutil: Checking pattern libffi\.so against libsqlite3.so
10-15 22:33:56.192  4344  4344 V pythonutil: Checking pattern libffi\.so against libSDL2_image.so
10-15 22:33:56.192  4344  4344 V pythonutil: Checking pattern libpng16\.so against libSDL2.so
10-15 22:33:56.193  4344  4344 V pythonutil: Checking pattern libpng16\.so against libSDL2_ttf.so
10-15 22:33:56.193  4344  4344 V pythonutil: Checking pattern libpng16\.so against libSDL2_mixer.so
10-15 22:33:56.193  4344  4344 V pythonutil: Checking pattern libpng16\.so against libssl1.1.so
10-15 22:33:56.193  4344  4344 V pythonutil: Checking pattern libpng16\.so against libpybundle.so
10-15 22:33:56.193  4344  4344 V pythonutil: Checking pattern libpng16\.so against libpython3.10.so
10-15 22:33:56.193  4344  4344 V pythonutil: Checking pattern libpng16\.so against libmain.so
10-15 22:33:56.194  4344  4344 V pythonutil: Checking pattern libpng16\.so against libcrypto1.1.so
10-15 22:33:56.202  4344  4344 V pythonutil: Checking pattern libpng16\.so against libffi.so
10-15 22:33:56.203  4344  4344 V pythonutil: Checking pattern libpng16\.so against libsqlite3.so
10-15 22:33:56.203  4344  4344 V pythonutil: Checking pattern libpng16\.so against libSDL2_image.so
10-15 22:33:56.203  4344  4344 V pythonutil: Checking pattern libssl.*\.so against libSDL2.so
10-15 22:33:56.204  4344  4344 V pythonutil: Checking pattern libssl.*\.so against libSDL2_ttf.so
10-15 22:33:56.204  4344  4344 V pythonutil: Checking pattern libssl.*\.so against libSDL2_mixer.so
10-15 22:33:56.205  4344  4344 V pythonutil: Checking pattern libssl.*\.so against libssl1.1.so
10-15 22:33:56.205  4344  4344 V pythonutil: Pattern libssl.*\.so matched file libssl1.1.so
10-15 22:33:56.205  4344  4344 V pythonutil: Checking pattern libssl.*\.so against libpybundle.so
10-15 22:33:56.205  4344  4344 V pythonutil: Checking pattern libssl.*\.so against libpython3.10.so
10-15 22:33:56.205  4344  4344 V pythonutil: Checking pattern libssl.*\.so against libmain.so
10-15 22:33:56.205  4344  4344 V pythonutil: Checking pattern libssl.*\.so against libcrypto1.1.so
10-15 22:33:56.206  4344  4344 V pythonutil: Checking pattern libssl.*\.so against libffi.so
10-15 22:33:56.206  4344  4344 V pythonutil: Checking pattern libssl.*\.so against libsqlite3.so
10-15 22:33:56.206  4344  4344 V pythonutil: Checking pattern libssl.*\.so against libSDL2_image.so
10-15 22:33:56.207  4344  4344 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2.so
10-15 22:33:56.207  4344  4344 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2_ttf.so
10-15 22:33:56.207  4344  4344 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2_mixer.so
10-15 22:33:56.207  4344  4344 V pythonutil: Checking pattern libcrypto.*\.so against libssl1.1.so
10-15 22:33:56.208  4344  4344 V pythonutil: Checking pattern libcrypto.*\.so against libpybundle.so
10-15 22:33:56.208  4344  4344 V pythonutil: Checking pattern libcrypto.*\.so against libpython3.10.so
10-15 22:33:56.208  4344  4344 V pythonutil: Checking pattern libcrypto.*\.so against libmain.so
10-15 22:33:56.208  4344  4344 V pythonutil: Checking pattern libcrypto.*\.so against libcrypto1.1.so
10-15 22:33:56.208  4344  4344 V pythonutil: Pattern libcrypto.*\.so matched file libcrypto1.1.so
10-15 22:33:56.209  4344  4344 V pythonutil: Checking pattern libcrypto.*\.so against libffi.so
10-15 22:33:56.209  4344  4344 V pythonutil: Checking pattern libcrypto.*\.so against libsqlite3.so
10-15 22:33:56.209  4344  4344 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2_image.so
10-15 22:33:56.209  4344  4344 V pythonutil: Checking pattern libSDL2\.so against libSDL2.so
10-15 22:33:56.209  4344  4344 V pythonutil: Pattern libSDL2\.so matched file libSDL2.so
10-15 22:33:56.210  4344  4344 V pythonutil: Checking pattern libSDL2\.so against libSDL2_ttf.so
10-15 22:33:56.210  4344  4344 V pythonutil: Checking pattern libSDL2\.so against libSDL2_mixer.so
10-15 22:33:56.210  4344  4344 V pythonutil: Checking pattern libSDL2\.so against libssl1.1.so
10-15 22:33:56.210  4344  4344 V pythonutil: Checking pattern libSDL2\.so against libpybundle.so
10-15 22:33:56.211  4344  4344 V pythonutil: Checking pattern libSDL2\.so against libpython3.10.so
10-15 22:33:56.216   722   793 V WindowManagerShell: Transition animation finished (aborted=false), notifying core (#10)android.os.BinderProxy@773ba90@0
10-15 22:33:56.216   518   535 V WindowManager: Finish Transition #10: created at 10-15 22:33:55.265 collect-started=0.749ms request-sent=22.572ms started=289.859ms ready=419.588ms sent=420.764ms finished=951.672ms
10-15 22:33:56.217   722   793 V WindowManagerShell: Track 0 became idle
10-15 22:33:56.217   722   793 V WindowManagerShell: All active transition animations finished
10-15 22:33:56.224  4344  4344 V pythonutil: Checking pattern libSDL2\.so against libmain.so
10-15 22:33:56.225  4344  4344 V pythonutil: Checking pattern libSDL2\.so against libcrypto1.1.so
10-15 22:33:56.226   821  1066 D BtGatt.ScanManager: uid 10124 isForeground true scanMode 1
10-15 22:33:56.226  4344  4344 V pythonutil: Checking pattern libSDL2\.so against libffi.so
10-15 22:33:56.226  4344  4344 V pythonutil: Checking pattern libSDL2\.so against libsqlite3.so
10-15 22:33:56.227   821  1066 D BtGatt.ScanManager: uid 10124 isForeground true scanMode -1
10-15 22:33:56.229   821  1066 D BtGatt.ScanManager: uid 10124 isForeground true scanMode -1
10-15 22:33:56.239  4344  4344 V pythonutil: Checking pattern libSDL2\.so against libSDL2_image.so
10-15 22:33:56.239  4344  4344 V pythonutil: Checking pattern libSDL2_image\.so against libSDL2.so
10-15 22:33:56.239  4344  4344 V pythonutil: Checking pattern libSDL2_image\.so against libSDL2_ttf.so
10-15 22:33:56.240  4344  4344 V pythonutil: Checking pattern libSDL2_image\.so against libSDL2_mixer.so
10-15 22:33:56.240  4344  4344 V pythonutil: Checking pattern libSDL2_image\.so against libssl1.1.so
10-15 22:33:56.240  4344  4344 V pythonutil: Checking pattern libSDL2_image\.so against libpybundle.so
10-15 22:33:56.241  4344  4344 V pythonutil: Checking pattern libSDL2_image\.so against libpython3.10.so
10-15 22:33:56.241  4344  4344 V pythonutil: Checking pattern libSDL2_image\.so against libmain.so
10-15 22:33:56.241  4344  4344 V pythonutil: Checking pattern libSDL2_image\.so against libcrypto1.1.so
10-15 22:33:56.241  4344  4344 V pythonutil: Checking pattern libSDL2_image\.so against libffi.so
10-15 22:33:56.241  4344  4344 V pythonutil: Checking pattern libSDL2_image\.so against libsqlite3.so
10-15 22:33:56.241  4344  4344 V pythonutil: Checking pattern libSDL2_image\.so against libSDL2_image.so
10-15 22:33:56.243  4344  4344 V pythonutil: Pattern libSDL2_image\.so matched file libSDL2_image.so
10-15 22:33:56.244  4344  4344 V pythonutil: Checking pattern libSDL2_mixer\.so against libSDL2.so
10-15 22:33:56.248  4344  4344 V pythonutil: Checking pattern libSDL2_mixer\.so against libSDL2_ttf.so
10-15 22:33:56.248  4344  4344 V pythonutil: Checking pattern libSDL2_mixer\.so against libSDL2_mixer.so
10-15 22:33:56.248  4344  4344 V pythonutil: Pattern libSDL2_mixer\.so matched file libSDL2_mixer.so
10-15 22:33:56.248  4344  4344 V pythonutil: Checking pattern libSDL2_mixer\.so against libssl1.1.so
10-15 22:33:56.248  4344  4344 V pythonutil: Checking pattern libSDL2_mixer\.so against libpybundle.so
10-15 22:33:56.248  4344  4344 V pythonutil: Checking pattern libSDL2_mixer\.so against libpython3.10.so
10-15 22:33:56.249  4344  4344 V pythonutil: Checking pattern libSDL2_mixer\.so against libmain.so
10-15 22:33:56.249  4344  4344 V pythonutil: Checking pattern libSDL2_mixer\.so against libcrypto1.1.so
10-15 22:33:56.249  4344  4344 V pythonutil: Checking pattern libSDL2_mixer\.so against libffi.so
10-15 22:33:56.249  4344  4344 V pythonutil: Checking pattern libSDL2_mixer\.so against libsqlite3.so
10-15 22:33:56.249  4344  4344 V pythonutil: Checking pattern libSDL2_mixer\.so against libSDL2_image.so
10-15 22:33:56.250  4344  4344 V pythonutil: Checking pattern libSDL2_ttf\.so against libSDL2.so
10-15 22:33:56.253  4344  4344 V pythonutil: Checking pattern libSDL2_ttf\.so against libSDL2_ttf.so
10-15 22:33:56.253  4344  4344 V pythonutil: Pattern libSDL2_ttf\.so matched file libSDL2_ttf.so
10-15 22:33:56.254  4344  4344 V pythonutil: Checking pattern libSDL2_ttf\.so against libSDL2_mixer.so
10-15 22:33:56.254  4344  4344 V pythonutil: Checking pattern libSDL2_ttf\.so against libssl1.1.so
10-15 22:33:56.254  4344  4344 V pythonutil: Checking pattern libSDL2_ttf\.so against libpybundle.so
10-15 22:33:56.255  4344  4344 V pythonutil: Checking pattern libSDL2_ttf\.so against libpython3.10.so
10-15 22:33:56.255  4344  4344 V pythonutil: Checking pattern libSDL2_ttf\.so against libmain.so
10-15 22:33:56.255  4344  4344 V pythonutil: Checking pattern libSDL2_ttf\.so against libcrypto1.1.so
10-15 22:33:56.255  4344  4344 V pythonutil: Checking pattern libSDL2_ttf\.so against libffi.so
10-15 22:33:56.255  4344  4344 V pythonutil: Checking pattern libSDL2_ttf\.so against libsqlite3.so
10-15 22:33:56.255  4344  4344 V pythonutil: Checking pattern libSDL2_ttf\.so against libSDL2_image.so
10-15 22:33:56.255  4344  4344 V pythonutil: Loading library: sqlite3
10-15 22:33:56.263  4344  4344 V pythonutil: Loading library: ffi
10-15 22:33:56.265  1001  1581 D OneSearchSuggestProvider: Shut down the binder channel
10-15 22:33:56.266  1001  4160 I IPCThreadState: oneway function results for code 2 on binder at 0xb400007946f21da0 will be dropped but finished with status UNKNOWN_TRANSACTION
10-15 22:33:56.266  1001  1069 I ImeTracker: com.google.android.apps.nexuslauncher:935064ba: onRequestHide at ORIGIN_CLIENT_HIDE_SOFT_INPUT reason HIDE_SOFT_INPUT
10-15 22:33:56.266  1001  1069 I ImeTracker: com.google.android.apps.nexuslauncher:935064ba: onFailed at PHASE_CLIENT_VIEW_SERVED
10-15 22:33:56.268  4344  4344 V pythonutil: Loading library: ssl1.1
10-15 22:33:56.270  1001  1001 D AutofillManager: view is not autofillable - activity denied for autofill
10-15 22:33:56.273  1001  1001 D AutofillManager: view is not autofillable - activity denied for autofill
10-15 22:33:56.280  4344  4344 V pythonutil: Loading library: crypto1.1
10-15 22:33:56.281  4344  4344 V pythonutil: Loading library: SDL2
10-15 22:33:56.283  4344  4344 V pythonutil: Loading library: SDL2_image
10-15 22:33:56.286  4344  4344 V pythonutil: Loading library: SDL2_mixer
10-15 22:33:56.288  4344  4344 V pythonutil: Loading library: SDL2_ttf
10-15 22:33:56.292  4344  4344 V pythonutil: Loading library: python3.5m
10-15 22:33:56.302  4344  4344 V pythonutil: Library loading error: dlopen failed: library "libpython3.5m.so" not found
10-15 22:33:56.302  4344  4344 V pythonutil: Loading library: python3.6m
10-15 22:33:56.303  4344  4344 V pythonutil: Library loading error: dlopen failed: library "libpython3.6m.so" not found
10-15 22:33:56.303  4344  4344 V pythonutil: Loading library: python3.7m
10-15 22:33:56.304  4344  4344 V pythonutil: Library loading error: dlopen failed: library "libpython3.7m.so" not found
10-15 22:33:56.305  4344  4344 V pythonutil: Loading library: python3.8
10-15 22:33:56.305  4344  4344 V pythonutil: Library loading error: dlopen failed: library "libpython3.8.so" not found
10-15 22:33:56.306  4344  4344 V pythonutil: Loading library: python3.9
10-15 22:33:56.307  4344  4344 V pythonutil: Library loading error: dlopen failed: library "libpython3.9.so" not found
10-15 22:33:56.308  4344  4344 V pythonutil: Loading library: python3.10
10-15 22:33:56.319  4344  4344 V pythonutil: Loading library: main
10-15 22:33:56.320  4344  4344 V pythonutil: Loaded everything!
10-15 22:33:56.320  4344  4344 V SDL     : nativeSetupJNI()
10-15 22:33:56.322  4344  4344 V SDL     : AUDIO nativeSetupJNI()
10-15 22:33:56.322  4344  4344 V SDL     : CONTROLLER nativeSetupJNI()
10-15 22:33:56.328  4344  4344 V PythonActivity: Setting env vars for start.c and Python to use
10-15 22:33:56.328  4344  4344 V PythonActivity: Access to our meta-data...
10-15 22:33:56.329  4344  4344 I PythonActivity: Surface will NOT be transparent
10-15 22:33:56.350  4344  4344 V SDL     : surfaceCreated()
10-15 22:33:56.351  4344  4344 V SDL     : surfaceChanged()
10-15 22:33:56.352  4344  4344 V SDL     : Window size: 1080x2088
10-15 22:33:56.353  4344  4344 V SDL     : Device size: 1080x2220
10-15 22:33:56.360  1329  1329 I GoogleInputMethodService: GoogleInputMethodService.onFinishInput():3227
10-15 22:33:56.361  1329  1329 I GoogleInputMethodService: GoogleInputMethodService.updateDeviceLockedStatus():2087 repeatCheckTimes = 0, unlocked = true
10-15 22:33:56.361  1329  1329 I GoogleInputMethodService: GoogleInputMethodService.onStartInput():1877 onStartInput(EditorInfo{inputType=0x0(NULL) imeOptions=0x0 privateImeOptions=null actionName=UNSPECIFIED actionLabel=null actionId=0 initialSelStart=-1 initialSelEnd=-1 initialCapsMode=0x0 hintText=null label=null packageName=org.kivy.helloworld fieldId=0 fieldName=null extras=null}, false)
10-15 22:33:56.362  1329  1329 I GoogleInputMethodService: GoogleInputMethodService.shouldHideHeaderOnInitialState():4008 ShouldHideHeaderOnInitialState = false
10-15 22:33:56.362  1329  1329 I GoogleInputMethodService: GoogleInputMethodService.updateDeviceLockedStatus():2087 repeatCheckTimes = 2, unlocked = true
10-15 22:33:56.366  4344  4373 V SDL     : Running main function SDL_main from library /data/app/~~bI3ztLgs8F1x9-28Zioerg==/org.kivy.helloworld-ZGZyI9L-2FHRJR2OEbkuyw==/lib/arm64/libmain.so
10-15 22:33:56.366  4344  4373 V PythonActivity: appConfirmedActive() -> preparing loading screen removal
10-15 22:33:56.367  4344  4373 V SDL     : nativeRunMain()
10-15 22:33:56.367  4344  4373 I python  : Initializing Python for Android
10-15 22:33:56.368  4344  4373 I python  : Setting additional env vars from p4a_env_vars.txt
10-15 22:33:56.368  4344  4373 I python  : Changing directory to the one provided by ANDROID_ARGUMENT
10-15 22:33:56.368  4344  4373 I python  : /data/user/0/org.kivy.helloworld/files/app
10-15 22:33:56.370  4344  4373 I python  : Preparing to initialize python
10-15 22:33:56.370  4344  4373 I python  : _python_bundle does not exist...this not looks good, all python recipes should have this folder, should we expect a crash soon?
10-15 22:33:56.402   391   411 I adbd    : jdwp connection from 4344
10-15 22:33:56.458   518   532 I WindowManager: WIN DEATH: Window{4ba10f0 u0 org.kivy.helloworld/org.kivy.android.PythonActivity}
10-15 22:33:56.458   518   532 W InputManager-JNI: Input channel object '4ba10f0 org.kivy.helloworld/org.kivy.android.PythonActivity (client)' was disposed without first being removed with the input manager!
10-15 22:33:56.459   518   531 I ActivityManager: Process org.kivy.helloworld (pid 4344) has died: fg  TOP
10-15 22:33:56.460   518   547 I libprocessgroup: Successfully killed process cgroup uid 10196 pid 4344 in 0ms
10-15 22:33:56.464   518  1051 I ImeTracker: org.kivy.helloworld:bfaf2ffa: onRequestHide at ORIGIN_SERVER_HIDE_INPUT reason HIDE_REMOVE_CLIENT
10-15 22:33:56.465   518  1051 I ImeTracker: org.kivy.helloworld:bfaf2ffa: onCancelled at PHASE_SERVER_SHOULD_HIDE
10-15 22:33:56.468   518   531 W ActivityTaskManager: Force removing ActivityRecord{e772478 u0 org.kivy.helloworld/org.kivy.android.PythonActivity t33}: app died, no saved state
10-15 22:33:56.468   518   536 D DisplayManagerService: Drop pending events for gone uid 10196
10-15 22:33:56.473   722   793 V WindowManagerShell: Transition requested: android.os.BinderProxy@d5f2084 TransitionRequestInfo { type = CLOSE, triggerTask = TaskInfo{userId=0 taskId=33 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.kivy.helloworld/org.kivy.android.PythonActivity } baseActivity=ComponentInfo{org.kivy.helloworld/org.kivy.android.PythonActivity} topActivity=ComponentInfo{org.kivy.helloworld/org.kivy.android.PythonActivity} origActivity=null realActivity=ComponentInfo{org.kivy.helloworld/org.kivy.android.PythonActivity} numActivities=1 lastActiveTime=147490 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@781406d} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=null topActivityInfo=ActivityInfo{4f7d4a2 org.kivy.android.PythonActivity} launchCookies=[android.os.BinderProxy@128cfaf] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isVisibleRequested=true isSleeping=false topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false topActivityLetterboxed= false isFromDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 locusId=null displayAreaFeatureId=1 cameraCompatControlState=hidden}, remoteTransition = null, displayChange = null }
10-15 22:33:56.474   318   318 I Zygote  : Process 4344 exited cleanly (1)

Note that I did not change 1.0.6 as this is the kivy git master. This works on my desktop with Kivy 2.2.1. Will try now with 2.2.1 and report in a moment.

@cederom
Copy link
Contributor Author

cederom commented Oct 15, 2023

With

import kivy
kivy.require('2.2.1')  # replace with your current kivy version !

from kivy.app import App
from kivy.uix.button import Button


class MyApp(App):

    def build(self):
        return Button(text='Hello World')


if __name__ == '__main__':
    MyApp().run()

the same problem:

10-15 22:58:17.337  4281  4310 V SDL     : Running main function SDL_main from library /data/app/~~4C9Z-kdXQF3Qp5uG9eqCGw==/org.kivy.helloworld-0C8MKNtUSt0yRZLU7HOwmA==/lib/arm64/libmain.so
10-15 22:58:17.337  4281  4310 V PythonActivity: appConfirmedActive() -> preparing loading screen removal
10-15 22:58:17.338  4281  4310 V SDL     : nativeRunMain()
10-15 22:58:17.338  4281  4310 I python  : Initializing Python for Android
10-15 22:58:17.338  4281  4310 I python  : Setting additional env vars from p4a_env_vars.txt
10-15 22:58:17.339  4281  4310 I python  : Changing directory to the one provided by ANDROID_ARGUMENT
10-15 22:58:17.339  4281  4310 I python  : /data/user/0/org.kivy.helloworld/files/app
10-15 22:58:17.339  4281  4310 I python  : Preparing to initialize python
10-15 22:58:17.339  4281  4310 I python  : _python_bundle does not exist...this not looks good, all python recipes should have this folder, should we expect a crash soon?
10-15 22:58:17.371   389   404 I adbd    : jdwp connection from 4281
10-15 22:58:17.438  4281  4289 E kivy.helloworld: address format is <fd_num> not -1
10-15 22:58:17.455   517   944 I WindowManager: WIN DEATH: Window{ef3e241 u0 org.kivy.helloworld/org.kivy.android.PythonActivity}
10-15 22:58:17.455   517   944 W InputManager-JNI: Input channel object 'ef3e241 org.kivy.helloworld/org.kivy.android.PythonActivity (client)' was disposed without first being removed with the input manager!
10-15 22:58:17.455   517  2055 I ImeTracker: org.kivy.helloworld:ac7272d9: onRequestHide at ORIGIN_SERVER_HIDE_INPUT reason HIDE_REMOVE_CLIENT
10-15 22:58:17.455   517  2055 I ImeTracker: org.kivy.helloworld:ac7272d9: onCancelled at PHASE_SERVER_SHOULD_HIDE
10-15 22:58:17.455   517  2055 I ActivityManager: Process org.kivy.helloworld (pid 4281) has died: fg  TOP
10-15 22:58:17.456   517   546 I libprocessgroup: Successfully killed process cgroup uid 10184 pid 4281 in 0ms
10-15 22:58:17.459   517  2055 W ActivityTaskManager: Force removing ActivityRecord{7c9054f u0 org.kivy.helloworld/org.kivy.android.PythonActivity t16}: app died, no saved state
10-15 22:58:17.460   517   535 D DisplayManagerService: Drop pending events for gone uid 10184

@RobertFlatt
Copy link
Contributor

RobertFlatt commented Oct 15, 2023

I can't replicate this.
The only thing I changed was: (I'm assuming your case is the same)

# (int) Target Android API, should be as high as possible.
android.api = 33

I get:

10-15 12:19:43.894  5158  5191 I python  : Initializing Python for Android
10-15 12:19:43.894  5158  5191 I python  : Setting additional env vars from p4a_env_vars.txt
10-15 12:19:43.894  5158  5191 I python  : Changing directory to the one provided by ANDROID_ARGUMENT
10-15 12:19:43.894  5158  5191 I python  : /data/user/0/org.test.myapp/files/app
10-15 12:19:43.894  5158  5191 I python  : Preparing to initialize python
10-15 12:19:43.894  5158  5191 I python  : _python_bundle dir exists
10-15 12:19:43.894  5158  5191 I python  : calculated paths to be...
10-15 12:19:43.894  5158  5191 I python  : /data/user/0/org.test.myapp/files/app/_python_bundle/stdlib.zip:/data/user/0/org.test.myapp/files/app/_python_bundle/modules
10-15 12:19:43.894  5158  5191 I python  : set wchar paths...
10-15 12:19:43.918  5158  5191 I python  : Initialized python

Thinking of tests for you to try, I looked back and see we have already done what I would suggest.
#1585 (comment)
We found libpybundle.so is in the apk and the right size.

But these were the ones that I built from your project files, Looking at yours I see:

compass/bin>unzip -l * | grep pybundle
       60  1981-01-01 01:01   lib/arm64-v8a/libpybundle.so
       60  1981-01-01 01:01   lib/armeabi-v7a/libpybundle.so
       60  1981-01-01 01:01   lib/x86/libpybundle.so
       60  1981-01-01 01:01   lib/x86_64/libpybundle.so

Compare with #1585 (comment):
The ones you built are empty, mine with the same project file are OK.

We have a build symptom, but not one I can replicate.

Since I don't know of any other cases (and this is app install so everybody uses it) I can only conclude it is something about the build environment used. I'm not assigning blame, I'm looking a hint of a cause.

  1. Sanity check: the ONLY thing changed in a new buildozer.spec for HelloWorld was android.api ? And I really mean ONLY, please don't make any assumptions about what is important.

  2. You tried several machines, but they were all configured by your sys admin in some similar way (we all try to do this). Do you know of anything unusual?

  3. Please share a full HelloWorld (appclean first) build log as a .txt file.

@cederom
Copy link
Contributor Author

cederom commented Oct 16, 2023

We have a build symptom, but not one I can replicate.
Since I don't know of any other cases (and this is app install so everybody uses it) I can only conclude it is something about the build environment used. I'm not assigning blame, I'm looking a hint of a cause.

1. Sanity check: the ONLY thing changed in a new buildozer.spec for HelloWorld was `android.api` ? And I really mean ONLY, please don't make any assumptions about what is important.

I start with the default unmodified buildozer.spec at first, just the application name and bundle change. I know P4A has its own recommendations that will follow when no version request is provided. Changing the android.api does not really change anything.

2. You tried several machines, but they were all configured by your sys admin in some similar way (we all try to do this). Do you know of anything unusual?

I am configuring them myself. Everything else works fine (even RTOS builds kind of tasks). Nothing unusual. I played with Debian11 VM in order to have clean playground. Now I also have new mac to get XCode and faster builds. No change.

3. Please share a full HelloWorld (appclean first) build log as a .txt file.

I always do buildozer appclean on buildozer.spec change. Sometimes even buildozer distclean when going to another test application. No change.

I will try to generate full build logs tomorrow.. and read them line by line ;-)

One thing I can confirm is that /data/user/0/org.kivy.helloworld/ location exists. I could not access it on a physical phone but on emulator I can.

image

p4a_env_vars.txt is:

P4A_IS_WINDOWED=True
KIVY_ORIENTATION=Portrait
P4A_NUMERIC_VERSION=None
P4A_MINSDK=21

So it seems like a build / bundle stage problem. Something is missing. Or error occurs and it is not handled thus skipped step is omitted.

Anyways thanks for confirming that things works for you in a default configuration.

What GCC / LLVM compiler version do you use exactly?

@RobertFlatt
Copy link
Contributor

RobertFlatt commented Oct 16, 2023

So it seems like a build / bundle stage problem.

Yes, libpybundle.so is 60 bytes when built on your computers (not as far as I know otherwise). As shown by unzipping the apk. No need to install to see the issue, just cd bin; unzip -l * | grep pybundle

Please confirm this with Hello World, my data is from the broken compass example.

In the project directory what does this return? (myapp will be ok if you are really using defaults, else change)

ls -l .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle

Also private.tar is missing most of its contents too (everything except p4a_env_vars.txt) [Again from the broken compass example]

But all the real lib*.so are there and apparently the right size.

What GCC / LLVM compiler version do you use exactly?

The LLVM tools in the default NDK (25b)
The default buildozer.spec gives us this.
gcc is 11.4.0

For this process default everything is really important

@cederom
Copy link
Contributor Author

cederom commented Oct 16, 2023

Here goes the zip with buildozer.spec, main.py, and buildozer android debug deploy run logcat all defaults no modifications @RobertFlatt :-)

buildozer-kivy-examples-guide-quickstart.zip

The unzipped APK content:

total 21392
drwxr-xr-x@ 14 cederom  staff       448 Oct 16 22:05 .
drwxr-xr-x  13 cederom  staff       416 Oct 16 22:03 ..
-rw-r--r--@  1 cederom  staff      3092 Jan  1  1981 AndroidManifest.xml
drwxr-xr-x@  6 cederom  staff       192 Oct 16 22:05 META-INF
drwxr-xr-x@  4 cederom  staff       128 Oct 16 22:06 assets
-rw-rw-rw-@  1 cederom  staff      2300 Jan  1  1981 classes.dex
-rw-rw-rw-@  1 cederom  staff     14160 Jan  1  1981 classes2.dex
-rw-rw-rw-@  1 cederom  staff    100696 Jan  1  1981 classes3.dex
-rw-rw-rw-@  1 cederom  staff      7276 Jan  1  1981 classes4.dex
-rw-rw-rw-@  1 cederom  staff     29904 Jan  1  1981 classes5.dex
drwxr-xr-x@  4 cederom  staff       128 Oct 16 22:05 lib
-rw-r--r--@  1 cederom  staff  10779986 Oct 16 21:16 myapp-0.1-arm64-v8a_armeabi-v7a-debug.apk
drwxr-xr-x@  9 cederom  staff       288 Oct 16 22:05 res
-rw-r--r--@  1 cederom  staff      2492 Jan  1  1981 resources.arsc

./META-INF:
total 40
drwxr-xr-x@  6 cederom  staff   192 Oct 16 22:05 .
drwxr-xr-x@ 14 cederom  staff   448 Oct 16 22:05 ..
-rw-rw-rw-@  1 cederom  staff  1167 Jan  1  1981 CERT.RSA
-rw-rw-rw-@  1 cederom  staff  4191 Jan  1  1981 CERT.SF
-rw-rw-rw-@  1 cederom  staff  4117 Jan  1  1981 MANIFEST.MF
drwxr-xr-x@  3 cederom  staff    96 Oct 16 22:05 com

./META-INF/com:
total 0
drwxr-xr-x@ 3 cederom  staff   96 Oct 16 22:05 .
drwxr-xr-x@ 6 cederom  staff  192 Oct 16 22:05 ..
drwxr-xr-x@ 3 cederom  staff   96 Oct 16 22:05 android

./META-INF/com/android:
total 0
drwxr-xr-x@ 3 cederom  staff  96 Oct 16 22:05 .
drwxr-xr-x@ 3 cederom  staff  96 Oct 16 22:05 ..
drwxr-xr-x@ 3 cederom  staff  96 Oct 16 22:05 build

./META-INF/com/android/build:
total 0
drwxr-xr-x@ 3 cederom  staff  96 Oct 16 22:05 .
drwxr-xr-x@ 3 cederom  staff  96 Oct 16 22:05 ..
drwxr-xr-x@ 3 cederom  staff  96 Oct 16 22:05 gradle

./META-INF/com/android/build/gradle:
total 8
drwxr-xr-x@ 3 cederom  staff  96 Oct 16 22:05 .
drwxr-xr-x@ 3 cederom  staff  96 Oct 16 22:05 ..
-rw-rw-rw-@ 1 cederom  staff  56 Jan  1  1981 app-metadata.properties

./assets:
total 16
drwxr-xr-x@  4 cederom  staff  128 Oct 16 22:06 .
drwxr-xr-x@ 14 cederom  staff  448 Oct 16 22:05 ..
-rw-r--r--@  1 cederom  staff   86 Jan  1  1970 p4a_env_vars.txt
-rw-rw-rw-@  1 cederom  staff  195 Jan  1  1981 private.tar

./lib:
total 0
drwxr-xr-x@  4 cederom  staff  128 Oct 16 22:05 .
drwxr-xr-x@ 14 cederom  staff  448 Oct 16 22:05 ..
drwxr-xr-x@ 13 cederom  staff  416 Oct 16 22:05 arm64-v8a
drwxr-xr-x@ 13 cederom  staff  416 Oct 16 22:05 armeabi-v7a

./lib/arm64-v8a:
total 31360
drwxr-xr-x@ 13 cederom  staff      416 Oct 16 22:05 .
drwxr-xr-x@  4 cederom  staff      128 Oct 16 22:05 ..
-rw-rw-rw-@  1 cederom  staff  2134512 Jan  1  1981 libSDL2.so
-rw-rw-rw-@  1 cederom  staff   592632 Jan  1  1981 libSDL2_image.so
-rw-rw-rw-@  1 cederom  staff   433680 Jan  1  1981 libSDL2_mixer.so
-rw-rw-rw-@  1 cederom  staff  4357304 Jan  1  1981 libSDL2_ttf.so
-rw-rw-rw-@  1 cederom  staff  3119696 Jan  1  1981 libcrypto1.1.so
-rw-rw-rw-@  1 cederom  staff   102320 Jan  1  1981 libffi.so
-rw-rw-rw-@  1 cederom  staff    15064 Jan  1  1981 libmain.so
-rw-rw-rw-@  1 cederom  staff       60 Jan  1  1981 libpybundle.so
-rw-rw-rw-@  1 cederom  staff  3282472 Jan  1  1981 libpython3.10.so
-rw-rw-rw-@  1 cederom  staff  1273912 Jan  1  1981 libsqlite3.so
-rw-rw-rw-@  1 cederom  staff   723040 Jan  1  1981 libssl1.1.so

./lib/armeabi-v7a:
total 22984
drwxr-xr-x@ 13 cederom  staff      416 Oct 16 22:05 .
drwxr-xr-x@  4 cederom  staff      128 Oct 16 22:05 ..
-rw-rw-rw-@  1 cederom  staff  1388844 Jan  1  1981 libSDL2.so
-rw-rw-rw-@  1 cederom  staff   516756 Jan  1  1981 libSDL2_image.so
-rw-rw-rw-@  1 cederom  staff   296140 Jan  1  1981 libSDL2_mixer.so
-rw-rw-rw-@  1 cederom  staff  3565312 Jan  1  1981 libSDL2_ttf.so
-rw-rw-rw-@  1 cederom  staff  1816612 Jan  1  1981 libcrypto1.1.so
-rw-rw-rw-@  1 cederom  staff    44252 Jan  1  1981 libffi.so
-rw-rw-rw-@  1 cederom  staff    10860 Jan  1  1981 libmain.so
-rw-rw-rw-@  1 cederom  staff       60 Jan  1  1981 libpybundle.so
-rw-rw-rw-@  1 cederom  staff  2944460 Jan  1  1981 libpython3.10.so
-rw-rw-rw-@  1 cederom  staff   729040 Jan  1  1981 libsqlite3.so
-rw-rw-rw-@  1 cederom  staff   430820 Jan  1  1981 libssl1.1.so

./res:
total 0
drwxr-xr-x@  9 cederom  staff  288 Oct 16 22:05 .
drwxr-xr-x@ 14 cederom  staff  448 Oct 16 22:05 ..
drwxr-xr-x@  3 cederom  staff   96 Oct 16 22:05 drawable
drwxr-xr-x@  3 cederom  staff   96 Oct 16 22:05 drawable-hdpi-v4
drwxr-xr-x@  3 cederom  staff   96 Oct 16 22:05 drawable-mdpi-v4
drwxr-xr-x@  3 cederom  staff   96 Oct 16 22:05 drawable-xhdpi-v4
drwxr-xr-x@  3 cederom  staff   96 Oct 16 22:05 drawable-xxhdpi-v4
drwxr-xr-x@  6 cederom  staff  192 Oct 16 22:05 layout
drwxr-xr-x@  3 cederom  staff   96 Oct 16 22:05 mipmap

./res/drawable:
total 24
drwxr-xr-x@ 3 cederom  staff     96 Oct 16 22:05 .
drwxr-xr-x@ 9 cederom  staff    288 Oct 16 22:05 ..
-rw-r--r--@ 1 cederom  staff  11584 Jan  1  1981 presplash.jpg

./res/drawable-hdpi-v4:
total 8
drwxr-xr-x@ 3 cederom  staff    96 Oct 16 22:05 .
drwxr-xr-x@ 9 cederom  staff   288 Oct 16 22:05 ..
-rw-r--r--@ 1 cederom  staff  2683 Jan  1  1981 ic_launcher.png

./res/drawable-mdpi-v4:
total 8
drwxr-xr-x@ 3 cederom  staff    96 Oct 16 22:05 .
drwxr-xr-x@ 9 cederom  staff   288 Oct 16 22:05 ..
-rw-r--r--@ 1 cederom  staff  1698 Jan  1  1981 ic_launcher.png

./res/drawable-xhdpi-v4:
total 8
drwxr-xr-x@ 3 cederom  staff    96 Oct 16 22:05 .
drwxr-xr-x@ 9 cederom  staff   288 Oct 16 22:05 ..
-rw-r--r--@ 1 cederom  staff  3872 Jan  1  1981 ic_launcher.png

./res/drawable-xxhdpi-v4:
total 16
drwxr-xr-x@ 3 cederom  staff    96 Oct 16 22:05 .
drwxr-xr-x@ 9 cederom  staff   288 Oct 16 22:05 ..
-rw-r--r--@ 1 cederom  staff  6874 Jan  1  1981 ic_launcher.png

./res/layout:
total 32
drwxr-xr-x@ 6 cederom  staff   192 Oct 16 22:05 .
drwxr-xr-x@ 9 cederom  staff   288 Oct 16 22:05 ..
-rw-r--r--@ 1 cederom  staff  1104 Jan  1  1981 chooser_item.xml
-rw-r--r--@ 1 cederom  staff   544 Jan  1  1981 main.xml
-rw-r--r--@ 1 cederom  staff   692 Jan  1  1981 project_chooser.xml
-rw-r--r--@ 1 cederom  staff   512 Jan  1  1981 project_empty.xml

./res/mipmap:
total 8
drwxr-xr-x@ 3 cederom  staff    96 Oct 16 22:05 .
drwxr-xr-x@ 9 cederom  staff   288 Oct 16 22:05 ..
-rw-r--r--@ 1 cederom  staff  3229 Jan  1  1981 icon.png

@RobertFlatt
Copy link
Contributor

-rw-rw-rw-@  1 cederom  staff       60 Jan  1  1981 libpybundle.so

This is the issue as expected.
No need to install the app this is sufficient evidence.

The build log is incomplete, please attach a complete build (only) log

And what is the answer to this question?:

In the project directory what does this return? (myapp will be ok if you are really using defaults, else change)
ls -l .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a

@cederom
Copy link
Contributor Author

cederom commented Oct 16, 2023

-rw-rw-rw-@  1 cederom  staff       60 Jan  1  1981 libpybundle.so

This is the issue as expected. No need to install the app this is sufficient evidence.

yup :-(

The build log is incomplete, please attach a complete build (only) log

What do you mean incomplete?

This is full build log executed on an empty project with all defaults (provided in zip file):

buildozer android debug deploy run logcat | tee buildozer-kivy-examples-guide-quickstart-`date "+%s"`.log

If you mean verbose build (buildozer -v) here is the zip file: buildozer-kivy-examples-guide-quickstart-1697493280.zip.

Please provide a command for "complete build (only)" if its none of the above.

Idea: Create buildozer doctor command so this kind of diagnostic bundle is created with a single command..? :-)

And what is the answer to this question?:

In the project directory what does this return? (myapp will be ok if you are really using defaults, else change)
ls -l .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a

% ls -l .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a
total 0
drwxr-xr-x@ 5 cederom  staff  160 Oct 16 21:15 _python_bundle

I guess you want to see the files and sizes inside?

 % du -h .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a
4.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/urllib3-2.0.6.dist-info/licenses
 28K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/urllib3-2.0.6.dist-info
8.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/usr/local/bin
8.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/usr/local
8.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/usr
8.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/chardet/cli
 12K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/chardet/metadata
816K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/chardet
4.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/bin
 32K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/setuptools-51.3.3-py3.10.egg-info
 20K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/tools/packaging/pyinstaller_hooks
 32K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/tools/packaging
 28K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/tools/highlight
 28K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/tools/image-testsuite
 36K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/tools/gles_compat
 56K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/tools/pep8checker
356K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/tools/theming/defaulttheme
356K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/tools/theming
4.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/tools/precommit_hooks
608K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/tools
 36K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/core/video
 28K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/core/camera
100K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/core/image
156K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/core/audio
240K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/core/window
4.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/core/gl
256K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/core/text
 12K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/core/spelling
 68K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/core/clipboard
908K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/core
108K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/input/providers
 28K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/input/postproc
172K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/input
 60K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/uix/behaviors
 28K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/uix/recycleview
652K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/uix
4.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/garden
 60K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/include
4.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/eventmanager
 20K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/network
 20K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/storage
 40K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/lang
 16K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/lib/pango
4.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/lib/gstplayer
8.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/lib/vidcore_lite
 96K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/lib
4.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/deps
456K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/graphics/cgl_backend
4.0M    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/graphics
304K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/modules
 20K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/effects
 96K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/data/images
 44K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/data/keyboards
 20K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/data/glsl
 88K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/data/logo
1.4M    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/data/fonts
1.7M    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/data
8.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy/extras
9.9M    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/kivy
224K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/idna
 28K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/idna-3.4.dist-info
 76K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/Kivy-2.2.1-py3.10.egg-info
136K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/requests
 36K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/requests-2.31.0.dist-info
288K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/certifi
 28K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/pyjnius-1.5.0-py3.10.egg-info
 56K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/chardet-5.2.0.dist-info
244K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/android
8.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/jnius/src/org/jnius
8.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/jnius/src/org
8.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/jnius/src
516K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/jnius
 88K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/urllib3/util
 24K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/urllib3/contrib/_securetransport
 72K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/urllib3/contrib
296K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/urllib3
 92K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/setuptools/_vendor/packaging
212K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/setuptools/_vendor
216K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/setuptools/command
4.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/setuptools/extern
196K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/setuptools/_distutils/command
444K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/setuptools/_distutils
1.5M    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/setuptools
 24K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/certifi-2023.7.22.dist-info
 92K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/pkg_resources/_vendor/packaging
216K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/pkg_resources/_vendor
4.0K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/pkg_resources/extern
292K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/pkg_resources
 12K    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages/_distutils_hack
 15M    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/site-packages
4.6M    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle/modules
 22M    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a/_python_bundle
 22M    .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__arm64-v8a

It seems the python bundle is there built and ready?

Any hints welcome :-)

@RobertFlatt
Copy link
Contributor

RobertFlatt commented Oct 17, 2023

I guess you want to see the files and sizes inside?

Yes, that is great, looks like all the files for libpython.so are built.

What do you mean incomplete?

Something like this (and more before) is missing from the end of your log.

# Android packaging done!
# APK myapp-0.1-arm64-v8a_armeabi-v7a-debug.apk available in the bin directory

Attached is my HelloWorld log (log.txt), you can see what the "and more" is.

Listing '/home/bobf/ex/hello/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/armeabi-v7a/usr/local/bin'...
------------------------------your log ends here-------------------
�[1m�[90m[DEBUG]�[39m�[0m:   Create directory /home/bobf/ex/hello/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__armeabi-v7a/_python_bundle/modules
�[1m[INFO]�[0m:    Copy 64 files into the bundle

After the end of your log, mine copies some files to a directory,the same directory you listed the contents of above.

As you can see from my log, I still can't replicate what you see.

EDIT: maybe there is a flush() issue with stdout/stderr to the log file that is hiding the error?
Try looking at the the log output directly in the terminal, to see if there is more.

log.txt

@RobertFlatt
Copy link
Contributor

Wait there's more...
It looks like the Hello World instructions are still not followed.
https://github.com/Android-for-Python/Android-for-Python-Users#try-hello-world
Make and use the directory as described.

@cederom
Copy link
Contributor Author

cederom commented Oct 17, 2023

I guess you want to see the files and sizes inside?

Yes, that is great, looks like all the files for libpython.so are built.

What do you mean incomplete?

Something like this (and more before) is missing from the end of your log.

Okay, so there is the trouble! The log from my machine is complete! Starting from a clean build (only main.py and buildozer.spec) this is everything!! If anything is missing then it is not the problem of an edited log but missing part of the build!!!

# Android packaging done!
# APK myapp-0.1-arm64-v8a_armeabi-v7a-debug.apk available in the bin directory

Attached is my HelloWorld log (log.txt), you can see what the "and more" is.

Listing '/home/bobf/ex/hello/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/armeabi-v7a/usr/local/bin'...
------------------------------your log ends here-------------------
�[1m�[90m[DEBUG]�[39m�[0m:   Create directory /home/bobf/ex/hello/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/myapp/_python_bundle__armeabi-v7a/_python_bundle/modules
�[1m[INFO]�[0m:    Copy 64 files into the bundle

After the end of your log, mine copies some files to a directory,the same directory you listed the contents of above.

That does not happen for me! And this seems to be the problem! We might have a probem cause candidate :-)

As you can see from my log, I still can't replicate what you see.

Because build process should be the same for all machines and clearly it is not.. question why?

EDIT: maybe there is a flush() issue with stdout/stderr to the log file that is hiding the error? Try looking at the the log output directly in the terminal, to see if there is more.

I will also try to redirect stderr to stdout maybe this is the missing part and this is why some parts are not there..?

log.txt

Thank you for the reference! :-)

Wait there's more...
It looks like the Hello World instructions are still not followed.
https://github.com/Android-for-Python/Android-for-Python-Users#try-hello-world
Make and use the directory as described.

Okay here are the steps described:

  1. Create a project directory and cd to it: mkdir ~/hello; cd ~/hello.

I don't think that location matters, but I will retest in ~/hello + 2>&1 | tee that is also catch stderr.

  1. Create main.py containing the Kivy Hello World app.

kivy/guide/quickstart is the hello world :-)

  1. Run buildozer init - this will create a buildozer.spec default template. Edit it to say that android.api=33.

You have asked to stay all default so I did. Changing the api does not change anything (btw. current API is 34 already).

  1. Run buildozer android debug. This will take a while, especially the first time.
  2. Install the app on your phone.

This is done: buildozer android debug deploy run logcat.

Will report back in a moment after build :-) Thanks @RobertFlatt ! :-)

@cederom
Copy link
Contributor Author

cederom commented Oct 17, 2023

NO WAY!!! IT WORKS NOW!!!!!! o_O

I have only changed android.api=33 as instructed. Will now try with default value (android.api commented out) and with android.api=34 and see what happens. Is the directory location a problem? Under git? o_O

hello-buildozer-v-android-debug-deploy-run-logcat-stderr_to_stdout-1697531548.zip

UPDATE: Default API and API=34 works fine. So the problem is in the build directory???? o_O

UPDATE: Android examples from the kivy git master also build and start fine when moved to another location (i.e. ~/kivy/examples/android). They crash on run because of missing pil module (takepicture) or obsolete api (compass) but there is no "missing bundle problem". So the location is the cause of build problem. Either some pattern in the path name or the code being part of the git messes things up. Work in progress :-)

Thank you @RobertFlatt !!! =)

@RobertFlatt
Copy link
Contributor

👍

@misl6
Copy link
Member

misl6 commented Oct 19, 2023

In order to decide if we should close the issue, or start an investigation on it:

  • The issue was related to the path? (maybe a quite long one?)

@cederom
Copy link
Contributor Author

cederom commented Oct 19, 2023

Thanks @misl6 :-) The fix is not here yet so please keep the issue open until it is resolved.

Almost certainly there are two possible causes:

  1. If compiled project is under git then problem occurs. Checked. Negative. Git is not a problem.
  2. If there is a pattern in a directory tree or directory tree is too deep then problem occurs. .git pattern anywhere in the path (that is upper or working directory) causes missing bundle (proof: test.git-hello.zip).

If exactly the same project is copied with no git involved to let's say ~/kivy/hello the it builds and works fine. This applies to hello world and our project under development.

I am trying to pinpoint the problem and create a fix. You are more experienced and familiar with both Buildozer and P4A so if you could drop a hint and/or find a problem your support would be highly appreciated :-)

@cederom
Copy link
Contributor Author

cederom commented Oct 20, 2023

Okay, so there two more possible causes:

  1. If there is a .git suffix/pattern in the path names: for instance project in ~/kivy/hello will build and run but project in ~/kivy/hello.git will build but will have empty python bundle. Please verify. Reproducible for me (proof: 
    hello-vs-hello.git.zip).
  2. Maybe there is a conflict between venv used and created by buildozer? To be verified. Negative. I have tried ~/kivy/hello_venv and ~/kivy/hello.venv both with their internal venv (i.e. ~/kivy/hello.venv/venv) and both work fine (proof: hello_venv-and-hello.venv.zip). The dot in directory names and internal venv is not the problem here.

@RobertFlatt
Copy link
Contributor

  1. I tried clean, changed project directory hello to hello.git, then build.
    Build completed and libpybundle.so was good.

  2. I'm not a venv user (I use a WSL instance), so I don't have any experience.
    I did have a user once tell me that a strange issue was due creating a venv one Python major version , then updating the system Python to a new major version. This is as far as I know a rumor, and outside my experience.

@cederom
Copy link
Contributor Author

cederom commented Oct 20, 2023

Thanks @RobertFlatt :-) The .git pattern is the problem for me. When no .git pattern in the path all works fine. I am working on a fresh macOS 14.0 with HomeBrew to manage Open-Source packages. To make sure this is not a problem with local venv I have created one from scratch before each test for each build location.

I am debugging the Buildozer now step by step with pudb in order to track the problem. Hope to find the cause :-)

@cederom
Copy link
Contributor Author

cederom commented Oct 22, 2023

@RobertFlatt @misl6 there seems to be a Kivy release planned for yesterday (2023-10-21 according to "kivy schedule" calendar). If you want to make a release of Kivy and/or Buildozer please do not wait for me go ahead :-)

@misl6
Copy link
Member

misl6 commented Oct 24, 2023

@RobertFlatt @misl6 there seems to be a Kivy release planned for yesterday (2023-10-21 according to "kivy schedule" calendar). If you want to make a release of Kivy and/or Buildozer please do not wait for me go ahead :-)

Do not worry, the release has been postponed, as we're waiting for an update from a dependency.

(And we likely need to change our 2.3.0 plans in term of features, as we may need to move some features to a major release)

@cederom
Copy link
Contributor Author

cederom commented Oct 25, 2023

Okay so the problem seems to be in P4A rather in Buildozer. I have spent some time to track down and get familiar with Buildozer internals.. now its time for P4A. The problem may be at the "Package the application" stage at the end of build.

Copy link

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have the means to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@Julian-O Julian-O reopened this Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants