socketfilterfw failing to add daemon on Big Sur 11.0.1 Beta

When running
/usr/libexec/ApplicationFirewall/socketfilterfw --add <path>
the error message: "The file path you specified is invalid" is returned. This as worked on all the previous macOS versions. Has anyone run into this? Thank you.
Not sure what, if anything, has changed here in adding a path to socketfilterfw. It looks like it's still expecting an absolute path to an executable. Double check that this is correct. If you still run into issue, I would open a bug report on this.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
I have run into the same issue just now. Worked for all previous versions.
Matt, thank you for your reply. I am definitely using an absolute path and as soon as Big Sur has been officially released, I can do one more test and file a bug report, if it is still happening.
No problem, keep this thread updated if you still see the same thing when Big Sur is released. If are you please send along the Feedback ID.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
The Feedback ID is: FB8893569
Thank you for the Feedback ID. I see it internally and have copied myself on it for more information.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Same issue. Node.js core includes a script for setting the firewall rules before running the test suite, which has worked in all prior macOS versions up to now but is suddenly failing in Big Sure complaining that the paths are invalid.
Update - The error message "The file path you specified is invalid" continues with Big Sur 11.01 release and 11.1 Beta (20C5048k).
I am now thinking that the issue is not with socketfilterfw, but with the encoding of the path. I noticed on Catalina that Xcode will add your app to the firewall, if you open a socket and are listening to it. So I moved my simple socket server over to Beta 11.1 and ran it. At first, nothing happened, but after setting the global state on, the app appeared. As you will see, there is now a valid path being displayed in socketfilterfw, but when I try to remove it, I get the same error "The file path you specified is invalid". Here is my terminal session:

vagrant@Vagrants-Mac ~ % sudo /usr/libexec/ApplicationFirewall/socketfilterfw --listapps
vagrant@Vagrants-Mac ~ % sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
Firewall is enabled. (State = 1)
vagrant@Vagrants-Mac ~ % sudo /usr/libexec/ApplicationFirewall/socketfilterfw --listapps
ALF: total number of apps = 1

1 : /Users/vagrant/Library/Developer/Xcode/DerivedData/SocketServer-ftagnsjglzldkpdpxewhonpchqay/Build/Products/Debug/SocketServer.app
( Allow incoming connections )

vagrant@Vagrants-Mac ~ % sudo /usr/libexec/ApplicationFirewall/socketfilterfw --remove /Users/vagrant/Library/Developer/Xcode/DerivedData/SocketServer-ftagnsjglzldkpdpxewhonpchqay/Build/Products/Debug/SocketServer.app
The file path you specified is invalid
vagrant@Vagrants-Mac ~ % locale
LANG="enUS.UTF-8"
LC
COLLATE="enUS.UTF-8"
LC
CTYPE="enUS.UTF-8"
LC
MESSAGES="enUS.UTF-8"
LC
MONETARY="enUS.UTF-8"
LC
NUMERIC="enUS.UTF-8"
LC
TIME="enUS.UTF-8"
LC
ALL=
vagrant@Vagrants-Mac ~ % sw_vers
ProductName: macOS
ProductVersion: 11.1
BuildVersion: 20C5048k
vagrant@Vagrants-Mac ~ %
the same issue reproduced on Big Sur 11.2.1
MacBook 15 2015

Code Block shell
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getappblocked /usr/bin/nc
The file path you specified is invalid

or
Code Block shell
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/local/bin/mosh-server
The file path you specified is invalid


in general, every operation with a path gets this result
I have a lengthy script which works perfectly in Catalina.

I just upgraded to Big Sur 11.2.1 and ran into the same message: "The file path you specified is invalid"

The Feedback ID is: FB8893569

Can you retest this on the currently seeded macOS 11.3b2?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Hello eskimo,

Confirmed that it's now working in macOS 11.3b2.

Thank you!
Hello Eskimo/Akash

We are still seeing same issue on 11.3b2. Error is still same "The file path you specified is invalid".
Akash, did same command worked like "sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add Path"?

We are still seeing same issue on 11.3b2.

In that case you should do what jimhall did and file a bug about this. Make sure to reference the previous bug (FB8893569) in your new bug and explain how you’re testing this. Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
socketfilterfw failing to add daemon on Big Sur 11.0.1 Beta
 
 
Q