镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Avoiding firewall warnings on macOS Sierra when built from source #8911

Description

@gibfahn
  • Version: master
  • Platform: macOS Sierra (10.12)
  • Subsystem: test

I've been getting this popup a bunch of times after running make -j8 test, does anyone know a good way of avoiding this when building/testing node?

Do you want the application “node” to accept incoming network connections?

image

Activity

  1. MylesBorins commented on Oct 3, 2016

    @MylesBorins
    Contributor

    AFAIK the only real solution is to turn off the firewall. Since you are making a new binary each compile you are going to have to make a new firewall rule each time.

    Will be very happy if I'm wrong

  2. gibfahn commented on Oct 3, 2016

    @gibfahn
    MemberAuthor

    😭

  3. added
    testIssues and PRs related to Node.js core tests and test infrastructure.
    macosIssues and PRs related to the macOS platform.
    on Oct 3, 2016
  4. changed the title [-]Avoiding firewall warnings on macOS Sierra[/-] [+]Avoiding firewall warnings on macOS Sierra when built from source[/+] on Oct 4, 2016
  5. gibfahn commented on Oct 7, 2016

    @gibfahn
    MemberAuthor

    I'll close this as it doesn't look like there's a better option. If anyone has any better ideas please do comment.

  6. danbev commented on Nov 1, 2016

    @danbev
    Contributor

    Not sure that this will work in all cases but this has been working for me after I upgrade/reboot my system. Just throwing this out there incase it might be useful:

    #/bin/bash
    FW="/usr/libexec/ApplicationFirewall/socketfilterfw"
    # Duplicating these commands on purpose as the symbolic link node might be
    # linked to either out/Debug/node or out/Release/node depending on the BUILDTYPE
    $FW --remove $PWD/out/Debug/node
    $FW --remove $PWD/out/Debug/node
    $FW --remove $PWD/out/Release/node
    $FW --remove $PWD/out/Release/node
    $FW --listapps
    
    $FW --add $PWD/out/Debug/node
    $FW --add $PWD/out/Release/node
    $FW --add $PWD/node
    
    $FW --unblock $PWD/out/Debug/node
    $FW --unblock $PWD/out/Release/node
    $FW --unblock $PWD/node
    
    $FW --listapps
  7. danbev commented on Nov 30, 2016

    @danbev
    Contributor

    @gibfahn @thealphanerd I've been using the above script and this sorts out the firewall issue for me when it happens. I'm wondering if this might be nice to have checked into the tools directory or some other place place (and perhaps a note somewhere in BUILDING.MD pointing to it so that people can find it?

  8. gibfahn commented on Nov 30, 2016

    @gibfahn
    MemberAuthor

    @danbev Having it as a standard script makes sense to me. If people working on core are unblocking their firewalls with ad-hoc scripts (or disabling them entirely), we should definitely have a standard script that people can run.

    Do you know what causes this script to need to be rerun? Is it because the firewall sees a new node binary when you rebuild node?

  9. danbev commented on Dec 2, 2016

    @danbev
    Contributor

    Do you know what causes this script to need to be rerun? Is it because the firewall sees a new node binary when you rebuild node?

    I'm still not sure what the exact reason is but for me I have to re-run the script after a reboot. But I've also had to do it occasionally after updating my master branch. I first thought it had to do with the node, out/Debug/node, and out/Release/node files being modified/replaced, but I can remove them and rebuild without having to re-run the firewall script. I need to look into this a little more to understand it fully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    macosIssues and PRs related to the macOS platform.testIssues and PRs related to Node.js core tests and test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions