HelloZeroNet / ZeroNet-kivy

Android client for ZeroNet
https://zeronet.io
GNU General Public License v2.0
281 stars 80 forks source link

Error: Could not load any libpythonXXX.so #10

Closed bjorn3 closed 5 years ago

bjorn3 commented 7 years ago

Android 4.1.2

mkg20001 commented 7 years ago

When does it occur? When running the app or when building it?

bjorn3 commented 7 years ago

When running the app installed from ZeroNet-0.5.2.1-debug.apk at https://github.com/HelloZeroNet/ZeroNet-kivy/releases/tag/0.5.2.1-alpha2.

mkg20001 commented 7 years ago

Any logs or more information?

bjorn3 commented 7 years ago

http://imgur.com/a/jXvVk

Yuvaldv commented 7 years ago

Same, running alpha#4 on android 4.4.2, ParallelsDekstop emu.

screen shot 2017-05-13 at 7 07 28

mkg20001 commented 7 years ago

Could someone with that problem provide adb logs?

bjorn3 commented 7 years ago

First time with "Unfortunately, ZeroNet has stopped":

$ ./adb logcat -d
--------- beginning of /dev/log/system
D/PowerManagerService(  479): userActivity [mUserState]: 3, [mWakeLockState]: 1
--------- beginning of /dev/log/main
[...]
I/ActivityManager(  479): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.mkg20001.zeronet/org.kivy.android.PythonActivity u=0} from pid 712
I/[LGHome]EVENT(  712): [Launcher.java:2177:onPause()]onPause
V/PythonActivity( 2284): My oncreate running
V/PythonActivity( 2284): About to do super onCreate
V/SDL     ( 2284): Device: vee3e
V/SDL     ( 2284): Model: LG-E430
V/SDL     ( 2284): onCreate():null
V/PythonActivity( 2284): Did super onCreate
W/dalvikvm( 2284): threadid=1: thread exiting with uncaught exception (group=0x4127c438)
E/AndroidRuntime( 2284): FATAL EXCEPTION: main
E/AndroidRuntime( 2284): java.lang.RuntimeException: Unable to start activity ComponentInfo{net.mkg20001.zeronet/org.kivy.android.PythonActivity}: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
E/AndroidRuntime( 2284):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
E/AndroidRuntime( 2284):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2099)
E/AndroidRuntime( 2284):    at android.app.ActivityThread.access$600(ActivityThread.java:138)
E/AndroidRuntime( 2284):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
E/AndroidRuntime( 2284):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2284):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2284):    at android.app.ActivityThread.main(ActivityThread.java:4929)
E/AndroidRuntime( 2284):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2284):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 2284):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:798)
E/AndroidRuntime( 2284):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:565)
E/AndroidRuntime( 2284):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 2284): Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
E/AndroidRuntime( 2284):    at android.view.ViewGroup.addViewInner(ViewGroup.java:3378)
E/AndroidRuntime( 2284):    at android.view.ViewGroup.addView(ViewGroup.java:3249)
E/AndroidRuntime( 2284):    at android.view.ViewGroup.addView(ViewGroup.java:3225)
E/AndroidRuntime( 2284):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:444)
E/AndroidRuntime( 2284):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:434)
E/AndroidRuntime( 2284):    at android.app.Activity.setContentView(Activity.java:2123)
E/AndroidRuntime( 2284):    at org.kivy.android.PythonActivity.showLoadingScreen(PythonActivity.java:449)
E/AndroidRuntime( 2284):    at org.kivy.android.PythonActivity.onCreate(PythonActivity.java:71)
E/AndroidRuntime( 2284):    at android.app.Activity.performCreate(Activity.java:5254)
E/AndroidRuntime( 2284):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1082)
E/AndroidRuntime( 2284):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2038)
E/AndroidRuntime( 2284):    ... 11 more
W/ActivityManager(  479):   Force finishing activity net.mkg20001.zeronet/org.kivy.android.PythonActivity
D/dalvikvm( 1295): GC_CONCURRENT freed 1908K, 48% free 5902K/11267K, paused 13ms+13ms, total 92ms
D/dalvikvm( 1295): WAIT_FOR_CONCURRENT_GC blocked 79ms
D/dalvikvm( 1295): WAIT_FOR_CONCURRENT_GC blocked 75ms
W/CursorWindow( 1295): Window is full: requested allocation 135168 bytes, free space 57500 bytes, window size 2097152 bytes
W/ActivityManager(  479): Activity pause timeout for ActivityRecord{421f39d8 net.mkg20001.zeronet/org.kivy.android.PythonActivity}
[...]

Second time with popup like @yuvalDV got:

$ ./adb logcat -d
--------- beginning of /dev/log/system
[...]
W/ActivityManager(  479): Activity destroy timeout for ActivityRecord{41f1cf00 net.mkg20001.zeronet/org.kivy.android.PythonActivity}
I/ActivityManager(  479): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.mkg20001.zeronet/org.kivy.android.PythonActivity u=0} from pid 712
--------- beginning of /dev/log/main
I/[LGHome]EVENT(  712): [Launcher.java:2177:onPause()]onPause
I/ActivityManager(  479): Start proc net.mkg20001.zeronet for activity net.mkg20001.zeronet/org.kivy.android.PythonActivity: pid=2413 uid=10102 gids={1015, 3003, 1028}
E/Trace   ( 2413): error opening trace file: No such file or directory (2)
V/ActivityThread( 2413): Class path: /data/app/net.mkg20001.zeronet-1.apk, JNI path: /data/data/net.mkg20001.zeronet/lib
V/PythonActivity( 2413): My oncreate running
V/PythonActivity( 2413): About to do super onCreate
V/SDL     ( 2413): Device: vee3e
V/SDL     ( 2413): Model: LG-E430
V/SDL     ( 2413): onCreate():null
V/PythonActivity( 2413): Did super onCreate
V/SDL     ( 2413): getting identifier
V/SDL     ( 2413): kind is drawable and name presplash
V/SDL     ( 2413): result is 2130837506
V/SDL     ( 2413): asked to get string presplash_color
V/SDL     ( 2413): getting identifier
V/SDL     ( 2413): kind is string and name presplash_color
V/SDL     ( 2413): result is 2130968578
V/SDL     ( 2413): onResume()
V/PythonActivity( 2413): Ready to unpack
V/PythonActivity( 2413): UNPACKING!!! private app
V/PhoneStatusBar(  556): setLightsOn(true)
V/SDL     ( 2413): asked to get string private_version
V/SDL     ( 2413): getting identifier
V/SDL     ( 2413): kind is string and name private_version
V/SDL     ( 2413): result is 2130968577
V/PythonActivity( 2413): Data version is 1488635489.03
I/Adreno200-EGL( 2413): <qeglDrvAPI_eglInitialize:299>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB_REL_2.0.3.1_RB2.04.01.01.55.008_msm7627a_JB_REL_2.0.3.1_Merge_release_AU (Merge)
I/Adreno200-EGL( 2413): Build Date: 04/17/13 Wed
I/Adreno200-EGL( 2413): Local Branch: 
I/Adreno200-EGL( 2413): Remote Branch: m/jb_rel_2.0.3.1
I/Adreno200-EGL( 2413): Local Patches: NONE
I/Adreno200-EGL( 2413): Reconstruct Branch: AU_LINUX_ANDROID_JB_REL_2.0.3.1_RB2.04.01.01.55.008 +  NOTHING
W/System.err( 2413): Could not load any libpythonXXX.so
V/PythonActivity( 2413): Setting env vars for start.c and Python to use
V/PythonActivity( 2413): Access to our meta-data...
I/PythonActivity( 2413): Surface will NOT be transparent
V/SDL     ( 2413): onWindowFocusChanged(): true
I/WindowManager(  479): Switching to real app window: Window{41fcd850 net.mkg20001.zeronet/org.kivy.android.PythonActivity paused=false}
I/ActivityManager(  479): Displayed net.mkg20001.zeronet/org.kivy.android.PythonActivity: +527ms (total +11s384ms)
V/SDL     ( 2413): onWindowFocusChanged(): false
I/[LGHome]EVENT(  712): [Launcher.java:10652:onStop()]onStop
mkg20001 commented 7 years ago

Good news: I fixed the error and will push the fix soon. Bad news: I got this new error (it's android - that was kind of expected)

I/python  ( 3681): [CRITICAL] [Window      ] Unable to find any valuable Window provider.
I/python  ( 3681): sdl2 - UnicodeDecodeError: 'utf8' codec can't decode byte 0xa8 in position 0: invalid start byte
I/python  ( 3681):   File "/home/data/.buildozer/android/platform/build/dists/zeronet/private/lib/python2.7/site-packages/kivy/core/__init__.py", line 67, in core_select_lib
I/python  ( 3681):   File "/home/data/.buildozer/android/platform/build/dists/zeronet/private/lib/python2.7/site-packages/kivy/core/window/window_sdl2.py", line 140, in __init__
I/python  ( 3681):   File "/home/data/.buildozer/android/platform/build/dists/zeronet/private/lib/python2.7/site-packages/kivy/core/window/__init__.py", line 899, in __init__
I/python  ( 3681):   File "/home/data/.buildozer/android/platform/build/dists/zeronet/private/lib/python2.7/site-packages/kivy/core/window/window_sdl2.py", line 291, in create_window
I/python  ( 3681):   File "/home/data/.buildozer/android/platform/build/dists/zeronet/private/lib/python2.7/site-packages/kivy/core/window/__init__.py", line 1051, in create_window
I/python  ( 3681):   File "kivy/graphics/instructions.pyx", line 752, in kivy.graphics.instructions.RenderContext.__init__ (kivy/graphics/instructions.c:12419)
I/python  ( 3681):   File "kivy/graphics/shader.pyx", line 184, in kivy.graphics.shader.Shader.__init__ (kivy/graphics/shader.c:5479)
I/python  ( 3681):   File "kivy/graphics/shader.pyx", line 693, in kivy.graphics.shader.Shader.vs.__set__ (kivy/graphics/shader.c:12909)
I/python  ( 3681):   File "kivy/graphics/shader.pyx", line 555, in kivy.graphics.shader.Shader.build_vertex (kivy/graphics/shader.c:10642)
I/python  ( 3681):   File "kivy/graphics/shader.pyx", line 578, in kivy.graphics.shader.Shader.link_program (kivy/graphics/shader.c:10951)
I/python  ( 3681):   File "kivy/graphics/shader.pyx", line 632, in kivy.graphics.shader.Shader.get_program_log (kivy/graphics/shader.c:11648)
I/python  ( 3681):   File "/home/data/.buildozer/android/platform/build/build/other_builds/python2-openssl-sqlite3/armeabi-v7a/python2/python-install/lib/python2.7/encodings/utf_8.py", 
AndreMiras commented 6 years ago

Hi @mkg20001 I'm interested to know what was the fix for the libpythonXXX.so error I'm also having this error on some Android 4.0.4 device. Is it what you did? https://groups.google.com/forum/#!topic/kivy-users/lkrolZjym0Y i.e. editing https://github.com/kivy/python-for-android/blob/stable/pythonforandroid/bootstraps/sdl2/build/src/org/kivy/android/PythonUtil.java to add missing ssl/crypto libraries? If that was it then it seems to be solved upstream in the current master branch: https://github.com/kivy/python-for-android/blob/master/pythonforandroid/bootstraps/sdl2/build/src/main/java/org/kivy/android/PythonUtil.java But not yet in the stable branch.

thorin-schiffer commented 6 years ago

PythonUtil.java from the current master fixes the problem for me. I have a problem that strings.tmpl.xml would not render into xml file on current master. Any ideas?

mkg20001 commented 5 years ago

@AndreMiras Sorry for overlooking this. Was just someone elses PR that I merged into my own branch on a trial-and-error approach.

@bjorn3 (and others) Please re-check if this issue still persists and re-open if it does. It is most likely solved in the newest version.