Skip to content
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

Crash observed when using "rn drawer-layout". #4253

Closed
1 of 2 tasks
ldalzottomp opened this issue Oct 27, 2023 · 14 comments · Fixed by #4261
Closed
1 of 2 tasks

Crash observed when using "rn drawer-layout". #4253

ldalzottomp opened this issue Oct 27, 2023 · 14 comments · Fixed by #4261

Comments

@ldalzottomp
Copy link

ldalzottomp commented Oct 27, 2023

What happened?

Hello!

I have a simple app that uses the "react-native-drawer-layout" package.
If I run a detox test that constantly open and close the slider, then at some point, the app will crash.
No crash observed during normal use of the app. Only when using detox :

output.mp4
The app has crashed, see the details below:

Exception was thrown: 
NSInternalInconsistencyException
Mouting block was set but never executed. This may lead to UI inconsistencies
(
    0   CoreFoundation                      0x000000018040e7bc __exceptionPreprocess + 160
    1   libobjc.A.dylib                     0x0000000180051144 objc_exception_throw + 56
    2   Foundation                          0x0000000180b13ccc -[NSMutableDictionary(NSMutableDictionary) classForCoder] + 0
    3   AwesomeProject                      0x0000000104cb802c -[REASyncUpdateObserver dealloc] + 224
    4   AwesomeProject                      0x0000000104cb96bc -[REANodesManager performOperations] + 560
    5   AwesomeProject                      0x0000000104cb93a4 -[REANodesManager onAnimationFrame:] + 464
    6   DetoxSync                           0x0000000107dc31e8 -[NSObject(REANodesManagerDTXSpy) __detox_sync_onAnimationFrame:] + 68
    7   QuartzCore                          0x0000000187dd04f8 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 808
    8   QuartzCore                          0x0000000187ec89a8 display_timer_callback(__CFMachPort*, void*, long, void*) + 336
    9   CoreFoundation                      0x000000018033ee94 __CFMachPortPerform + 172
    10  CoreFoundation                      0x000000018037387c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
    11  CoreFoundation                      0x0000000180372e9c __CFRunLoopDoSource1 + 496
    12  CoreFoundation                      0x000000018036d43c __CFRunLoopRun + 2176
    13  CoreFoundation                      0x000000018036c7a4 CFRunLoopRunSpecific + 584
    14  GraphicsServices                    0x0000000188ff7c98 GSEventRunModal + 160
    15  UIKitCore                           0x00000001133e637c -[UIApplication _run] + 868
    16  DetoxSync                           0x0000000107dca8fc __detox_sync_UIApplication_run + 376
    17  UIKitCore                           0x00000001133ea374 UIApplicationMain + 124
    18  AwesomeProject                      0x00000001049971b0 main + 100
    19  dyld                                0x000000010745dfa0 start_sim + 20
    20  ???                                 0x0000000107519f28 0x0 + 4417756968
    21  ???                                 0x2536800000000000 0x0 + 2681471365634064384
)

Thanks for the help!

What was the expected behaviour?

The app is not crashing.

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

The github repo of the sample app is available here : (github repo here). You can run yarn detox-issue and it should do the job.

It's a simple copy and paste of the library sample code (available here). With added test id for a button that opens the drawer and closes the drawer.

The source code on my repo to the app is here (App.tsx).
The source code on my repo of the detox test is here starter.test.js.

In what environment did this happen?

Detox version: 20.13.2
React Native version: 0.72.6
Has Fabric (React Native's new rendering system) enabled: (yes/no) yes
Node version: 20.7.0
Device model: iPad Pro (12.9-inch)
iOS version: iOS 16.2
macOS version: 13.5.2 (22G91)
Xcode version: Version 15.0 (15A240d)
Test-runner (select one): jest

Detox logs

Detox logs
[detox.logs.txt](https://github.com/wix/Detox/files/13190247/detox.logs.txt)

Device logs

Device logs
[devices.logs.txt](https://github.com/wix/Detox/files/13190250/devices.logs.txt)


More data, please!

No response

@noomorph
Copy link
Collaborator

Thanks for the repro. I have basically zero idea when it will be looked at, but hey @asafkorem , this one should be quick to debug. Maybe you can fit that into your schedule someday?

@ldalzottomp
Copy link
Author

@noomorph Thanks! Looking forward to have more info on this :D

@noomorph
Copy link
Collaborator

Maybe it will be handled in a month, I don't know how long to wait, sorry.

@noomorph
Copy link
Collaborator

@noomorph
Copy link
Collaborator

@ldalzottomp , looking at this PR: https://github.com/software-mansion/react-native-reanimated/pull/5224/files

I started wondering if maybe you could downgrade your reanimated lib and check if this fixes your issue or not.

@ldalzottomp
Copy link
Author

ldalzottomp commented Oct 30, 2023

@noomorph I have downgraded to reanimated v 3.0.0 in my repro project. The issue still persists.

I just want to clarify :

  • This seems to happens only when using detox. If I launch a detox test that indefinietly wait, and manually play with the slider with my mouse, it crashes. Without detox, no crash.
  • In my repro, I have added some timeouts between taps and the issue is still there.
  • The crash is happening on an assert in the obj-c code of reanimated indeed. One super hack that I can provide for my company is to remove the code of this assert when running detox test. But it may hide a deeper issue on detox side I suppose.

@noomorph
Copy link
Collaborator

@asafkorem any chance you could glance at it, please?

@asafkorem asafkorem self-assigned this Oct 31, 2023
@noomorph
Copy link
Collaborator

@ldalzottomp, Asaf's having difficulties with the repro repository because of unexpected crashes, but he's looking into it.

@asafkorem
Copy link
Contributor

I can confirm that I'm able to reproduce this locally. Trying to resolve 👀

@ldalzottomp
Copy link
Author

Thanks for your time guys!

@asafkorem
Copy link
Contributor

@ldalzottomp, I was able to identify the cause of this crash, which indeed originates from Detox. We plan to release a patch version in the coming hours. Additionally, I have a pre-release version (20.13.5-smoke.0) available if you wish to test it locally. I have tested this version against your reproduction and it passed successfully.

@noomorph
Copy link
Collaborator

@ldalzottomp yeah, could you please confirm that 20.13.5-smoke.0 resolves your original issue?

@asafkorem
Copy link
Contributor

@ldalzottomp we released an official patch version 20.13.5, please confirm it works for you (and close this issue 🙂)

@ldalzottomp
Copy link
Author

@asafkorem @noomorph
I can confirm that the team no longer observes crashes when testing around the drawer.
Thanks for your help, guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants