Open AliSoftware opened 2 years ago
I investigated this issue. I probably ran the test more than 100 times, but I could get the exception once. Test rules order looks correct.
From the logs, I see that the issue is that the application is being created before HiltAndroidRule
. I can't see why this exception is thrown only on JPScreenshotTest
, it could be thrown on other classes too.
This is a very flaky test. @AliSoftware, if you see the same exception on other classes, please note here. It would be a great clue for the solution.
Parent: #17128
On some occasions, I get a Hilt crash when running the
JPScreenshotTest
Reproducibility
This crash does not happen consistently (flaky), but still happens more often than not.
I haven't noticed this crash on the
WPScreenshotTest
yet; either I was very lucky, or there's something that makes it work inWPScreenshotTest
but not inJPScreenshotTest
that could give a hint at how to fix this?Stacktrace
Example when running
bundle exec fastlane screenshots app:jetpack locale:fr-FR
(though I've seen it happen when running the test directly from Android Studio too)