-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Running test crashes app in simulator #709
Comments
I encountered a similar issue (reloadReactNative followed by tap() would cause tests to time out), and this fixed it for me. |
This doesn’t seem like a Detox issue. |
We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the |
@LeoNatan could you clarify please? Running the detox tests with an expectation of a visible element causes the app to crash with the exception shown in the issue. This is not a crash that occurs when running the application or when expecting on a different element. So to me it doesn't seem like it's an issue with the app itself. So it points to either detox or Earl Grey? |
The crash comes from React Native.
This comes from https://github.com/facebook/react-native/blob/be379efc9b677eac039a3d241d03aa4bb10d6a64/React/Views/ScrollView/RCTScrollView.m#L515 So it looks to me like incorrect view management on the app part or RN. As far as I know, Earl Grey does not add subviews. If I’m mistaken, we can always reopen the issues. |
Could I ask you to make the simplest project where this reproduces? |
@LeoNatan done - https://github.com/ximenean/exactlyOneSubviewCrash If I swap out the I don't expect you to look at it any further but this is hopefully useful for you to be aware of. |
The will look at it to see what’s going on. |
I'm having the same issue. This ticket provides a clue:
I think the magic happens here: https://github.com/google/EarlGrey/blob/24044cf14426e6536ceeec36a6e76076881b4250/EarlGrey/Common/GREYVisibilityChecker.m#L623-L627 |
I've been struggling to test a particular screen in my application and it's currently causing the test to crash the app in the simulator which results in the test suite hanging.
Here is the test that fails
The Element with the testID "ClientSummary" is a scrollview that renders underneath a modal view that displays when the screen loads initially.
If I don't disable synchronization the test times out though I can verify the element with the "ClientSummary" testID is present in the screen debugger in XCode.
Also, if instead of waiting for "ClientSummary" to be visible, I wait for "Step 4-nextStep"
toBeNotVisible
it will not crash but will time out.Here is the log file:
Here is the last part of the verbose Detox logs:
The text was updated successfully, but these errors were encountered: