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

tests crash when updated from v17 to v19. Signal 11 was raised #3123

Closed
fatlinesofcode opened this issue Dec 1, 2021 · 20 comments · Fixed by #3135
Closed

tests crash when updated from v17 to v19. Signal 11 was raised #3123

fatlinesofcode opened this issue Dec 1, 2021 · 20 comments · Fixed by #3135

Comments

@fatlinesofcode
Copy link

fatlinesofcode commented Dec 1, 2021

Description

updated project to xcode 13.1, updated detox to v19. tests crash on startup frequently.
always crashes with maxWorkers set to 2, sometimes passes with maxWorkers 1. We are using react-native-firebase too

  • [x ] I have tested this issue on the latest Detox release and it still reproduces

Screenshots / Video

 FAIL  e2e/000-screens/ShopScreen.e2e.js (11.085 s)
  ShopScreen
    ✕ can tap on ShopPromo and see ShopPromotionsScreen (7425 ms)

  ● ShopScreen › can tap on ShopPromo and see ShopPromotionsScreen

    DetoxRuntimeError: The pending request #-1000 ("isReady") has been rejected due to the following error:

    The app has crashed, see the details below:

    Signal 11 was raised
    (
    	0   Detox                               0x0000000108ffa6c5 +[NSThread(DetoxUtils) dtx_demangledCallStackSymbols] + 37
    	1   Detox                               0x0000000108ffd250 __DTXHandleCrash + 464
    	2   Detox                               0x0000000108ffd991 __DTXHandleSignal + 59
    	3   libsystem_platform.dylib            0x00007fff6bfe7e2d _sigtramp + 29
    	4   ???                                 0x0000000300584d80 0x0 + 12890688896
    	5   CoreFoundation                      0x00007fff2046ccdf -[__NSDictionaryM dealloc] + 128
    	6   libobjc.A.dylib                     0x00007fff2019c9f7 objc_object::sidetable_release(bool, bool) + 177
    	7   libobjc.A.dylib                     0x00007fff20198cb3 _object_remove_assocations + 578
    	8   libobjc.A.dylib                     0x00007fff20196207 objc_destructInstance + 84
    	9   libobjc.A.dylib                     0x00007fff2019c187 -[NSObject dealloc] + 21
    	10  Xxxxx Xxxxxx                       0x0000000104bd71fa -[FBSDKGraphRequestConnection dealloc] + 106
    	11  libobjc.A.dylib                     0x00007fff2019c9f7 objc_object::sidetable_release(bool, bool) + 177
    	12  Xxxxx Xxxxxx                        0x0000000104872d1d __destroy_helper_block_e8_32s + 29
    	13  libsystem_blocks.dylib              0x00007fff2008a434 _Block_release + 130
    	14  Xxxxx Xxxxxx                       0x000000010486ed25 __destroy_helper_block_e8_32s40s48s56s + 101
    	15  libsystem_blocks.dylib              0x00007fff2008a434 _Block_release + 130
    	16  libsystem_blocks.dylib              0x00007fff2008a434 _Block_release + 130
    	17  libdispatch.dylib                   0x00007fff20111a56 _dispatch_client_callout + 8
    	18  libdispatch.dylib                   0x00007fff2011ee20 _dispatch_main_queue_callback_4CF + 1073
    	19  CoreFoundation                      0x00007fff2036985d __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    	20  CoreFoundation                      0x00007fff203640ba __CFRunLoopRun + 2772
    	21  CoreFoundation                      0x00007fff20363103 CFRunLoopRunSpecific + 567
    	22  GraphicsServices                    0x00007fff2c851cd3 GSEventRunModal + 139
    	23  UIKitCore                           0x00007fff24ffbe63 -[UIApplication _run] + 928
    	24  DetoxSync                           0x0000000109371dd2 __detox_sync_UIApplication_run + 362
    	25  UIKitCore                           0x00007fff25000a53 UIApplicationMain + 101
    	26  Xxxxx Xxxxxx                        0x00000001046d5f98 main + 104
    	27  dyld                                0x0000000108b22e1e start_sim + 10
    	28  ???                                 0x0000000114a1f4fe 0x0 + 4641125630
    	29  ???                                 0x0000000000000000 0x0 + 0
    	30  Xxxxx Xxxxxx                       0x00000001046d1000 __dso_handle + 0
    )

      12 | export const launchApp = async (launchArgs = undefined) => {
      13 |   // await device.launchApp({ newInstance: true, launchArgs: { clearAsyncStorage: true } })
    > 14 |   await device.launchApp({ newInstance: true, launchArgs : {'DTXEnableVerboseSyncSystem': 'YES', 'DTXEnableVerboseSyncResources': 'YES'} })
         |                ^
      15 |   const result = await waitForApp()
      16 |   return result
      17 | }

      at launchApp$ (helpers.js:14:16)
      at tryCatch (../node_modules/regenerator-runtime/runtime.js:63:40)
      at Generator.invoke [as _invoke] (../node_modules/regenerator-runtime/runtime.js:293:22)
      at Generator.next (../node_modules/regenerator-runtime/runtime.js:118:21)
      at tryCatch (../node_modules/regenerator-runtime/runtime.js:63:40)
      at invoke (../node_modules/regenerator-runtime/runtime.js:154:20)
      at ../node_modules/regenerator-runtime/runtime.js:189:11

Environment

  • Detox: 19
  • React Native: 0.64
  • @react-native-firebase : 11.3.2
  • Node: 12
  • Device: ios sim 12
  • Xcode: 13.1
  • iOS: 15
  • macOS: 12.0.1
  • Test-runner (select one): jest-circus

Logs

fail.log
pass.log

@fatlinesofcode fatlinesofcode changed the title intermittent crash on ios15. Signal 11 was raised test crash with detox v19. Signal 11 was raised Dec 3, 2021
@fatlinesofcode
Copy link
Author

we are also seeing this issue with xcode 12.5, with v17 the tests work fine. But after updating to v19 we get random test crashes. Is there anything further we can do to isolate the cause of the crash?

Attached is the tests logs from Bitrise.
apps_0f90e6e80d262b78_4df17cc7-8a3a-48aa-b337-60bcc2b6dba2-full.txt

@fatlinesofcode fatlinesofcode changed the title test crash with detox v19. Signal 11 was raised tests crash when updated from v17 to v19. Signal 11 was raised Dec 3, 2021
@d4vidi
Copy link
Collaborator

d4vidi commented Dec 5, 2021

@asafkorem FBSDKGraphRequestConnection dealloc seems suspicious, as it may trigger a swizzled dealloc failure flow.

@curtismgt
Copy link

@fatlinesofcode Are you using any Expo libraries? We're getting this Signal 11 error consistently with an Expo bare-workflow app after upgrading to Expo 43.

@fatlinesofcode
Copy link
Author

@fatlinesofcode Are you using any Expo libraries? We're getting this Signal 11 error consistently with an Expo bare-workflow app after upgrading to Expo 43.

yes we're using a few, we ejected originally from v37 but have since upgraded to to rn64

@christopherdro
Copy link

christopherdro commented Dec 15, 2021

@curtismgt The issue showed up for us as well after upgrading to Expo 43.

asafkorem added a commit to asafkorem/Detox that referenced this issue Dec 15, 2021
This workaround solves the issue described here:
firebase/firebase-ios-sdk#9083

And some of the crashes that was mentioned here:
- wix#3000
- wix#3123
- wix#2641
- wix#2802
@curtismgt
Copy link

I've created a companion issue in Expo Expo issue 15595. Hopefully we get some action out of these and work this out. We're blocked entirely with e2e on iOS by this and need to switch to another solution if this isn't resolved.

@christopherdro
Copy link

I'm not sure if this is directly related to Expo but these changes fix the issue for us. #3135

@asafkorem
Copy link
Contributor

Amazing news @christopherdro!
CC @d4vidi

@shamilovtim
Copy link

@curtismgt are you using Firebase? I don't think this problem is from Expo.

@curtismgt
Copy link

@shamilovtim We are not using Firebase at all. It's possible it's both with the same problem. If you create a new bare Expo app with expo init -t bare-minimum --npm --name testDetox and then install Detox and run it against iOS 14.5 or 15.0 it crashes with Signal 11. The exact steps are in the Expo issue I posted up. I wonder if Expo is also doing this swizzling thing and interfering with Detox the same way as Firebase.

@fatlinesofcode
Copy link
Author

thanks for the suggestions, we'll try and them out and let you know if it resolves our issue

asafkorem added a commit that referenced this issue Dec 20, 2021
This workaround solves the issue described here:
firebase/firebase-ios-sdk#9083

And some of the crashes that was mentioned here:
- #3000
- #3123
- #2641
- #2802
@curtismgt
Copy link

So we managed to get ours working. Keep in mind we are not using the Firebase libraries but the solution may be similar, I'm not familiar with them.

Our problem is a conflict of some kind with Detox and Expo Updates after the Expo 43 upgrade. Our solution is to disable the expo-updates native module by setting EXUpdatesEnabled to NO in Expo.plist.

@asafkorem
Copy link
Contributor

#3135 was merged, it should solve the issue of DetoxSync crashes when Firebase/Performance is integrated, it was tested on the example apps that reproduced this issue.
@fatlinesofcode CC

Once you have updated a version (to the latest/next version), if any of you are still having Signal 11 crashes on DetoxSync when Firebase/Performance is integrated, please open a new bug report with the required details.


As for the Expo issue, can you please check the next released version that will have this fix (20), and to see whether it solves your issue as well?

I hope to investigate those issue soon. For the meanwhile, in case it doesn't solve your crashes, can you please open a designated issue for this (Detox crashes on Expo apps)?

@asafkorem
Copy link
Contributor

asafkorem commented Dec 22, 2021

@curtismgt sounds like you found a workaround.

Do you think it worth noting in our docs? Maybe we should mention this on our expo doc page: https://wix.github.io/Detox/docs/guide/expo/ (feel free to open a PR if so).

@fatlinesofcode
Copy link
Author

@asafkorem we confirmed our crash issue are fixed with the detox 19.4.0 update. In the latest version however 19.4.4 the issue has reappeared.

@asafkorem
Copy link
Contributor

asafkorem commented Jan 18, 2022

@asafkorem we confirmed our crash issue are fixed with the detox 19.4.0 update. In the latest version however 19.4.4 the issue has reappeared.

@fatlinesofcode

See my comment here: #3167 (comment).

Are you using firebase in your project? If so, you need to upgrade your GoogleUtilities to v7.7 for this fix to work.

@asafkorem
Copy link
Contributor

@fatlinesofcode
Can you also try to execute the detox test command with SIMCTL_CHILD_NSZombieEnabled=1 ?

@shamilovtim
Copy link

I can confirm that we still have Signal 11 after updating both Firebase and Detox

@asafkorem
Copy link
Contributor

@shamilovtim thanks for the report,
Can you please open a new issue for that and provide the required information for investigating it?

@shamilovtim
Copy link

@asafkorem Yeah I'll definitely give my best shot after I've done more triage

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.

6 participants