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

When I launch a test against the iOS simulator I get this system alert:

Do you want the application “WebDriverAgentRunner-Runner.app” to accept incoming netwoek connections?

It has to be closed manually. I can’t figure a way to keep this alert from appearing, other than turning off the firewall. The suggested fix is to go to system firewall settings and allow the app to accept connections, but no such app even exists on my system.

Turns out it exists on my system, but despite the .app extension it does not live in Applications, which is where the firewall settings add function looks for apps

Hello

In OSX Sierra you can just add WebDriverAgentRunner-Runner.app by registering the application in the firewall setings, click in the plus button and include your app (command+shift+g in finder window to paste the url directly)

mine was here:
/Users/$USER/Library/Developer/Xcode/DerivedData/WebDriverAgent-emnhpovsbzjwfrayooqpqesmhlot/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app

I hope it helps

That does help. Thanks!

That allowed me to add the object to the firewall whitelist, but I still get that dialog when I instantiate the driver. I bounced the Appium server, but I still get the Deny/Allow dialog

Hey guys, I am not a user of Appium, yet. Here is an automated solution if your on OS X. In your bash script after launching WebDriverAgent, execute an .osascript as follows:

tell application “System Events”
set frontmost of process “UserNotificationCenter” to true
tell process “UserNotificationCenter”
if exists button “Allow” of window 1 then
repeat while exists button “Allow” of window 1
if exists button “Allow” of window 1 then
perform action “AXPress” of button “Allow” of window 1
end if
end repeat
end if
end tell
end tell

Its 100% reliable unlike mobile UI automation and these crazy 3rd party tools. GL

1 Like

Thanks a lot, @JJacquet. This improved our devs’ quality of life. :slight_smile:

Here is an update for this script as of June 4, 2021:

delay 1

tell application "System Events"
	set frontmost of process "UserNotificationCenter" to true
	
	tell process "UserNotificationCenter"
		
		if exists button "Allow" of window 1 then
			repeat while exists button "Allow" of window 1
				
				if exists button "Allow" of window 1 then
					click button "Allow" of window 1
				end if
				
			end repeat
			
		end if
		
	end tell
end tell