Status Update
Comments
da...@gmail.com <da...@gmail.com> #2
Full stacktrace from my logcat reproducing the issue
2021-08-13 11:46:20.622 4368-4368/com.adevinta.myapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.adevinta.ourApp, PID: 4368
java.lang.RuntimeException: Unable to instantiate application com.adevinta.myapp.MyApplication: java.lang.ClassNotFoundException: Didn't find class "com.adevinta.myapp.MyApplication" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.adevinta.myapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.adevinta.myapp-1/lib/x86, /data/app/com.adevinta.myapp-1/base.apk!/lib/x86, /vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:578)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.adevinta.myapp.MyApplication" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.adevinta.myapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.adevinta.myapp-1/lib/x86, /data/app/com.adevinta.myapp-1/base.apk!/lib/x86, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newApplication(Instrumentation.java:981)
at android.app.LoadedApk.makeApplication(LoadedApk.java:573)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Suppressed: java.lang.ClassNotFoundException: com.adevinta.myapp.MyApplication
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 12 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
id...@google.com <id...@google.com> #3
AGP 7.0.0
R8
failing: 3.0.43 to 3.0.65 (both included)
works fine: <= 3.0.42 and >= 3.1
id...@google.com <id...@google.com> #4
Thank you for the report and the analysis of the R8 version introducing the issue. Would it be possible for you to share the APK of both a working and a broked version of your app.?E.g. one built with 3.0.43 and one built with 3.0.42? You can share them privately with
da...@gmail.com <da...@gmail.com> #5
After further testing we've found that the build with 3.0.42 is also failing, at this point I'm not sure if it's something random or an error while building the test apks...
The 3.1.X build is working fine though... I'll send you the apks failing and the one working
id...@google.com <id...@google.com> #6
Thank you for sending the apks. This issue is indeed strange. The missing class is defined in classes13.dex and I've double checked and it is also in the /data/app/<name-here>-1/base.apk
. Can I ask you to try out the following just to see if anything helps:
- If you have anything like INSTANT_RUN enabled, disable it.
- Does the apk without the test work?
- Can you easily see what happens if you disable firebase, we have seen errors with that before since it is not case sensitive.
da...@gmail.com <da...@gmail.com> #7
- I'm running
gradle installRelease
to build and install the apk, AFAIK nothing related to instant run is enabled (any concrete setting that I should try??) - I'm not sure what do you mean with this, If I don't override the R8 version the apk crashes..
- We use Firebase Performance and Firebase Crashlytics, We've tried a build without Firebase Performance with no luck, I'll try also without Firebase Crashlytics and report the results.
da...@gmail.com <da...@gmail.com> #8
Found the error I had to use a newer device for the error to be reported:
08-17 10:37:53.488 1091 1091 W m.muba.anuncio: Zip open failed: Failure to verify dex file '/data/app/com.muba.anuncios-zqK-p_wxoHYFSUnuQrdkUw==/base.apk!classes7.dex': Out-of-order type_ids: 32ef then 32ef
I may need more information when I find the types that are duplicated if I am unable to find the root cause.
id...@google.com <id...@google.com> #9
What would you need from us to further help debugging the issue?
da...@gmail.com <da...@gmail.com> #10
The offending class is Lcom/appsflyer/internal/c;
which is added twice to the type-id-pool. Can you look and see in the mapping file for each of the apks if there are two mappings to the same?
Also, it is quite difficult to figure out why this error appear and exactly where the error is. Would it be possible to share a dump with us, then I can figure out the error locally without any more involvement. You can read about how a dump is created here:
Note that we get the compiled sources by javac/kotlin but we can run the compiler on it locally to figure out the exact problem.
If not we will have to iterate where I will put in extra debugging info into a custom built R8 version. If that is the case it would be a great help if:
- If you first try and run with
-dontobfuscate
and see if the error still exist - If I knew the original name (or names if there are two mappings) (you can send the name privately)
id...@google.com <id...@google.com> #11
For some reason it isn't generating the dump file using the R8 version that is failing... I have been able to generate the dump using com.android.tools:r8:3.1.15-dev
without any issues.
I've looked for the offending class in the mappings (generated with the production r8 version and dev version is the same output)
com.appsflyer.internal.c$2 -> com.appsflyer.internal.c$2:
# {"id":"sourceFile","fileName":""}
1:1:void <init>():22:22 -> <init>
2:23:void <init>():24:45 -> <init>
com.appsflyer.internal.c$b -> com.appsflyer.internal.c$b:
# {"id":"sourceFile","fileName":""}
1:1:void <clinit>():319:319 -> <clinit>
2:2:void <clinit>():318:318 -> <clinit>
1:2:void <init>(java.lang.String,int,java.lang.String):323:324 -> <init>
1:1:com.appsflyer.internal.c$b valueOf(java.lang.String):318:318 -> valueOf
1:1:com.appsflyer.internal.c$b[] values():318:318 -> values
com.appsflyer.internal.c$d -> com.appsflyer.internal.c$d:
# {"id":"sourceFile","fileName":""}
1:1:void <clinit>():302:302 -> <clinit>
2:2:void <clinit>():301:301 -> <clinit>
1:2:void <init>(java.lang.String,int,java.lang.String):306:307 -> <init>
1:1:com.appsflyer.internal.c$d valueOf(java.lang.String):301:301 -> valueOf
1:1:com.appsflyer.internal.c$d[] values():301:301 -> values
com.appsflyer.internal.c$e -> com.appsflyer.internal.c$e:
# {"id":"sourceFile","fileName":""}
1:1:void <clinit>():285:285 -> <clinit>
2:2:void <clinit>():284:284 -> <clinit>
1:2:void <init>(java.lang.String,int,java.lang.String):289:290 -> <init>
1:1:com.appsflyer.internal.c$e valueOf(java.lang.String):284:284 -> valueOf
1:1:com.appsflyer.internal.c$e[] values():284:284 -> values
We can try the custom R8 build if you want
la...@ll-photosoft.com <la...@ll-photosoft.com> #12
Seems like com.appsflyer is already minified.
The dump is the same except some configuration for each version so I would be very interested in the dump generated by version 3.1.15-dev :) you can send it to
Description
I've created the following trigger from a Gmail add-on but in some accounts where the add-on is installed the trigger is automatically disabled "for an unknown reason" the first time it runs the function (
setTimeTrigger
). In some other accounts the trigger just work fine (see attached screenshots).