-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
GitHub "Android CI" is unreliable. #5245
Comments
There is closed issue #4958 that mentions very similar problem - it seems seems the attempted workaround employed there was to not run tests in some cases. |
Could you elaborate about this one? Is there any chnge that might affect the CI run? 🤔 |
No, there shouldn't be any change that would affect those failures. In detail:
|
The CI fails only on our forked repo not on the main repo. So, I don't think this is an issue at all. |
Why wouldn't that be an issue?! There is only one original repo, and more then 1200 forked ones. Certainly that is all the more reasons to fix it, then if that was just one broken repo and 1200 working ones 🥲 It still fails for me: https://github.com/mnalis/apps-android-commons/actions/runs/7646438188/job/20835243644 Perhaps those |
Well, I have faced this error before and just now. See here I thought that it was happening because my repo was forked from the main and my workflow file was not configured to run on my repo. And if I am wrong then the issue needs to be fixed. Sorry, I misunderstood the issue. |
The workflow file should be generic of the repo, Rohit. The workflow file doesn't need any tweaks when a repo has been forked, ideally. The CI is actually failing our repo itself [ ref ]. We indeed need to check the same and fix it. |
Yes, you are right. The problem is with the instrumentation tests. I am investigating why is this failling. |
Do coverage checks run successfully on aonyone's environment? |
I want to run some tests but this code:- Throwing the exception:- Can anyone help me with the configuration of the username? |
I suppose not. I think issue mentioned in #5061 still exists.
Could you let us know how you ran the test? |
Hi @rohit9625, please add these properties to your
Also, please avoid doing a Hope this helps! :) |
Thank you @RitikaPahwa4444 |
New day, new errors 😅 Today I tried building with the command
FAILURE: Build completed with 4 failures..ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) 1: Task failed with an exception.
2: Task failed with an exception.
3: Task failed with an exception.
4: Task failed with an exception.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/8.1.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD FAILED in 37s Does Someone have any idea about this? |
Summary
"Android CI" github workflow fails in majority of cases (11 out of 12 cases for me) with errors like
java.lang.IllegalStateException: init() must be called prior to using this method.
eg run 9 or run 10 or run 11 until it finally succeeds (without any code changes!) in run 12.(I've even added
[workflow_dispatch]
trigger so it can be triggered manually without any repo changes)Note that is in latest master (based upon f4e8de7) after fixes in Reduce minsdk back 21 #5236, and Fix failing FilePicker unit test #5237 and that the repository content is the same in cases when it works, and in cases when it fails.
some earlier runs like run 3 seem to fail with slightly different error
androidx.test.espresso.base.RootViewPicker$RootViewWithoutFocusException: Waited for the root of the view hierarchy to have window focus and not request layout for 10 seconds. If you specified a non default root matcher, it may be picking a root that never takes focus.
, but those did not have nearby: make sure places is initialized #5241 included yet.It seems to be a race condition triggered depending on the GitHub servers load or something. The solution would probably be trying to idle for some time while re-checking if the testing environment has become usable, before proceeding with the tests.
Steps to reproduce
Expected behaviour
"Android CI" github workflow should succeed reliably and reproducibly (assuming there are no bugs in the code, of course!). In any case, its behaviour should be deterministic - for same codebase, it should either always succeed or always fail.
Actual behaviour
"Android CI" github workflow fails with many failed test:
or sometimes
Device name
No response
Android version
n/a
Commons app version
n/a
Device logs
No response
Screen-shots
No response
Would you like to work on the issue?
None
The text was updated successfully, but these errors were encountered: