-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Crash after upgrade from 1.3.0 to 1.3.1 #1557
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
Comments
In 1.3.1 there were changes neither in |
We are still using just Proguard, so we are not using R8. And it was on debug build, so without Proguard. Sadly the library which I'm able to reproduce it is not publicly available. I hoped that it will be a more general problem or caused that library and project itself using different Gradle version and service loader using metadata generated by Gradle. I will try to wait until this library will also update to the 1.3.1 and latest Gradle tools |
That's really weird. Probably, we should give up on using ServiceLoader at all. Could you please check if |
I started getting this as well - updated to 1.3.1 from 1.3.0. Running After removing the other lib, still had same error as OP, did a full rebuild, and problem went away - no idea if it was due to "common" being pulled in causing the build to fail and get into a broken state, or if it was just updating from 1.3.0 to 1.3.1 - so YMMV. |
Having the same problem here after upgrading to 1.3.1. The error seems to happen randomly, not every time. Downgrading to 1.3.0 fixes it. R8 config was not changed between these two versions. Update: Also happening for debug builds without R8! |
Thanks for the information! |
I tried to reproduce this with a minimal sample project but was not yet successful :/ The original project is quite complex, so I'm not sure which part may be the source of the problem here. Some used versions: Gradle: 5.6.2 |
So it is probably not related to library. I asked the author of the library to update and now the library itself using 1.3.1 and is build by the latest Gradle and it sill happen. Then I tried to run the same code
And it happens also on my project, but only with 1.3.1, 1.3.0 is completely fine. I also tried to put Class.forName("kotlinx.coroutines.android.AndroidDispatcherFactory") to my app and nothing happen I mean no exception. So the class itself exists. |
I have some additional information: I was in the middle of development, regularly deploying builds onto my device when suddenly the error occurred again with coroutines 1.3.0! In contrast to my previous statement I was using build tools version 28.0.3. I did not specify a concrete build tools version in my build config. I'm on Android SDK 29 and assumed that an appropriate build tools version (29.x) is used automatically. I now explicitly specified build tools 29.0.2 and the next build was working again. But since this issue is very random, this might not be the solution at all. |
This is probably related to "Apply changes" bug in Android: #1072 (comment) & https://issuetracker.google.com/issues/130141145 Meanwhile, I'll start prototyping solution based on |
I'm not really convinced this is related to "Apply Changes" since customers are reporting this error. They use the release version which is build on a CI server, obviously without "Apply Changes". |
Can confirm, facing this issue on debug builds. Tested on Emulator as well as a real device. |
@haroldadmin could you please provide a reproducing project for the problem? |
@qwwdfsad I am unable to reproduce the crash consistently. I haven't been able to reproduce it at all on a new project, and on my existing project it does not seem to crash after a clean build ¯\(ツ)/¯ If it's any use, here's the existing project |
I just tested 1.3.1 and it works on the same project. |
But why it was working correctly until 1.3.1? |
FWIW, my team was also running into this crash when we upgraded from |
We're able to consistently reproduce this error on a Nokia 7.1 with Android 9 (build 00WW_2_59E) even with Coroutines 1.3.0. |
Update v1.3.3 solved the issue for me. |
Still not working with v1.3.3 |
Could you please provide a reproducing project? |
We are also running into this issue from time to time (Coroutines 1.3.2, Gradle 5.1.1). I inspected the crashing apk and compared it to a working one. The crashing app is missing multiple entries in
What I tried so far:
I have the feeling that the combination of |
Just an additional hint if anyone tries the solutions from above and they didn't work. For me,
My setup is |
Since I updated to coroutines 1.3.1 on Android projects it started to crash on all existing 3rd libraries that using coroutines too.
It is just minor bugfix version I would not expect backward incompatibility on such release.
But there is this small unimportant note:
Can this be a reason?
My project is using Gradle 5.6.2, but the library is using an older version than 5.3
I have both dependencies
The text was updated successfully, but these errors were encountered: