kiwix-android
kiwix-android copied to clipboard
UI fails to AutoConnect in the CI
Using 1.4.0 libraries and In espresso 3.4.0, I occasionally run into the following RuntimeException with a simple call to getInstance(InstrumentationRegistry.getInstrumentation())
org.kiwix.kiwixmobile.intro.IntroFragmentTest > viewIsSwipeableAndNavigatesToMain[test(AVD) - 5.0.2] FAILED java.lang.RuntimeException: Error while connecting UiAutomation at android.app.UiAutomation.connect(UiAutomation.java:210)
No tests particularly at this point. It fails sometimes on CI emulation at the start in both API 21 & API 30. More Context: https://issuetracker.google.com/issues/233914320
@gouri-panda What is "1.4.0 libraries", which library you talk about exactly?
@kelson42 Sorry! That was a typo, I think! I have updated the description.
@kelson42 @MohitMaliFtechiz In the meanwhile we should try not use this method getInstance(InstrumentationRegistry.getInstrumentation())
.That's the only solution i can think of it now.
@gouri-panda What is the purpose of this function? Could we avoid to use it at all?
@kelson42 It gets the UiDevice
instance by InstrumentationRegistry
.
Could we avoid to use it at all?
We should try an alternative way to find the UIDevice
instance for the moment.
@kelson42 @MohitMaliFtechiz I'm closing this issue unless we see this problem in our existing code.
@gouri-panda problems should be trackef somrwhere in the repo.... even if root cause os outside
@gouri-panda I think to better understand this ticket, we shoudl update it with information allowing to answer the following questions:
- Which test fails exactly? Is that always the same?
- Does it always fail at the same place?
- How often does it fails?
- Does it fail only with emulator? Only with emulator in Github?
- Does it fail always with the same API level (seems to always be a problem with API 21)?
- Since when do we have the problem? What what the trigger?
@gouri-panda Any update/answer in view?
@kelson42 Not yet
Which test fails exactly? Is that always the same?
There are no tests in particular. It doesn't fail in same test case.
Does it always fail at the same place?How often does it fails?
Some times
Does it fail only with emulator? Only with emulator in Github?
Only with the emulator in Github
Does it fail always with the same API level (seems to always be a problem with API 21)?
No
Since when do we have the problem? What what the trigger?
I don't know when it was started
@MohitMaliFtechiz Would be great of you could fix this CI instability
hi @kelson42 , This should be automatically fixed in https://github.com/kiwix/kiwix-android/pull/3203.