Closed czoins closed 2 years ago
Thanks for the report. I can't think of any reason why 5.1.1 would be a problem (especially since it's apparently only an issue on physical device). I don't suppose you can provide a stack trace of the failure?
As for target SDK compatibility - it's possible we might have those misconfigured; I know we are dependent on a couple of recent API features, and while we were developing the backend we modified our minimum supported version a couple of times. @paulproteus - I don't suppose you remember off the top of your head where we ended up on those discussions?
I honestly don't recall where we landed on API 21 vs. 22. It could honestly be the case that something dynamic requires API 22, or even 23. I dimly recall in June/July/August discovering something that needed 22 or even 23, and we ran with it.
The issue here seems to be a Java ClassNotFound exception. I'd personally love to know the name of the class it's failing to instantiate.
I filed https://github.com/beeware/rubicon-java/issues/54 to improve exception handling in rubicon-java.
To find out what's going on ASAP, this patch to rubicon-java
will print every Java class name that gets accessed by Python. Perhaps a next step is to rebuild rubicon-java with that patch and give you instructions @czoins to run your app with this, and then see what the log says?
diff --git a/jni/rubicon.c b/jni/rubicon.c
index 825b141..c21dff3 100644
--- a/jni/rubicon.c
+++ b/jni/rubicon.c
@@ -145,6 +145,7 @@ jclass DefineClass(const char *name, jobject loader, const jbyte *buf, jsize len
return (*java)->DefineClass(java, name, loader, buf, len);
}
jclass FindClass(const char *name) {
+ LOG_E("Trying to call FindClass on %s", name);
return (*java)->FindClass(java, name);
}
jmethodID FromReflectedMethod(jobject method) {
@freakboy3742 I think i wasn't very clear. It's not crashing on a physical device only, but both the 22 level API device and emulator. I haven't tested it on 21. And it works on 23.
@paulproteus What should i do exactly to test my app with this patch?
I'm going to make a judgement call and close this issue.
While it would be desirable to support older Android versions, it's unlikely this is ever going to be prioritised as something to fix; and with the progress of time, it becomes increasingly unlikely that anyone will be motivated to look into the problem.
If someone wants to present a patch for this, I'll be happy to consider it for merging (assuming it doesn't require any changes that would pose complications for the support of more recent Android versions).
Describe the bug I am trying to install the tutorial app on Android 5.1.1 (API 22). It installs just fine, and crashes while loading (you can see the splash screen). I haven't modified anything when to comes to settings, and even the app. I have run the app on both Android 6.0 & 5.1.1 emulators, and a physical 5.1.1 device. It runs just fine on 6.0, so it's pretty clear that it has to do with 5.1.1. In
build.gradle
,minSdkVersion
is set to 21, so that's quite odd.To Reproduce Steps to reproduce the behavior:
briefcase run android
Expected behavior To run on API 21+
Environment:
Additional context Another thing to note, is that you cannot set the target sdk below 28, as i tried setting it to 27 & 26 & 22 and it just throws the same errors about linking.
LOG
``` --------- beginning of crash F/libc ( 2631): Fatal signal 6 (SIGABRT), code -6 in tid 2631 (mple.helloworld) W/linker ( 2659): libdB3A84527CEF4.so: unused DT entry: type 0x6ffffef5 arg 0x6c0 W/linker ( 2659): libdB3A84527CEF4.so: unused DT entry: type 0x6ffffffe arg 0x680 W/linker ( 2659): libdB3A84527CEF4.so: unused DT entry: type 0x6fffffff arg 0x2 I/ExposureNotification( 1717): ThreadSafeLevelDbWrapper: do open LevelDb en-matching-request-db [CONTEXT service_id=236 ] I/ExposureNotification( 1717): ThreadSafeLevelDbWrapper:en-matching-request-db instance aimh@8a7297d created [CONTEXT service_id=236 ] I/ExposureNotification( 1717): ThreadSafeLevelDbWrapper:en-matching-request-db instance aimh@8a7297d closed [CONTEXT service_id=236 ] I/ExposureNotification( 1717): ThreadSafeLevelDbWrapper: do close LevelDb en-matching-request-db [CONTEXT service_id=236 ] I/NetRec ( 1717): [77] BootCompletedOrAppUpdatedIntentOperation.onHandleIntent: onBootCompleted() I/ExposureNotification( 1717): ExposureServiceInternalService.onDestroy, com.google.android.gms.nearby.exposurenotification.service.ExposureNotificationInternalChimeraService@16c2dae0 [CONTEXT service_id=236 ] I/DEBUG ( 1143): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 1143): Build fingerprint: 'Android/sdk_google_phone_x86/generic_x86:5.1.1/LMY48X/6695563:userdebug/test-keys' I/DEBUG ( 1143): Revision: '0' I/DEBUG ( 1143): ABI: 'x86' I/DEBUG ( 1143): pid: 2631, tid: 2631, name: mple.helloworld >>> com.example.helloworld <<< I/DEBUG ( 1143): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- I/DEBUG ( 1143): Abort message: 'art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception 'java.lang.ClassNotFoundException' thrown in unknown throw location' I/DEBUG ( 1143): eax 00000000 ebx 00000a47 ecx 00000a47 edx 00000006 I/DEBUG ( 1143): esi b77cfc48 edi 0000000b I/DEBUG ( 1143): xcs 00000073 xds 0000007b xes 0000007b xfs 00000007 xss 0000007b I/DEBUG ( 1143): eip b755d2e6 ebp 00000a47 esp bf96dcd0 flags 00000286 I/DEBUG ( 1143): I/DEBUG ( 1143): backtrace: I/DEBUG ( 1143): #00 pc 000742e6 /system/lib/libc.so (tgkill+22) I/DEBUG ( 1143): #01 pc 0002217b /system/lib/libc.so (pthread_kill+155) I/DEBUG ( 1143): #02 pc 000239f4 /system/lib/libc.so (raise+36) I/DEBUG ( 1143): #03 pc 0001bdf4 /system/lib/libc.so (abort+84) I/DEBUG ( 1143): #04 pc 00377f56 /system/lib/libart.so (art::Runtime::Abort()+294) I/DEBUG ( 1143): #05 pc 000ec704 /system/lib/libart.so (art::LogMessage::~LogMessage()+1876) I/DEBUG ( 1143): #06 pc 00102c53 /system/lib/libart.so (art::JniAbort(char const*, char const*)+1683) I/DEBUG ( 1143): #07 pc 0010359c /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+108) I/DEBUG ( 1143): #08 pc 00109663 /system/lib/libart.so (art::ScopedCheck::CheckThread(int)+2867) I/DEBUG ( 1143): #09 pc 00109e42 /system/lib/libart.so (art::ScopedCheck::ScopedCheck(_JNIEnv*, int, char const*)+322) I/DEBUG ( 1143): #10 pc 001161fb /system/lib/libart.so (art::CheckJNI::NewGlobalRef(_JNIEnv*, _jobject*)+59) I/DEBUG ( 1143): #11 pc 00003619 /data/app/com.example.helloworld-1/lib/x86/librubicon.so (NewGlobalRef+41) I/DEBUG ( 1143): #12 pc 00008fc7 /data/app/com.example.helloworld-1/lib/x86/libffi.so I/DEBUG ( 1143): #13 pc 00008420 /data/app/com.example.helloworld-1/lib/x86/libffi.so I/DEBUG ( 1143): #14 pc 00007ffb /data/app/com.example.helloworld-1/lib/x86/libffi.so (ffi_call+139) I/DEBUG ( 1143): #15 pc 00016744 /data/data/com.example.helloworld/files/python/stdlib/lib/python3.7/lib-dynload/_ctypes.cpython-37m.so (_call_function_pointer+452) I/DEBUG ( 1143): #16 pc 0001605a /data/data/com.example.helloworld/files/python/stdlib/lib/python3.7/lib-dynload/_ctypes.cpython-37m.so (_ctypes_callproc+1226) I/DEBUG ( 1143): #17 pc 0000858b /data/data/com.example.helloworld/files/python/stdlib/lib/python3.7/lib-dynload/_ctypes.cpython-37m.so (PyCFuncPtr_call+907) I/DEBUG ( 1143): #18 pc 0006ebe2 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyObject_FastCallKeywords+850) I/DEBUG ( 1143): #19 pc 001dd065 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #20 pc 001d7cbf /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyEval_EvalFrameDefault+40447) I/DEBUG ( 1143): #21 pc 001cdeab /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (PyEval_EvalFrameEx+107) I/DEBUG ( 1143): #22 pc 001de8f4 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyEval_EvalCodeWithName+5044) I/DEBUG ( 1143): #23 pc 0006e654 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyFunction_FastCallDict+1172) I/DEBUG ( 1143): #24 pc 0006deed /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyObject_FastCallDict+109) I/DEBUG ( 1143): #25 pc 00070f2c /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyObject_Call_Prepend+252) I/DEBUG ( 1143): #26 pc 00103808 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #27 pc 000fa43e /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #28 pc 0006ebe2 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyObject_FastCallKeywords+850) I/DEBUG ( 1143): #29 pc 001dd065 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #30 pc 001d7da7 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyEval_EvalFrameDefault+40679) I/DEBUG ( 1143): #31 pc 001cdeab /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (PyEval_EvalFrameEx+107) I/DEBUG ( 1143): #32 pc 001de8f4 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyEval_EvalCodeWithName+5044) I/DEBUG ( 1143): #33 pc 001cddf2 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (PyEval_EvalCodeEx+354) I/DEBUG ( 1143): #34 pc 001cdc7b /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (PyEval_EvalCode+155) I/DEBUG ( 1143): #35 pc 001c97e9 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #36 pc 001c69c3 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #37 pc 0006fc82 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyMethodDef_RawFastCallDict+994) I/DEBUG ( 1143): #38 pc 0006e798 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyCFunction_FastCallDict+152) I/DEBUG ( 1143): #39 pc 0006f5f5 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (PyCFunction_Call+149) I/DEBUG ( 1143): #40 pc 001dd361 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #41 pc 001d8277 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyEval_EvalFrameDefault+41911) I/DEBUG ( 1143): #42 pc 001cdeab /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (PyEval_EvalFrameEx+107) I/DEBUG ( 1143): #43 pc 001de8f4 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyEval_EvalCodeWithName+5044) I/DEBUG ( 1143): #44 pc 0006f0b8 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyFunction_FastCallKeywords+824) I/DEBUG ( 1143): #45 pc 001dd02f /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #46 pc 001d7cbf /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyEval_EvalFrameDefault+40447) I/DEBUG ( 1143): #47 pc 001cdeab /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (PyEval_EvalFrameEx+107) I/DEBUG ( 1143): #48 pc 0006f743 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #49 pc 0006ee8f /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyFunction_FastCallKeywords+271) I/DEBUG ( 1143): #50 pc 001dd02f /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #51 pc 001d7d1c /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyEval_EvalFrameDefault+40540) I/DEBUG ( 1143): #52 pc 001cdeab /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (PyEval_EvalFrameEx+107) I/DEBUG ( 1143): #53 pc 0006f743 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #54 pc 0006ee8f /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyFunction_FastCallKeywords+271) I/DEBUG ( 1143): #55 pc 001dd02f /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #56 pc 001d7da7 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyEval_EvalFrameDefault+40679) I/DEBUG ( 1143): #57 pc 001cdeab /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (PyEval_EvalFrameEx+107) I/DEBUG ( 1143): #58 pc 0006f743 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #59 pc 0006ee8f /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyFunction_FastCallKeywords+271) I/DEBUG ( 1143): #60 pc 001dd02f /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/DEBUG ( 1143): #61 pc 001d7da7 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (_PyEval_EvalFrameDefault+40679) I/DEBUG ( 1143): #62 pc 001cdeab /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so (PyEval_EvalFrameEx+107) I/DEBUG ( 1143): #63 pc 0006f743 /data/app/com.example.helloworld-1/lib/x86/libpython3.7m.so I/NetRec ( 1717): [77] BootCompletedOrAppUpdatedIntentOperation.onHandleIntent: Scheduling CleanupDatabaseTask I/NetRec ( 1717): [77] akvg.a: onConfigChanged() I/NetRec ( 1717): [78] ClearDatabaseService.onHandleIntent: Clearing score cache I/NetRec ( 1717): [77] akvg.a: Cancelling all NetRec GCM tasks D/AlarmManagerService( 1483): Kernel timezone updated to -60 minutes west of GMT D/AlarmManagerService( 1483): Setting time of day to sec=1607028662 I/anxz ( 1717): updateFromConfigurations using legacy put method [CONTEXT service_id=204 ] V/AlarmClock( 2305): AlarmInitReceiver android.intent.action.TIME_SET V/AlarmClock( 2305): AlarmInitReceiver finished I/SystemUpdate( 2059): [Installation,ReceiverIntentOperation] Received intent: Intent { act=android.intent.action.TIME_SET flg=0x24000010 cmp=com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver }. I/anxz ( 1717): updateFromConfigurations using legacy put method [CONTEXT service_id=204 ] I/ChimeraConfigurator( 2059): Starting update, reason: 4 urgentFeatures: pay:-1 I/art ( 2659): Rejecting re-init on previously-failed class java.lang.Class