How do I resolve the alert about allowing WebDriverAgentRunner-Runner.app to accept incoming network connections?

I am trying to add tests in azure pipeline using a macos agent, but when I run the tests it gives me a timeout and I am almost sure it is because of the alert says “allows WebDriverAgentRunner-Runner.app to accept incoming network connections must be allowed”, since in my local If I don’t accept it, the same timeout error happens to me.

I know it’s a problem that the app must authorize in the firewall, but I don’t know how to do it in a mac-os agent from an azure pipeline agent pool.
I tried to do what is indicated here: https://github.com/appium/python-client/tree/master/ci-jobs but no success either

2023-07-18T00:28:14.5793420Z ##[section]Starting: Run iOS UI tests
2023-07-18T00:28:14.5803530Z ==============================================================================
2023-07-18T00:28:14.5803710Z Task         : Command line
2023-07-18T00:28:14.5803790Z Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2023-07-18T00:28:14.5803980Z Version      : 2.212.0
2023-07-18T00:28:14.5804520Z Author       : Microsoft Corporation
2023-07-18T00:28:14.5804770Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2023-07-18T00:28:14.5805310Z ==============================================================================
2023-07-18T00:28:14.8365510Z Generating script.
2023-07-18T00:28:14.8372640Z Script contents:
2023-07-18T00:28:14.8374040Z npm run wdio:ios:pipeline
2023-07-18T00:28:14.8375040Z ========================== Starting Command Output ===========================
2023-07-18T00:28:14.8455100Z [command]/bin/bash --noprofile --norc /Users/runner/work/_temp/de0475ce-331d-418e-ab05-b08d54a626bc.sh
2023-07-18T00:28:16.1165630Z 
2023-07-18T00:28:16.1166890Z > [email protected] wdio:ios:pipeline
2023-07-18T00:28:16.1167270Z > TEST_ENV='ios' wdio run src/test/config/pipeline/wdio.ios.conf.js
2023-07-18T00:28:16.1167430Z 
2023-07-18T00:28:19.7669660Z �[1m�[22m
2023-07-18T00:28:19.7670670Z �[1mExecution of �[34m1�[39m workers started at�[22m 2023-07-18T00:28:19.765Z
2023-07-18T00:28:19.7671160Z 
2023-07-18T00:28:20.5855960Z �[90m2023-07-18T00:28:20.580Z�[39m �[96mINFO�[39m �[97m@wdio/cli:launcher�[39m: Run onPrepare hook
2023-07-18T00:28:30.9515030Z �[90m2023-07-18T00:28:30.950Z�[39m �[96mINFO�[39m �[97m@wdio/cli:launcher�[39m: Run onWorkerStart hook
2023-07-18T00:28:30.9539500Z �[90m2023-07-18T00:28:30.952Z�[39m �[96mINFO�[39m �[97m@wdio/local-runner�[39m: Start worker 0-0 with arg: run,src/test/config/pipeline/wdio.ios.conf.js
2023-07-18T00:28:33.2644770Z [0-0] �[90m2023-07-18T00:28:33.257Z�[39m �[96mINFO�[39m �[97m@wdio/local-runner�[39m: Run worker command: run
2023-07-18T00:28:34.2151770Z [0-0] �[1m�[36mRUNNING�[39m�[22m in ios - file:///src/test/tests/specs/TC-001.login.spec.js
2023-07-18T00:28:34.2161920Z [0-0] �[90m2023-07-18T00:28:34.215Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: Initiate new session using the WebDriver protocol
2023-07-18T00:28:34.3474460Z [0-0] �[90m2023-07-18T00:28:34.344Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: [POST] http://127.0.0.1:4723/session
2023-07-18T00:28:34.3493580Z [0-0] �[90m2023-07-18T00:28:34.344Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: �[33mDATA�[39m {
2023-07-18T00:28:34.3498310Z [0-0]   capabilities: {
2023-07-18T00:28:34.3500050Z [0-0]     alwaysMatch: {
2023-07-18T00:28:34.3501170Z [0-0]       platformName: 'ios',
2023-07-18T00:28:34.3501910Z [0-0]       'appium:platformVersion': '16.2',
2023-07-18T00:28:34.3502800Z [0-0]       'appium:deviceName': 'iPhone 14',
2023-07-18T00:28:34.3503190Z [0-0]       'appium:automationName': 'XCUITest',
2023-07-18T00:28:34.3503760Z [0-0]       'appium:app': '/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app',
2023-07-18T00:28:34.3504190Z [0-0]       'appium:autoWebview': true
2023-07-18T00:28:34.3504430Z [0-0]     },
2023-07-18T00:28:34.3504660Z [0-0]     firstMatch: [ {} ]
2023-07-18T00:28:34.3504880Z [0-0]   },
2023-07-18T00:28:34.3505170Z [0-0]   desiredCapabilities: {
2023-07-18T00:28:34.3505680Z [0-0]     platformName: 'ios',
2023-07-18T00:28:34.3506000Z [0-0]     'appium:platformVersion': '16.2',
2023-07-18T00:28:34.3506300Z [0-0]     'appium:deviceName': 'iPhone 14',
2023-07-18T00:28:34.3506660Z [0-0]     'appium:automationName': 'XCUITest',
2023-07-18T00:28:34.3507090Z [0-0]     'appium:app': '/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app',
2023-07-18T00:28:34.3507470Z [0-0]     'appium:autoWebview': true
2023-07-18T00:28:34.3507690Z [0-0]   }
2023-07-18T00:28:34.3507870Z [0-0] }
2023-07-18T00:30:34.3996040Z [0-0] �[90m2023-07-18T00:30:34.382Z�[39m �[33mWARN�[39m �[97mwebdriver�[39m: Request timed out! Consider increasing the "connectionRetryTimeout" option.
2023-07-18T00:30:34.4657480Z [0-0] �[90m2023-07-18T00:30:34.382Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: Retrying 1/3
2023-07-18T00:30:34.5057580Z [0-0] �[90m2023-07-18T00:30:34.383Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: [POST] http://127.0.0.1:4723/session
2023-07-18T00:30:34.5224980Z [0-0] �[90m2023-07-18T00:30:34.383Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: �[33mDATA�[39m {
2023-07-18T00:30:34.5498370Z [0-0]   capabilities: {
2023-07-18T00:30:34.6500480Z [0-0]     alwaysMatch: {
2023-07-18T00:30:34.7505130Z [0-0]       platformName: 'ios',
2023-07-18T00:30:34.8362450Z [0-0]       'appium:platformVersion': '16.2',
2023-07-18T00:30:34.8545070Z [0-0]       'appium:deviceName': 'iPhone 14',
2023-07-18T00:30:34.8553540Z [0-0]       'appium:automationName': 'XCUITest',
2023-07-18T00:30:34.8561850Z [0-0]       'appium:app': '/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app',
2023-07-18T00:30:34.8567950Z [0-0]       'appium:autoWebview': true
2023-07-18T00:30:34.8607570Z [0-0]     },
2023-07-18T00:30:34.8613160Z [0-0]     firstMatch: [ {} ]
2023-07-18T00:30:34.8618620Z [0-0]   },
2023-07-18T00:30:34.8623970Z [0-0]   desiredCapabilities: {
2023-07-18T00:30:34.9639420Z [0-0]     platformName: 'ios',
2023-07-18T00:30:35.0635480Z [0-0]     'appium:platformVersion': '16.2',
2023-07-18T00:30:35.1640050Z [0-0]     'appium:deviceName': 'iPhone 14',
2023-07-18T00:30:35.2642450Z [0-0]     'appium:automationName': 'XCUITest',
2023-07-18T00:30:35.3645160Z [0-0]     'appium:app': '/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app',
2023-07-18T00:30:35.4661230Z [0-0]     'appium:autoWebview': true
2023-07-18T00:30:35.5663810Z [0-0]   }
2023-07-18T00:30:35.6666270Z [0-0] }
2023-07-18T00:32:34.4134160Z [0-0] �[90m2023-07-18T00:32:34.387Z�[39m �[33mWARN�[39m �[97mwebdriver�[39m: Request timed out! Consider increasing the "connectionRetryTimeout" option.
2023-07-18T00:32:34.5138170Z [0-0] �[90m2023-07-18T00:32:34.388Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: Retrying 2/3
2023-07-18T00:32:34.6141590Z [0-0] �[90m2023-07-18T00:32:34.388Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: [POST] http://127.0.0.1:4723/session
2023-07-18T00:32:34.7149100Z [0-0] �[90m2023-07-18T00:32:34.388Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: �[33mDATA�[39m {
2023-07-18T00:32:34.8151310Z [0-0]   capabilities: {
2023-07-18T00:32:35.0159220Z [0-0]     alwaysMatch: {
2023-07-18T00:32:35.2174420Z [0-0]       platformName: 'ios',
2023-07-18T00:32:35.3164960Z [0-0]       'appium:platformVersion': '16.2',
2023-07-18T00:32:35.4170320Z [0-0]       'appium:deviceName': 'iPhone 14',
2023-07-18T00:32:35.5174130Z [0-0]       'appium:automationName': 'XCUITest',
2023-07-18T00:32:35.6178230Z [0-0]       'appium:app': '/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app',
2023-07-18T00:32:35.7181170Z [0-0]       'appium:autoWebview': true
2023-07-18T00:32:35.8182820Z [0-0]     },
2023-07-18T00:32:35.9184130Z [0-0]     firstMatch: [ {} ]
2023-07-18T00:32:36.0185570Z [0-0]   },
2023-07-18T00:32:36.1187960Z [0-0]   desiredCapabilities: {
2023-07-18T00:32:36.2270460Z [0-0]     platformName: 'ios',
2023-07-18T00:32:36.3274180Z [0-0]     'appium:platformVersion': '16.2',
2023-07-18T00:32:36.4276910Z [0-0]     'appium:deviceName': 'iPhone 14',
2023-07-18T00:32:36.5279300Z [0-0]     'appium:automationName': 'XCUITest',
2023-07-18T00:32:36.6282560Z [0-0]     'appium:app': '/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app',
2023-07-18T00:32:36.7284360Z [0-0]     'appium:autoWebview': true
2023-07-18T00:32:36.8286970Z [0-0]   }
2023-07-18T00:32:36.9289310Z [0-0] }
2023-07-18T00:34:34.3997580Z [0-0] �[90m2023-07-18T00:34:34.393Z�[39m �[33mWARN�[39m �[97mwebdriver�[39m: Request timed out! Consider increasing the "connectionRetryTimeout" option.
2023-07-18T00:34:34.4647920Z [0-0] �[90m2023-07-18T00:34:34.393Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: Retrying 3/3
2023-07-18T00:34:34.5651130Z [0-0] �[90m2023-07-18T00:34:34.393Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: [POST] http://127.0.0.1:4723/session
2023-07-18T00:34:34.6654620Z [0-0] �[90m2023-07-18T00:34:34.396Z�[39m �[96mINFO�[39m �[97mwebdriver�[39m: �[33mDATA�[39m {
2023-07-18T00:34:34.7657130Z [0-0]   capabilities: {
2023-07-18T00:34:34.8757530Z [0-0]     alwaysMatch: {
2023-07-18T00:34:35.0766050Z [0-0]       platformName: 'ios',
2023-07-18T00:34:35.1763440Z [0-0]       'appium:platformVersion': '16.2',
2023-07-18T00:34:35.2764810Z [0-0]       'appium:deviceName': 'iPhone 14',
2023-07-18T00:34:35.3641130Z [0-0]       'appium:automationName': 'XCUITest',
2023-07-18T00:34:35.4645950Z [0-0]       'appium:app': '/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app',
2023-07-18T00:34:35.5647280Z [0-0]       'appium:autoWebview': true
2023-07-18T00:34:35.6650340Z [0-0]     },
2023-07-18T00:34:35.7654760Z [0-0]     firstMatch: [ {} ]
2023-07-18T00:34:35.8657940Z [0-0]   },
2023-07-18T00:34:35.9662880Z [0-0]   desiredCapabilities: {
2023-07-18T00:34:36.0730860Z [0-0]     platformName: 'ios',
2023-07-18T00:34:36.1734490Z [0-0]     'appium:platformVersion': '16.2',
2023-07-18T00:34:36.2540210Z [0-0]     'appium:deviceName': 'iPhone 14',
2023-07-18T00:34:36.2704720Z [0-0]     'appium:automationName': 'XCUITest',
2023-07-18T00:34:36.3706750Z [0-0]     'appium:app': '/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app',
2023-07-18T00:34:36.4709620Z [0-0]     'appium:autoWebview': true
2023-07-18T00:34:36.6091230Z [0-0]   }
2023-07-18T00:34:36.7097140Z [0-0] }
2023-07-18T00:36:34.5318930Z [0-0] �[90m2023-07-18T00:36:34.448Z�[39m �[31mERROR�[39m �[97mwebdriver�[39m: Request failed with status undefined due to TimeoutError: Timeout awaiting 'response' for 120000ms when running "http://127.0.0.1:4723/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"platformName":"ios","appium:platformVersion":"16.2","appium:deviceName":"iPhone 14","appium:automationName":"XCUITest","appium:app":"/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app","appium:autoWebview":true},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"ios","appium:platformVersion":"16.2","appium:deviceName":"iPhone 14","appium:automationName":"XCUITest","appium:app":"/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app","appium:autoWebview":true}}"
2023-07-18T00:36:34.6291030Z [0-0] �[90m2023-07-18T00:36:34.455Z�[39m �[31mERROR�[39m �[97mwebdriver�[39m: TimeoutError: Timeout awaiting 'response' for 120000ms when running "http://127.0.0.1:4723/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"platformName":"ios","appium:platformVersion":"16.2","appium:deviceName":"iPhone 14","appium:automationName":"XCUITest","appium:app":"/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app","appium:autoWebview":true},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"ios","appium:platformVersion":"16.2","appium:deviceName":"iPhone 14","appium:automationName":"XCUITest","appium:app":"/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app","appium:autoWebview":true}}"
2023-07-18T00:36:34.8328140Z [0-0]     at getTimeoutError (file:///Users/runner/work/1/s/node_modules/webdriver/build/utils.js:319:24)
2023-07-18T00:36:34.8937340Z [0-0]     at NodeJSRequest._request (file:///Users/runner/work/1/s/node_modules/webdriver/build/request/index.js:152:31)
2023-07-18T00:36:34.9941090Z [0-0]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-07-18T00:36:35.0944660Z [0-0]     at async startWebDriverSession (file:///Users/runner/work/1/s/node_modules/webdriver/build/utils.js:63:20)
2023-07-18T00:36:35.1947990Z [0-0]     at async Function.newSession (file:///Users/runner/work/1/s/node_modules/webdriver/build/index.js:26:45)
2023-07-18T00:36:35.2952270Z [0-0]     at async remote (file:///Users/runner/work/1/s/node_modules/@wdio/runner/node_modules/webdriverio/build/index.js:48:22)
2023-07-18T00:36:35.3963140Z [0-0]     at async Runner._startSession (file:///Users/runner/work/1/s/node_modules/@wdio/runner/build/index.js:221:29)
2023-07-18T00:36:35.4967600Z [0-0]     at async Runner._initSession (file:///Users/runner/work/1/s/node_modules/@wdio/runner/build/index.js:187:25)
2023-07-18T00:36:35.5970860Z [0-0]     at async Runner.run (file:///Users/runner/work/1/s/node_modules/@wdio/runner/build/index.js:77:19)
2023-07-18T00:36:35.6977110Z [0-0] �[90m2023-07-18T00:36:34.494Z�[39m �[31mERROR�[39m �[97m@wdio/runner�[39m: Error: Failed to create session.
2023-07-18T00:36:35.7981360Z [0-0] Timeout awaiting 'response' for 120000ms when running "http://127.0.0.1:4723/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"platformName":"ios","appium:platformVersion":"16.2","appium:deviceName":"iPhone 14","appium:automationName":"XCUITest","appium:app":"/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app","appium:autoWebview":true},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"ios","appium:platformVersion":"16.2","appium:deviceName":"iPhone 14","appium:automationName":"XCUITest","appium:app":"/Users/runner/work/1/s/ios/DerivedData/Build/Products/Debug-iphonesimulator/App-QA.app","appium:autoWebview":true}}"
2023-07-18T00:36:35.8985740Z [0-0]     at startWebDriverSession (file:///Users/runner/work/1/s/node_modules/webdriver/build/utils.js:68:15)
2023-07-18T00:36:35.9988680Z [0-0]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-07-18T00:36:36.0995730Z [0-0]     at async Function.newSession (file:///Users/runner/work/1/s/node_modules/webdriver/build/index.js:26:45)
2023-07-18T00:36:36.2000490Z [0-0]     at async remote (file:///Users/runner/work/1/s/node_modules/@wdio/runner/node_modules/webdriverio/build/index.js:48:22)
2023-07-18T00:36:36.3022840Z [0-0]     at async Runner._startSession (file:///Users/runner/work/1/s/node_modules/@wdio/runner/build/index.js:221:29)
2023-07-18T00:36:36.4051880Z [0-0]     at async Runner._initSession (file:///Users/runner/work/1/s/node_modules/@wdio/runner/build/index.js:187:25)
2023-07-18T00:36:36.5057690Z [0-0]     at async Runner.run (file:///Users/runner/work/1/s/node_modules/@wdio/runner/build/index.js:77:19)
2023-07-18T00:36:36.6060480Z [0-0] �[1m�[31mFAILED�[39m�[22m in ios - file:///src/test/tests/specs/TC-001.login.spec.js
2023-07-18T00:36:36.7063280Z �[90m2023-07-18T00:36:35.593Z�[39m �[96mINFO�[39m �[97m@wdio/cli:launcher�[39m: Run onWorkerEnd hook
2023-07-18T00:36:36.8066360Z �[90m2023-07-18T00:36:35.596Z�[39m �[96mINFO�[39m �[97m@wdio/cli:launcher�[39m: Run onComplete hook
2023-07-18T00:36:40.6460780Z �[90m2023-07-18T00:36:40.627Z�[39m �[31mERROR�[39m �[97m@wdio/cli:utils�[39m: Error in onCompleteHook: Error: Could not generate Allure report
2023-07-18T00:36:40.7475940Z     at Object.onComplete (/Users/runner/work/1/s/src/test/config/pipeline/wdio.shared.conf.js:109:25)
2023-07-18T00:36:40.8478410Z     at file:///Users/runner/work/1/s/node_modules/@wdio/cli/build/utils.js:101:19
2023-07-18T00:36:40.9481540Z     at Array.map (<anonymous>)
2023-07-18T00:36:41.0484140Z     at runOnCompleteHook (file:///Users/runner/work/1/s/node_modules/@wdio/cli/build/utils.js:99:39)
2023-07-18T00:36:41.1488330Z     at Launcher.run (file:///Users/runner/work/1/s/node_modules/@wdio/cli/build/launcher.js:92:45)
2023-07-18T00:36:41.2499780Z     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-07-18T00:36:41.3504630Z 
2023-07-18T00:36:41.4511190Z Spec Files:	 �[32m0 passed�[39m, �[31m1 failed�[39m, 1 total (100% completed) in 00:08:20 
2023-07-18T00:36:41.5526640Z 
2023-07-18T00:36:41.6532160Z �[90m2023-07-18T00:36:40.631Z�[39m �[96mINFO�[39m �[97m@wdio/local-runner�[39m: Shutting down spawned worker
2023-07-18T00:36:41.7536030Z �[90m2023-07-18T00:36:40.883Z�[39m �[96mINFO�[39m �[97m@wdio/local-runner�[39m: Waiting for 0 to shut down gracefully
2023-07-18T00:36:41.8544190Z �[90m2023-07-18T00:36:40.883Z�[39m �[96mINFO�[39m �[97m@wdio/local-runner�[39m: shutting down
2023-07-18T00:36:51.1402210Z The STDIO streams did not close within 10 seconds of the exit event from process '/bin/bash'. This may indicate a child process inherited the STDIO streams and has not yet exited.
2023-07-18T00:36:51.7067120Z ##[error]Bash exited with code '1'.
2023-07-18T00:36:55.4730980Z Report successfully generated to allure-report
2023-07-18T00:36:55.5712070Z ##[section]Finishing: Run iOS UI tests
1 Like