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

[BUG] Error on Android: api data not showing in release version but works fine in the debug mode #216

Open
CMFerrer opened this issue Jan 20, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@CMFerrer
Copy link

Describe the bug
I get an exception when I run my application in release mode. Here is the stacktrace:
Code Sample

java.lang.ExceptionInInitializerError
    at c5.u2.a(Unknown Source:9)
    at ga.f.a(Unknown Source:2)
    at ga.n.a(Unknown Source:60)
    at i5.x2.l(Unknown Source:48)
    at ra.a.o(Unknown Source:8)
    at od.l0.run(Unknown Source:100)
    at kotlinx.coroutines.internal.f.run(Unknown Source:11)
    at kotlinx.coroutines.scheduling.j.run(Unknown Source:2)
    at kotlinx.coroutines.scheduling.a$a.run(Unknown Source:78)
Caused by: ue.b: java.lang.ClassNotFoundException: Didn't find class "org.apache.commons.logging.impl.LogFactoryImpl" on path: DexPathList[[zip file "/data/app/com.cmf.medi-DeziiMx52ejXRoEFNnQ2Pw==/base.apk"],nativeLibraryDirectories=[/data/app/com.cmf.medi-DeziiMx52ejXRoEFNnQ2Pw==/lib/arm64, /system/lib64, /hw_product/lib64, /system/product/lib64, /prets/lib64]] (Caused by java.lang.ClassNotFoundException: Didn't find class "org.apache.commons.logging.impl.LogFactoryImpl" on path: DexPathList[[zip file "/data/app/com.cmf.medi-DeziiMx52ejXRoEFNnQ2Pw==/base.apk"],nativeLibraryDirectories=[/data/app/com.cmf.medi-DeziiMx52ejXRoEFNnQ2Pw==/lib/arm64, /system/lib64, /hw_product/lib64, /system/product/lib64, /prets/lib64]])
    at ue.d.run(Unknown Source:410)
    at java.security.AccessController.doPrivileged(AccessController.java:43)
    at ue.h.j(Unknown Source:5)
    at ue.h.c(Unknown Source:839)
    at ue.h.e(Unknown Source:0)
    at y5.e0.<clinit>(Unknown Source:2)
    at c5.u2.a(Unknown Source:9) 
    at ga.f.a(Unknown Source:2) 
    at ga.n.a(Unknown Source:60) 
    at i5.x2.l(Unknown Source:48) 
    at ra.a.o(Unknown Source:8) 
    at od.l0.run(Unknown Source:100) 
    at kotlinx.coroutines.internal.f.run(Unknown Source:11) 
    at kotlinx.coroutines.scheduling.j.run(Unknown Source:2) 
    at kotlinx.coroutines.scheduling.a$a.run(Unknown Source:78) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.commons.logging.impl.LogFactoryImpl" on path: DexPathList[[zip file "/data/app/com.cmf.medi-DeziiMx52ejXRoEFNnQ2Pw==/base.apk"],nativeLibraryDirectories=[/data/app/com.cmf.medi-DeziiMx52ejXRoEFNnQ2Pw==/lib/arm64, /system/lib64, /hw_product/lib64, /system/product/lib64, /prets/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:209)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at ue.d.run(Unknown Source:27)
    at java.security.AccessController.doPrivileged(AccessController.java:43) 
    at ue.h.j(Unknown Source:5) 
    at ue.h.c(Unknown Source:839) 
    at ue.h.e(Unknown Source:0) 
    at y5.e0.<clinit>(Unknown Source:2) 
    at c5.u2.a(Unknown Source:9) 
    at ga.f.a(Unknown Source:2) 
    at ga.n.a(Unknown Source:60) 
    at i5.x2.l(Unknown Source:48) 
    at ra.a.o(Unknown Source:8) 
    at od.l0.run(Unknown Source:100) 
    at kotlinx.coroutines.internal.f.run(Unknown Source:11) 
    at kotlinx.coroutines.scheduling.j.run(Unknown Source:2) 
    at kotlinx.coroutines.scheduling.a$a.run(Unknown Source:78) 

Expected behavior
skrape works like in Android Studio debug mode

Additional context
Version skrape it: 1.2.2

@CMFerrer CMFerrer added the bug Something isn't working label Jan 20, 2023
@Sal7one
Copy link

Sal7one commented Mar 2, 2023

@CMFerrer
Copy link
Author

CMFerrer commented Mar 2, 2023

No luck, I tried to test it but now I get this:

2023-03-02 09:00:20.277 14679-14679 ExampleViewModel com.chiksmedina.desaparecidosper I dj.b: The chosen LogFactory implementation does not extend LogFactory. Please check your configuration. (Caused by java.lang.ClassCastException: The application has specified that a custom LogFactory implementation should be used but Class 'org.apache.commons.logging.impl.LogFactoryImpl' cannot be converted to 'dj.i'. Please check the custom implementation. Help can be found @http://commons.apache.org/logging/troubleshooting.html.)
2023-03-02 09:00:20.278 14679-14679 ExampleViewModel com.chiksmedina.desaparecidosper I java.lang.ExceptionInInitializerError
at c1.a.a(Unknown Source:9)
at oe.f.a(Unknown Source:2)
at oe.n.a(Unknown Source:60)
at l6.v2.l(Unknown Source:60)
at ze.a.t(Unknown Source:8)
at xh.i0.run(Unknown Source:100)
at kotlinx.coroutines.internal.f.run(Unknown Source:11)
at kotlinx.coroutines.scheduling.i.run(Unknown Source:2)
at kotlinx.coroutines.scheduling.a$a.run(Unknown Source:78)
Caused by: dj.b: The chosen LogFactory implementation does not extend LogFactory. Please check your configuration. (Caused by java.lang.ClassCastException: The application has specified that a custom LogFactory implementation should be used but Class 'org.apache.commons.logging.impl.LogFactoryImpl' cannot be converted to 'dj.i'. Please check the custom implementation. Help can be found @http://commons.apache.org/logging/troubleshooting.html.)
at dj.d.run(Unknown Source:400)
at java.security.AccessController.doPrivileged(AccessController.java:43)
at dj.i.j(Unknown Source:5)
at dj.i.c(Unknown Source:838)
at dj.i.e(Unknown Source:0)
at e7.g0.(Unknown Source:2)
at c1.a.a(Unknown Source:9) 
at oe.f.a(Unknown Source:2) 
at oe.n.a(Unknown Source:60) 
at l6.v2.l(Unknown Source:60) 
at ze.a.t(Unknown Source:8) 
at xh.i0.run(Unknown Source:100) 
at kotlinx.coroutines.internal.f.run(Unknown Source:11) 
at kotlinx.coroutines.scheduling.i.run(Unknown Source:2) 
at kotlinx.coroutines.scheduling.a$a.run(Unknown Source:78) 
Caused by: java.lang.ClassCastException: The application has specified that a custom LogFactory implementation should be used but Class 'org.apache.commons.logging.impl.LogFactoryImpl' cannot be converted to 'dj.i'. Please check the custom implementation. Help can be found @http://commons.apache.org/logging/troubleshooting.html.
at dj.d.run(Unknown Source:242)
at java.security.AccessController.doPrivileged(AccessController.java:43) 
at dj.i.j(Unknown Source:5) 
at dj.i.c(Unknown Source:838) 
at dj.i.e(Unknown Source:0) 
at e7.g0.(Unknown Source:2) 
at c1.a.a(Unknown Source:9) 
at oe.f.a(Unknown Source:2) 
at oe.n.a(Unknown Source:60) 
at l6.v2.l(Unknown Source:60) 
at ze.a.t(Unknown Source:8) 
at xh.i0.run(Unknown Source:100) 
at kotlinx.coroutines.internal.f.run(Unknown Source:11) 
at kotlinx.coroutines.scheduling.i.run(Unknown Source:2) 
at kotlinx.coroutines.scheduling.a$a.run(Unknown Source:78) 

@christian-draeger
Copy link
Collaborator

christian-draeger commented Mar 2, 2023

Hey, not sure if that is a skrapeit bug or if we can avoid an error like this coming up while using skrapeit in release mode.
But if you are able to find a way I would be interested to have the fox included as part of the library or at least adding a solution to the android example / readme

Do you think this is related to #212 And #205?

Both stack traces also complaining about apache commons stuff

@CMFerrer
Copy link
Author

CMFerrer commented Mar 4, 2023

#205 works for me, i put these lines on proguard file

-keep class com.gargoylesoftware.** { *; }
-keep class javax.xml.** { *; }
-keep class net.sourceforge.htmlunit.** { *; }
-keep class netscape.** { *; }
-keep class org.apache.** { *; }
-keep class org.htmlunit.org.apache.** { *; }
-keep class org.w3c.dom.** { *; }
-keep class org.xml.sax.** { *; }

@xVemu
Copy link

xVemu commented Dec 23, 2023

Hey, not sure if that is a skrapeit bug or if we can avoid an error like this coming up while using skrapeit in release mode. But if you are able to find a way I would be interested to have the fox included as part of the library or at least adding a solution to the android example / readme

I think you can create a proguard file in library with lines listed by CMFerrer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants