-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
Tests works in the local but throws NoActivityResumedException in the action #191
Comments
Does it happen locally? This sometimes also happens due to flakiness of certain tests but without seeing your code it's hard to know. |
It runs on the local. It is strange that only fails at one fragment test. Trying to figure out the reason. A bit more info in here:
And the line 131 is: |
Hi again, It is my bad. The problem was a permission request that shouldn't be asked there. Therefore, the test case stalls and throws this exception. However, it works locally due to permissions were already given. Sorry for the false flag. |
Hi @ycagri where permission should not be asked and what is correct place to ask it can you please elaborate. Question: That time permission were added locally and did you missed those permission on Github repository? which caused to test run locally but not at the Github CI. |
This is a pretty old topic but the case was sth like this. There was a permission request which is asked on start up. In the local device, permissions were already given before running the tests. However, in the GitHub Actions a fresh device is created and the permission request screen was causing the issue. The activity shows the permission request dialog, since no action was taken test throws the |
Some tests throw NoActivityResumedException. Longer description is here:
androidx.test.espresso.NoActivityResumedException: No activities in stage RESUMED. Did you forget to launch the activity. (test.getActivity() or similar)?
This generally happens when the device is in lock mode. I use
launchFragmentInContainer
to test my fragments.The text was updated successfully, but these errors were encountered: