Repository navigation
Many macOS popups asking for incoming connections appear when running test suite for the first time #37233
Description
Activity
If you run
tools/macos-firewall.shbefore the test suite it should help.Reacted by David CARLIER- addedbuildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.macosIssues and PRs related to the macOS platform.Issues and PRs related to the macOS platform.
on Feb 9, 2021 This depends on your firewall settings. It doesn't seem to happen on a default macOS setup, but tends to happen if you have a managed macOS machine or if the firewall settings are otherwise adjusted to be sufficiently strict.
I don't think there's much to do about this other than perhaps document the existence of
tools/macos-firewall.sha bit more prominently than it's currently documented?I'm going to close this but feel free to comment or re-open if you think there's more to discuss and/or more to do here.
Reacted by David CARLIERI realise that
tools/macos-firewall.shwill solve this issue and I do have custom firewall config on my system.
But my intention of creating this issue was to bring the infinite popups to your notice.
In my opinion, even if I have not run thetools/macos-firewall.sh, I should see only one popup.In my opinion, even if I have not run the
tools/macos-firewall.sh, I should see only one popup.I'm not sure how we'd achieve that unless we run all the tests that require network access with a single invocation of
node.I followed the BUILDING.md file along with the feedback in this discussion.
I built node.js using make. It was successful, or at least I think so. This is how my build ended in terminal:-
After that, I executed
tools/macos-firewall.shbut this is what happens:-Regardless, I ran the tests. The popups showed. All of em.
Am I missing something?
More Information:-
OS: macOS Big SurThe output you show is expected. (I know it looks like a bunch of errors and brokenness, but I think what the script does is try everything possible, and only one or two of those are supposed to succeed.)
I think the docs may incorrectly be specifying to run the script with
sudo. I run it withoutsudoand it works. Any chance running it withoutsudoworks for you?The output you show is expected. (I know it looks like a bunch of errors and brokenness, but I think what the script does is try everything possible, and only one or two of those are supposed to succeed.)
I think the docs may incorrectly be specifying to run the script with
sudo. I run it withoutsudoand it works. Any chance running it withoutsudoworks for you?It works without
sudofor me. Getting the same output I shared above.Perhaps there is some change required for macOS Big Sur though for this script to work with it. Unfortunately I'm no longer using a mac and don't really have a good way to test/fix this 😞
It works without
sudofor me. Getting the same output I shared above.When you say it works without
sudo, does that mean that running it withoutsudomeans you no longer get all those dialogue boxes when running tests? If so, then the fix here I guess is to update the documentation. I'm not sure if the answer is to removesudoor to suggest that it may require omittingsudo. (Like I said, I never run it withsudo.)As for the output, it has always been that way, so I'm not too concerned about that (although if someone wants to fix it without affecting the script working across various macOS versions, then great).
It works without
sudofor me. Getting the same output I shared above.When you say is works without
sudo, does that mean that running it withoutsudomeans you no longer get all those dialogue boxes when running tests? If so, then the fix here I guess is to update the documentation. I'm not sure if the answer is to removesudoor to suggest that it may require omittingsudo. (Like I said, I never run it withsudo.)As for the output, it has always been that way, so I'm not too concerned about that (although if someone wants to fix it without affecting the script working across various macOS versions, then great).
Unfortunately, running the script with or without
sudodid not help. I am still seeing the popups.
On a side note, the tests are running without any problems as the popups keep coming.10 remaining items
I see at https://developer.apple.com/forums/thread/666222?answerId=646899022#646899022 that @Qard has run into this problem. Maybe he knows something more than what we've figured out so far.
Based on that thread, it appears this may be a bug in Big Sur that may be fixed in an upcoming update.
Reacted by akhil marsonyaCan confirm that now that I've updated to Big Sur, I'm seeing the same behavior. And it sure seems like a Big Sur bug.
Can confirm that now that I've updated to Big Sur, I'm seeing the same behavior. And it sure seems like a Big Sur bug.
Apple patching up Big Sur might take some time.
Is there an alternative for the meantime? Something that can be done manually?- added a commit that references this issue
on Mar 23, 2021 Apple patching up Big Sur might take some time.
Is there an alternative for the meantime? Something that can be done manually?I'm not sure if any or all of these will work, but you can try:
1: You can go to System Preferences -> Security & Privacy -> Firewall -> Firewall Options and use the GUI to add your
nodebinary and set it to "Allow incoming connections".2: I just tried this and it worked, surprisingly to me.
tools/test.py test/parallel/test-httpwill run one test that results in the dialogue box. I clicked "Allow" after the test finished and subsequent test runs did not result in the dialogue box showing up. I won't be surprised if that doesn't work, but it sure seemed to work for me.
¯\(ツ)/¯3: Last resort, not recommended, but you can turn off the firewall entirely either from the command line or in the System Preferences -> Security & Privacy -> Firewall GUI.
Apple patching up Big Sur might take some time.
Is there an alternative for the meantime? Something that can be done manually?I'm not sure if any or all of these will work, but you can try:
1: You can go to System Preferences -> Security & Privacy -> Firewall -> Firewall Options and use the GUI to add your
nodebinary and set it to "Allow incoming connections".2: I just tried this and it worked, surprisingly to me.
tools/test.py test/parallel/test-httpwill run one test that results in the dialogue box. I clicked "Allow" after the test finished and subsequent test runs did not result in the dialogue box showing up. I won't be surprised if that doesn't work, but it sure seemed to work for me.
¯_(ツ)_/¯3: Last resort, not recommended, but you can turn off the firewall entirely either from the command line or in the System Preferences -> Security & Privacy -> Firewall GUI.
nodeis already set in Firewall Options. So 1 doesn't work for me.
I tried 2. Did not work.
I am uncomfortable with 3 :)So, for the time being, I will just let the popups appear when I am running the full test suite. Takes like 5 mins only anyways. The popups are not at all a big problem when running tests for a specific subsystem. So that's a relief.
I really appreciate you looking into this and thanks for the options :)
nodeis already set in Firewall Options. So 1 doesn't work for me.I imagine it says "Allow incoming connections" rather than "Block incoming connections". If not, definitely change it to "Allow".
If that doesn't work, one last thing to try might be to remove it and re-add it, just in case it's been added at a different path or something like that.
Reacted by akhil marsonyaI imagine it says "Allow incoming connections" rather than "Block incoming connections". If not, definitely change it to "Allow".
It did say "Allow Incoming connections". But did not work earlier.
If that doesn't work, one last thing to try might be to remove it and re-add it, just in case it's been added at a different path or something like that.
Then, I took your suggestion. Removed
nodeandcctestfrom firewall options and added them again.
It worked like a Charm. Thanks.Reacted by Rich Trott- added 2 commits that reference this issue
on Mar 29, 2021 - added a commit that references this issue
on May 1, 2021 I'm having somehow a similar issue, where I believe running
make -j8 testcreates a new executable, and therefore dismisses the integrity check on the firewall and invalidates thetools/macos-firewall.shchanges on macOS Monterey 12.4 on M1. The only thing worked for me is to disable the firewall, but I'm interested in a better alternative. Anyone solved this?


I saw 10s of popups in MacOS asking "Do you want the application node to accept incoming network connections?" when I ran the test suite. They just keep coming, 1 every 5-10 seconds. The only way to stop is force close vscode. Happened when I ran
./configure && make -j4 test.What steps will reproduce the bug?
./configure && make -j4 testHow often does it reproduce? Is there a required condition?
This happened twice.
First time, I did not allow. Simply force closed vscode.
I wanted to try again to get a screenshot this time.
So I ran the test suite a second time, got the screenshot and allowed the application to get incoming calls.
What is the expected behavior?
One popup must be enough.
What do you see instead?
I see 10s of popups. They keep increasing. 1 every 5-10 seconds.
Additional information
The only way to make it stop is to force close vscode. The popups just keep coming.