The app has crashed Signal 11 was raised

Description of the issue

I am trying to use bitrise to do mobile automation testing using detox. App crashing to load, however in local detox build it all works. I have attached the simulator log in which it states many issues, but basically internet connection not available error. Please help.

Environment:

Where did the issue happen?

I am using osx-xcode-13.0.x. Please see the bitrise yaml


f> ormat_version: ‘11’

default_step_lib_source: GitHub - bitrise-io/bitrise-steplib: New Bitrise StepLib
project_type: react-native
trigger_map:

  • push_branch: MBI-7610-IOS
    workflow: detox_tests
    workflows:
    detox_tests:
    steps:
    • activate-ssh-key@4: {}
    • git-clone@6: {}
    • yarn@0: {}
    • npm@1:
      inputs:
      • command: install -g detox-cli
    • script:
      inputs:
      • content: |-
        #!/bin/bash

        brew tap wix/brew
        brew install applesimutils
        title: Install Detox Utils

    • script:
      inputs:
      • content: detox build --configuration ios
        title: Detox - Build Detox
    • script:
      inputs:
      • content: detox test --configuration ios --record-videos all --take-screenshots
        all jest --config e2e/config.json --testNamePattern ‘^((?!:ios:).)*$’
        e2e --record-logs all --cleanup
        title: Detox - Run E2E Tests
    • script@1:
      inputs:
      • content: |-
        #!/usr/bin/env bash

        fail if any commands fails

        set -e

        debug log

        set -x

        cp -R artifacts $BITRISE_DEPLOY_DIR
        title: Publish Test Artifacts
        is_always_run: true

    • deploy-to-bitrise-io@2:
      inputs:
      • notify_user_groups: none
        meta:
        bitrise.io:
        stack: osx-xcode-13.0.x
        app:
        envs:
    • opts:
      is_expand: false
      WORKDIR: “.”
    • opts:
      is_expand: false
      PROJECT_LOCATION: android
    • opts:
      is_expand: false
      MODULE: superappApp
    • opts:
      is_expand: false
      VARIANT: Debug
    • opts:
      is_expand: false
      BITRISE_PROJECT_PATH: ios/superappBuddy.xcworkspace
    • opts:
      is_expand: false
      BITRISE_SCHEME: superappBuddy-Alpha
    • opts:
      is_expand: false
      BITRISE_DISTRIBUTION_METHOD: development

Which build Step causes the issue and which version of the step?

detox test --configuration ios --record-videos all --take-screenshots
all jest --config e2e/config.json --testNamePattern ‘^((?!:ios:).)*$’
e2e --record-logs all --cleanup

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO I am not using cache at this moment
  • Does the issue happen sporadically, or every time? : Everytime
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Newly trying detox ios automation testing

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried. Running detox build , yarn install , detox tests is working. When running from bitrise it gives this error.

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/cli )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: Running your build locally in Docker - Bitrise Docs .

Build log

● Onboarding › should show signup screen after tap

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                               0x000000010ef76135 +[NSThread(DetoxUtils) dtx_demangledCallStackSymbols] + 37
	1   Detox                               0x000000010ef78c10 __DTXHandleCrash + 464
	2   Detox                               0x000000010ef79351 __DTXHandleSignal + 59
	3   libsystem_platform.dylib            0x000000011a323d7d _sigtramp + 29
	4   ???                                 0x0065006400490073 0x0 + 28429402149290099
	5   ???                                 0x0000000000000480 0x0 + 1152
)

  2 |   beforeAll(async () => {
  3 |     console.log("awaiting launch app");
> 4 |     await device.launchApp();
    |                  ^
  5 |     console.log("done launch app");
  6 |
  7 |   });

  at _callee$ (onboarding.e2e.js:4:18)
  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

● Onboarding › should show forgot password screen after tap

Simulator Log:

com.superapp, Container: (null))

2022-03-10 17:45:30.949 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Err306, value: There was a problem communicating with the web proxy server (HTTP)., table: Localizable, localizationName: (null), result: There was a problem communicating with the web proxy server (HTTP).

2022-03-10 17:45:30.949 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Please check your proxy settings. For help with this problem, contact your system administrator., value: Please check your proxy settings. For help with this problem, contact your system administrator., table: Localizable, localizationName: (null), result: Please check your proxy settings. For help with this problem, contact your system administrator.

2022-03-10 17:45:30.951 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Err310, value: There was a problem communicating with the secure web proxy server (HTTPS)., table: Localizable, localizationName: (null), result: There was a problem communicating with the secure web proxy server (HTTPS).

2022-03-10 17:45:30.951 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Please check your proxy settings. For help with this problem, contact your system administrator., value: Please check your proxy settings. For help with this problem, contact your system administrator., table: Localizable, localizationName: (null), result: Please check your proxy settings. For help with this problem, contact your system administrator.

2022-03-10 17:45:30.951 Db superapp[70466:2af34d] [com.apple.defaults:User Defaults] found no value for key NSShowNonLocalizedStrings in CFPrefsSearchListSource<0x600000d5c400> (Domain: com.superapp, Container: (null))

2022-03-10 17:45:30.951 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Err311, value: There was a problem establishing a secure tunnel through the web proxy server., table: Localizable, localizationName: (null), result: There was a problem establishing a secure tunnel through the web proxy server.

2022-03-10 17:45:30.951 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Please check your proxy settings. For help with this problem, contact your system administrator., value: Please check your proxy settings. For help with this problem, contact your system administrator., table: Localizable, localizationName: (null), result: Please check your proxy settings. For help with this problem, contact your system administrator.

2022-03-10 17:45:30.951 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Err-996, value: Could not communicate with background transfer service, table: Localizable, localizationName: (null), result: Could not communicate with background transfer service

2022-03-10 17:45:30.953 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Err-997, value: Lost connection to background transfer service, table: Localizable, localizationName: (null), result: Lost connection to background transfer service

2022-03-10 17:45:30.953 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Err-998, value: unknown error, table: Localizable, localizationName: (null), result: unknown error

2022-03-10 17:45:30.953 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Err-998, value: unknown error, table: Localizable, localizationName: (null), result: unknown error

2022-03-10 17:45:30.953 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Err-999, value: cancelled, table: Localizable, localizationName: (null), result: cancelled

2022-03-10 17:45:30.953 Db superapp[70466:2af34d] [com.apple.CFBundle:strings] Bundle: CFBundle 0x7fd66930c160 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework> (framework, loaded), key: Err-1000, value: bad URL, table: Localizable, localizationName: (null), result: bad URL

Hi!
Were you able to solve it?

I created a sample react native project and i can run the tests fine
GitHub - luke92/react-native-detox-bitrise: A Demo project of React Native with E2E Tests with Detox integrated with Bitrise CI (In the repo i have the bitrise.yml also)

But, In the real project I have the same problem that you
Locally I can run the automated tests with the debug and release configuration for iOS.
But I can’t get it to work in Bitrise because I get the error Signal 11 was raised

+ detox test --configuration ios.sim.release --cleanup --record-videos failing --take-screenshots failing -t 'Teen Sign Up'
14:15:25.532 detox[26671] B jest --config e2e/jest.config.js -t Teen\ Sign\ Up

14:18:52.985 detox[26672] i teen.signup.test.ts is assigned to 01B9B9F6-4BD5-4002-AA79-3F9A386C518E (iPhone 15)
14:19:23.463 detox[26672] i com.modak.mobileapp.e2e launched. To watch simulator logs, run:
        /usr/bin/xcrun simctl spawn 01B9B9F6-4BD5-4002-AA79-3F9A386C518E log stream --level debug --style compact --predicate 'process == "mobileapp"'
14:19:30.451 detox[26672] i Teen Sign Up: MDKQ-TC-73 Sign Up Success
14:19:30.919 detox[26672] i Teen Sign Up: MDKQ-TC-73 Sign Up Success [FAIL]
FAIL e2e/tests/teen/teen.signup.test.ts (47.589 s)
  Teen Sign Up
    ✕ MDKQ-TC-73 Sign Up Success (428 ms)
  ● Teen Sign Up › MDKQ-TC-73 Sign Up Success
    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                               0x0000000103f8e618 +[NSThread(DetoxUtils) dtx_demangledCallStackSymbols] + 36
    	1   Detox                               0x0000000103f914f4 __DTXHandleCrash + 440
    	2   Detox                               0x0000000103f91b24 __DTXHandleSignal + 72
    	3   libsystem_platform.dylib            0x0000000102e3fc60 _sigtramp + 52
    	4   mobileapp                           0x0000000100c3ea0c encode_field + 436
    	5   mobileapp                           0x0000000100c3e82c pb_encode + 172
    	6   mobileapp                           0x000000010034678c FIRSESEncodeProto + 64
    	7   mobileapp                           0x0000000100350f64 FirebaseSessions.SessionStartEvent.transportBytes() -> Foundation.Data + 232
    	8   mobileapp                           0x00000001003511ec @objc FirebaseSessions.SessionStartEvent.transportBytes() -> Foundation.Data + 28
    	9   mobileapp                           0x000000010035970c -[GDTCOREvent setDataObject:] + 68
    	10  mobileapp                           0x0000000100348250 FirebaseSessions.EventGDTLogger.logEvent(event: FirebaseSessions.SessionStartEvent, completion: (Swift.Result<(), Swift.Error>) -> ()) -> () + 108
    	11  mobileapp                           0x0000000100348414 protocol witness for FirebaseSessions.EventGDTLoggerProtocol.logEvent(event: FirebaseSessions.SessionStartEvent, completion: (Swift.Result<(), Swift.Error>) -> ()) -> () in conformance FirebaseSessions.EventGDTLogger : FirebaseSessions.EventGDTLoggerProtocol in FirebaseSessions + 20
    	12  mobileapp                           0x000000010034f134 closure #1 (Swift.Result<(), FirebaseSessions.FirebaseSessionsError>) -> () in FirebaseSessions.SessionCoordinator.attemptLoggingSessionStart(event: FirebaseSessions.SessionStartEvent, callback: (Swift.Result<(), FirebaseSessions.FirebaseSessionsError>) -> ()) -> () + 176
    	13  mobileapp                           0x000000010034f334 closure #1 (Swift.Result<Swift.String, Swift.Error>) -> () in FirebaseSessions.SessionCoordinator.(fillInFIID in _A99E81F187A7BA47A5374F4DC053A423)(event: FirebaseSessions.SessionStartEvent, callback: (Swift.Result<(), FirebaseSessions.FirebaseSessionsError>) -> ()) -> () + 180
    	14  mobileapp                           0x000000010034ce64 partial apply forwarder for closure #1 (Swift.Optional<Swift.String>, Swift.Optional<Swift.Error>) -> () in (extension in FirebaseSessions):__C.FIRInstallations.installationID(completion: (Swift.Result<Swift.String, Swift.Error>) -> ()) -> () + 48
    	15  mobileapp                           0x000000010034cd28 reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Optional<Swift.String>, @guaranteed Swift.Optional<Swift.Error>) -> () to @escaping @callee_unowned @convention(block) (@unowned Swift.Optional<__C.NSString>, @unowned Swift.Optional<__C.NSError>) -> () + 96
    	16  mobileapp                           0x00000001002f335c __49-[FIRInstallations installationIDWithCompletion:]_block_invoke + 56
    	17  mobileapp                           0x00000001002d4868 __56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.18 + 52
    	18  DetoxSync                           0x00000001042d7db8 ____detox_sync_dispatch_group_wrapper_block_invoke + 44
    	19  libdispatch.dylib                   0x0000000180170104 _dispatch_call_block_and_release + 24
    	20  libdispatch.dylib                   0x0000000180171978 _dispatch_client_callout + 16
    	21  libdispatch.dylib                   0x0000000180180804 _dispatch_main_queue_drain + 1336
    	22  libdispatch.dylib                   0x00000001801802bc _dispatch_main_queue_callback_4CF + 40
    	23  CoreFoundation                      0x000000018040e960 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
    	24  CoreFoundation                      0x0000000180409078 __CFRunLoopRun + 1936
    	25  CoreFoundation                      0x00000001804084d4 CFRunLoopRunSpecific + 572
    	26  GraphicsServices                    0x000000018ef2aae4 GSEventRunModal + 160
    	27  UIKitCore                           0x00000001853d0a28 -[UIApplication _run] + 868
    	28  DetoxSync                           0x00000001042de034 __detox_sync_UIApplication_run + 376
    	29  UIKitCore                           0x00000001853d46b0 UIApplicationMain + 124
    	30  mobileapp                           0x000000010012ff70 main + 80
    	31  dyld                                0x00000001033bd544 start_sim + 20
    	32  ???                                 0x0000000102eba0e0 0x0 + 4343963872
    	33  ???                                 0xd711000000000000 0x0 + -2949576280950964224
    )
      17 |     permissions = allowAllPermissions;
      18 |   }
    > 19 |   return device.launchApp({
         |                 ^
      20 |     newInstance: newInstance,
      21 |     launchArgs: {
      22 |       detoxEnableSynchronization: 'NO',
      at openApp (e2e/helpers/openApp.ts:19:17)
      at Object.<anonymous> (e2e/setupTests.ts:4:16)

Hi @luke92,

Did you try out the remote access capability to see what is happening on the CI machine?

You could also raise a support ticket and a member of the support team will investigate. Please also enable support access so they can look at your app - Enabling the Bitrise Support Access for your app - Bitrise Docs

Thank you!
Balazs

1 Like

Many Thanks!

The solution for Signal 11 was develop mocks of Firebase Services that we use, and disable firebase services in firebase.json like this

{
    "react-native": {
      "perf_auto_collection_enabled": false,
      "in_app_messaging_auto_collection_enabled": false,
      "crashlytics_auto_collection_enabled": false,
      "messaging_ios_auto_register_for_remote_messages": false,
      "messaging_ios_foreground_presentation_options": ["badge", "sound", "list", "banner"],
      "analytics_auto_collection_enabled": false,
      "messaging_auto_init_enabled": false,
      "messaging_android_headless_task_timeout": 30000,
      "messaging_android_notification_channel_id": "high-priority",
      "messaging_android_notification_color": "@color/hotpink"
    }
  }

Now, using the remote access capability, i found that i have errors with the Software Keyboard of iOS, like this thread

Can you help us?

Thanks,
Regards

1 Like