Open MuntashirAkon opened 1 year ago
It seems Robolectric is failing because it's classes are repacked by this plugin. If there is a way to bypass this, it should run just fine.
@MuntashirAkon What about trying 4.3.0, looks like it introduces a new change to restrict instrumentation scope when applying it as a library: https://github.com/RikkaApps/HiddenApiRefinePlugin/commit/484a2856024d0fec24fe1c8f153857b712d9ab7f. cc @Kyle-Falconer.
Already tested, and it was not working. Transformation were still happening:
...
> Task :app:generateDebugUnitTestConfig
> Task :app:transformDebugClassesWithAsm
> Task :app:bundleDebugClassesToRuntimeJar
> Task :app:transformDebugUnitTestClassesWithAsm
> Task :app:testDebugUnitTest
...
The last working version is still v4.0.0.
@MuntashirAkon What about disabling conscrypt mode with Config? See https://github.com/robolectric/robolectric/issues/8165. Also trying to removing conscrypt from explicit dependencies.
Yes, I tried disabling conscrypt. See my comment in the other issue.
After updating to 4.1.0, all the Roboletric tests are failing with the following error:
SHA-256 digest error for org/conscrypt/OpenSSLProvider.class java.lang.SecurityException: SHA-256 digest error for org/conscrypt/OpenSSLProvider.class at java.base/sun.security.util.ManifestEntryVerifier.verify(ManifestEntryVerifier.java:223) at java.base/java.util.jar.JarVerifier.processEntry(JarVerifier.java:243) at java.base/java.util.jar.JarVerifier.update(JarVerifier.java:230) at java.base/java.util.jar.JarVerifier$VerifierStream.read(JarVerifier.java:475) at java.base/jdk.internal.loader.Resource.getBytes(Resource.java:126) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:818) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at org.robolectric.internal.bytecode.SandboxClassLoader.loadClass(SandboxClassLoader.java:135) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at java.base/java.lang.Class.getDeclaredConstructors0(Native Method) at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3215) at java.base/java.lang.Class.getConstructors(Class.java:1957) at org.robolectric.util.inject.Injector.findConstructor(Injector.java:262) at org.robolectric.util.inject.Injector.inject(Injector.java:243) at org.robolectric.util.inject.Injector.lambda$new$0(Injector.java:126) at org.robolectric.util.inject.Injector$MemoizingProvider.get(Injector.java:498) at org.robolectric.util.inject.Injector.getInstanceInternal(Injector.java:224) at org.robolectric.util.inject.Injector.getInstance(Injector.java:208) at org.robolectric.util.inject.Injector.getInstance(Injector.java:202) at org.robolectric.internal.AndroidSandbox.lambda$new$0(AndroidSandbox.java:60) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832)
Related issue: #5
I can confirm this is an issue. Version 4.4.0 does not work with robolectric: digest error at OpenSSLProvider. I downgraded to 4.0.0.
I am a new user of your tool. Thank you for the amazing work you did! Well done and valuable!
After updating to 4.1.0, all the Roboletric tests are failing with the following error:
Related issue: #5