AndBible / and-bible

AndBible: Bible Study
https://andbible.org
GNU General Public License v3.0
591 stars 197 forks source link

Android 5 fails to download documents (ClassNotFoundException) #1875

Open tuomas2 opened 3 years ago

tuomas2 commented 3 years ago

https://support.andbible.org/scp/tickets.php?id=946

10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Failed to add class to list: org.crosswire.jsword.book.install.InstallerFactory [PluginUtil:getImplementorsMap:115] Thread[main,5,main]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: java.lang.ClassNotFoundException: Didn't find class "org.crosswire.jsword.book.install.sword.HttpSwordInstallerFactory" on path: DexPathList[[zip file "/data/app/com.google.android.webview-2/base.apk", zip file "/data/app/com.google.android.webview-2/split_config.fr.apk", zip file "/data/app/com.google.android.webview-2/split_weblayer.apk"],nativeLibraryDirectories=[/data/app/com.google.android.webview-2/lib/arm, /vendor/lib, /system/lib]]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at org.crosswire.common.util.ClassUtil.forName(ClassUtil.java:53)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at org.crosswire.common.util.PluginUtil.getImplementorsMap(PluginUtil.java:108)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at org.crosswire.jsword.book.install.InstallManager.<init>(InstallManager.java:66)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at net.bible.service.download.DownloadManager.<init>(DownloadManager.kt:46)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at net.bible.android.view.activity.download.DownloadActivity.<init>(DownloadActivity.kt:93)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.reflect.Constructor.newInstance(Native Method)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.Class.newInstance(Class.java:1650)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.Instrumentation.newActivity(Instrumentation.java:1079)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2633)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.ActivityThread.access$900(ActivityThread.java:181)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.os.Handler.dispatchMessage(Handler.java:102)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.os.Looper.loop(Looper.java:145)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.ActivityThread.main(ActivityThread.java:6126)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.reflect.Method.invoke(Native Method)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.reflect.Method.invoke(Method.java:372)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    Suppressed: java.io.IOException: Zip archive '/data/app/com.google.android.webview-2/split_config.fr.apk' doesn't contain classes.dex (error msg: Entry not found)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexFile.openDexFileNative(Native Method)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexFile.openDexFile(DexFile.java:295)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexFile.<init>(DexFile.java:80)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexFile.<init>(DexFile.java:59)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexPathList.loadDexFile(DexPathList.java:262)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexPathList.makeDexElements(DexPathList.java:231)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexPathList.<init>(DexPathList.java:109)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:65)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:120)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:45)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.app.LoadedApk.getClassLoader(LoadedApk.java:415)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.app.ContextImpl.getClassLoader(ContextImpl.java:1222)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebViewFactory.getFactoryClass(WebViewFactory.java:142)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:101)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.getFactory(WebView.java:2193)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.ensureProviderCreated(WebView.java:2188)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.setOverScrollMode(WebView.java:2247)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.view.View.<init>(View.java:3821)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.view.View.<init>(View.java:3932)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.view.ViewGroup.<init>(ViewGroup.java:507)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.widget.AbsoluteLayout.<init>(AbsoluteLayout.java:55)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.<init>(WebView.java:547)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.<init>(WebView.java:492)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.<init>(WebView.java:475)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.<init>(WebView.java:462)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.<init>(WebView.java:452)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at net.bible.android.view.activity.page.BibleView.<init>(BibleView.kt:192)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at net.bible.android.view.activity.page.BibleViewFactory.getOrCreateBibleView(BibleV
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Failed to add class to list: org.crosswire.jsword.book.install.InstallerFactory [PluginUtil:getImplementorsMap:115] Thread[main,5,main]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: java.lang.ClassNotFoundException: Didn't find class "org.crosswire.jsword.book.install.sword.HttpsSwordInstallerFactory" on path: DexPathList[[zip file "/data/app/com.google.android.webview-2/base.apk", zip file "/data/app/com.google.android.webview-2/split_config.fr.apk", zip file "/data/app/com.google.android.webview-2/split_weblayer.apk"],nativeLibraryDirectories=[/data/app/com.google.android.webview-2/lib/arm, /vendor/lib, /system/lib]]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at org.crosswire.common.util.ClassUtil.forName(ClassUtil.java:53)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at org.crosswire.common.util.PluginUtil.getImplementorsMap(PluginUtil.java:108)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at org.crosswire.jsword.book.install.InstallManager.<init>(InstallManager.java:66)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at net.bible.service.download.DownloadManager.<init>(DownloadManager.kt:46)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at net.bible.android.view.activity.download.DownloadActivity.<init>(DownloadActivity.kt:93)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.reflect.Constructor.newInstance(Native Method)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.Class.newInstance(Class.java:1650)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.Instrumentation.newActivity(Instrumentation.java:1079)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2633)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.ActivityThread.access$900(ActivityThread.java:181)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.os.Handler.dispatchMessage(Handler.java:102)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.os.Looper.loop(Looper.java:145)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at android.app.ActivityThread.main(ActivityThread.java:6126)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.reflect.Method.invoke(Native Method)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at java.lang.reflect.Method.invoke(Method.java:372)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:    Suppressed: java.io.IOException: Zip archive '/data/app/com.google.android.webview-2/split_config.fr.apk' doesn't contain classes.dex (error msg: Entry not found)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexFile.openDexFileNative(Native Method)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexFile.openDexFile(DexFile.java:295)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexFile.<init>(DexFile.java:80)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexFile.<init>(DexFile.java:59)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexPathList.loadDexFile(DexPathList.java:262)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexPathList.makeDexElements(DexPathList.java:231)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.DexPathList.<init>(DexPathList.java:109)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:65)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:120)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:45)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.app.LoadedApk.getClassLoader(LoadedApk.java:415)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.app.ContextImpl.getClassLoader(ContextImpl.java:1222)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebViewFactory.getFactoryClass(WebViewFactory.java:142)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:101)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.getFactory(WebView.java:2193)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.ensureProviderCreated(WebView.java:2188)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.setOverScrollMode(WebView.java:2247)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.view.View.<init>(View.java:3821)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.view.View.<init>(View.java:3932)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.view.ViewGroup.<init>(ViewGroup.java:507)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.widget.AbsoluteLayout.<init>(AbsoluteLayout.java:55)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.<init>(WebView.java:547)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.<init>(WebView.java:492)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.<init>(WebView.java:475)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.<init>(WebView.java:462)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at android.webkit.WebView.<init>(WebView.java:452)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at net.bible.android.view.activity.page.BibleView.<init>(BibleView.kt:192)
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger:        at net.bible.android.view.activity.page.BibleViewFactory.getOrCreateBibleView(Bible
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Unable to get class for sword-https [InstallManager:<init>:77] Thread[main,5,main]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Unable to get class for sword-https [InstallManager:<init>:77] Thread[main,5,main]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Unable to get class for sword-https [InstallManager:<init>:77] Thread[main,5,main]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Unable to get class for sword-https [InstallManager:<init>:77] Thread[main,5,main]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Unable to get class for sword-https [InstallManager:<init>:77] Thread[main,5,main]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Unable to get class for sword-https [InstallManager:<init>:77] Thread[main,5,main]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Unable to get class for sword-https [InstallManager:<init>:77] Thread[main,5,main]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Unable to get class for sword-https [InstallManager:<init>:77] Thread[main,5,main]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Unable to get class for sword-https [InstallManager:<init>:77] Thread[main,5,main]
10-17 09:45:24.503 13612 13612 W Slf4jAndroidLogger: Unable to get class for sword-https [InstallManager:<init>:77] Thread[main,5,main]
tuomas2 commented 3 years ago

Looks like same issue as #1724

tuomas2 commented 3 years ago

Also here https://support.andbible.org/scp/tickets.php?id=949

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=982

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1004

tuomas2 commented 2 years ago

There seem to be quite many cases of this. I have been reluctant to stop supporting Android 5 because it also works for many Android 5 devices (like my wife's Samsung tablet).

what should we do? Users can still manually install modules from zip files, even though module manager is completely failing them...

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1005

agrogers commented 2 years ago

Did it work in the old version AB? What got changed in this area that would stop it now?


www.TenOutOfTen.org https://www.TenOutOfTen.org @.*** (+61) 0477 174 193 (Australia) (+95) 09 250018669 (Myanmar)

On Thu, 4 Nov 2021 at 19:41, Tuomas Airaksinen @.***> wrote:

https://support.andbible.org/scp/tickets.php?id=1005

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AndBible/and-bible/issues/1875#issuecomment-960596680, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKGTJR7BPVZ2GMSJUKFPPDUKJIODANCNFSM5GNVILTQ .

tuomas2 commented 2 years ago

One user was telling that even on 4.4 it fails now (so it must be 3.2 that fails there). I have no idea what is breaking and can't reproduce myself.

timbze commented 2 years ago

Maybe have user install apk and see if that makes a difference. Might be play store bug with not downloading all required files since you're now using aab on play store. Or are you still using apk?

timbze commented 2 years ago

If the issue is really on 4.4 too then I don't know.

Not SSL issue that you had before right? Something about Let's Encrypt certificate I think

tuomas2 commented 2 years ago

Hmm I wonder if it was actually version 3.4 (meaning beta of 4.0) that was failing. Trying to find the ticket that mentioned that...

tuomas2 commented 2 years ago

Nope, it was about android 4.4. https://support.andbible.org/scp/tickets.php?id=963

timbze commented 2 years ago

Ok and that ticket seems to be from F-Droid version, I think they use apk.

If I recall correctly, the SSL issue happened only on older versions of Android, which this would be the case

tuomas2 commented 2 years ago

I think it's not SSL issue. It is failure to load module installer classes from jsword (dynamically).

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1009

timbze commented 2 years ago

https://stackoverflow.com/questions/43666425/android-5-x-classnotfoundexception-works-fine-on-6-0

Old question but seems it could be same issue, maybe 1 of the answers would help

tuomas2 commented 2 years ago

Hmm. dexOptions seem to be "deprecated".

tuomas2 commented 2 years ago

Triggered test build (will appear here: https://github.com/AndBible/and-bible/releases/tag/build-618-1875-testbuild-1 )

tuomas2 commented 2 years ago

Is there anyone affected by issue following this ticket that could perhaps test this?

tuomas2 commented 2 years ago

Perhaps should add some classes manually to primary dex file. https://developer.android.com/studio/build/multidex#keep

tuomas2 commented 2 years ago

Another test build https://github.com/AndBible/and-bible/releases/tag/build-618-1875-testbuild-2

tuomas2 commented 2 years ago

Asked user to test: https://support.andbible.org/scp/tickets.php?id=1033

(duplicate: https://support.andbible.org/scp/tickets.php?id=1034)

tuomas2 commented 2 years ago

I believe users that suffer from this also suffer from #1873.

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1079

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1076

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1094

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1123

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1165

tuomas2 commented 2 years ago

https://support.andbible.org/scp/tickets.php?id=1312

tuomas2 commented 1 year ago

Also 673 fails still https://support.andbible.org/scp/tickets.php?id=1766