Detox tests do not work with more than 1 worker

Hi, my question is why after increasing detox workers to 2 or 3 I cannot run it on the standard machine. As you write there are 4CPU cores.

My workflow config:

e2e-iphone-tests:
    steps:
    - activate-ssh-key@4:
        run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
    - git-clone@6: {}
    - nvm@1:
        inputs:
        - node_version: 16.13.0
    - npm@1:
        inputs:
        - command: install
        title: Install dependencies
    - npm@1:
        inputs:
        - command: install -g detox-cli
        title: Install detox globally
    - npm@1:
        inputs:
        - command: install -g react-native-cli
    - script@1:
        inputs:
        - content: "#!/bin/bash\n# fail if any commands fails\nset -e\n# debug log\nset
            -x\n   \n# applesimutils is a collection of utils for Apple simulators\nbrew
            tap wix/brew\nbrew install applesimutils --HEAD"
        title: Install detox prerequisites
    - script@1:
        inputs:
        - content: |-
            #!/usr/bin/env bash
            # fail if any commands fails
            set -e
            # debug log
            set -x

            # write your script here
            cd ios; pod install; cd -;
        title: Install pods
    - script@1:
        title: Build detox - iphone
        inputs:
        - content: |-
            #!/usr/bin/env bash
            # fail if any commands fails
            set -e
            # debug log
            set -x

            # write your script here
            RN_SRC_EXT='e2e.ts,e2e.tsx' ENVFILE=.env.qa detox build -c ios
    - script@1:
        title: Run tests detox - iphone
        inputs:
        - content: |-
            #!/usr/bin/env bash
            # fail if any commands fails
            set -e
            # debug log
            set -x

            # write your script here
            RN_SRC_EXT='e2e.ts,e2e.tsx' ENVFILE=.env.qa TZ=UTC detox test -c ios -u --record-logs all --take-screenshots all --record-videos all --workers 3
    - script@1:
        title: Copy artifacts
        inputs:
        - content: |-
            #!/usr/bin/env bash
            # fail if any commands fails
            set -e
            # debug log
            set -x

            # write your script here
            echo "----------- ARTIFACTS --------"
            ls -all artifacts
            echo "----------- PROJECT --------"
            ls -all
            echo "----------- COPY --------"
            cp -R artifacts $BITRISE_DEPLOY_DIR
            ls -all $BITRISE_DEPLOY_DIR
        is_always_run: true
    - deploy-to-bitrise-io@2:
        inputs:
        - is_compress: 'true'

and it is always failing. After I get back to 1 worker, tests are passing each and every time. Can someone help me with this issue?

After I do the same on my local machine using bitrise cli it works as expected.

Hello @hubert.stemplewski :wave:

In case you still experience this issue, could you please submit a ticket to us with all the details you can provide at https://support.bitrise.io/ ?

Please make sure to send us the URL of a related build and enable Support User (Redirecting…) so we can take a closer look! :slightly_smiling_face:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.