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
"failed to access class androidx.lifecycle.LiveData$ObserverWrapper" error in 1.12.1 when stubbing LiveData in test with AndroidJUnit4 runner #754
Comments
Any updates on this, anyone? |
This still happens in 1.12.2 |
Also running into the same issue on 1.12.1 and 1.12.2 |
This issue resurface, and Robolectric has some findings, robolectric/robolectric#5871 |
Unfortunately they are saying the Mockk will probably need to fix it... we are tossing the hot potatoe again. |
I did a git bisect and this is the commit that introduced the regression: 62d5c79 |
Yeap, exactly the commit I found when |
Thanks for bisecting and investigating this. Since the commit you mention was introduced to fix #280 and the comments in that issue mention a workaround, I may consider reverting it. I'd be more than happy to review a PR with it, actually. |
I put up #782 which fixes it from the Robolectric side. |
Awesome, thanks a lot! |
This fixes an issue using MockK on classes defined in a Robolectric class loader. Fixes mockk#754 Partially fixes robolectric/robolectric#5871
@Raibaz I would be interested in capturing this issue, and perhaps a couple of other basic Robolectric + MockK integrations, in a test case. Would a new directory such as |
Sure, that'd be perfect, and thanks a lot for doing this! |
@Raibaz is there a timeline for a release with this fix? |
@Raibaz When this fix will be released? We cannot downgrade MockK to 1.12.0 due to some other bug that was fixed in 1.12.1 😢 |
I'm planning on putting a release out sometime next week, sorry but this week's a pretty busy one :( |
@Raibaz bump 🙂 |
Sorry about this, v1.12.3 just came out :) |
After upgrading from 1.12.0 to 1.12.1 the following sample test fails:
I managed to
git bisect
the problem and the first bad commit was 62d5c79.Error output
The text was updated successfully, but these errors were encountered: