Accept incoming network connections (OSX) during development


#1

Hi, I’m running into a bit of an annoyance when developing an Electron app that also runs a server.

I am using Electron to package my app and also for the settings of the app, but I am also running an express.js server that can be accessed via a regular browser on the user’s computer.

Whenever I start my app, I get a message from OSX saying “Do you want the application “Electron.app” to accept incoming network connections?” (it seems it’s asking because of the express server). This becomes a real hassle as each time I change some code and restart the app I have to click on the Allow button.
Screenshot: http://i.imgur.com/vGdzhtU.jpg

I tried codesigning the Electron.app app in my node_modules/electron-prebuilt/dist/ folder, but that didn’t seem to fix it.

Has anyone else run in to this issue or have any ideas?

Cheers.


#2

Ok, I think I figured it out. It turns out you need to sign the Electron binary inside the Electron.app, rather than Electron.app.


#3

Hi. Does app signing help to get rid of this message?
Is there any way to avoid it without app signing? I work on more hobby project so do not want to hassle with developer program too much.


#4

Hi. Does app signing help to get rid of this message?

I think it did, it’s been a while since I’ve worked on this project though.

Is there any way to avoid it without app signing? I work on more hobby project so do not want to hassle with developer program too much.

You can self-sign the app if you’re just running it for yourself. Here is the gulp task that I used for that: https://github.com/Darkle/MarkSearch/blob/master/gulpTasks/selfsignElectronForDev.js