How to fix that Puppeteer popup
... what puppeteer popup?
Or, "Do you want to the application Chromium.app to accept incoming network connections?"
This popup can be very annoying when running your testset headed. None of the relevant memes are work appropriate.
Okay so how do I fix it
The underlying problem is not actually puppeteer, exactly. It's that npm
doesn't have the
authority to sign mac apps, so when it installs and builds chrome, it's an untrusted app, and
the firewall will warn you every time it tries, thinking it's some 1337 r00t haxore kit.
In order to fix it, what you need to do is tell the operating system that the app is explicitly trusted. There are two steps to that, one one-time, and one (unfortunately) every time you reinstall
That's great, I'll just script it and
Giving trust to a script to manage the keychain is an exceptionally poor idea. Don't do it.
Just get the step from this gist manually. How often do you update puppeteer?
Fine, what do I do by hand
The one-time part is to create a self-signed certificate by which you can manually anoint an app.
The every-time part is using it to anoint that install of puppeteer.
- One time, create the certificate
- Using spotlight search, open
Keychain Access
- Under the menu
Keychain Access
,- go to the sub-menu
Certificate Assistant
, then - hit
Create a self-signed certificate
- Give it an obvious name. I use
Puppeteer signing certificate
- Identity type should be
self-signed root
- Let the rest of the defaults go
- go to the sub-menu
- Using spotlight search, open
- Each install, apply it to Chromium
- Under our stack, it's in
node_modules/puppeteer/.local-chromium/mac-
(some number)/chrome-mac/Chromium.app
- That number varies per build, but it's usually the only one, so tab complete it
- The correct form of the command is this, with the number fixed :
sudo codesign -s Puppeteer -f ./node_modules/puppeteer/.local-chromium/mac-674921/chrome-mac/Chromium.app --deep
- got stuck in an apparently infinite series of requests for my password
:/
- got stuck in an apparently infinite series of requests for my password
- Under our stack, it's in
After that, you should no longer receive the popups.