Electron-builder macOS notarization problem with puppeteer library: Not all binaries are signed

662 Views Asked by At

I am currently struggling with notarizing my app with electron builder for macOS! The app uses puppeteer which causes the error that the ".localChromium" folder does not get signed! I already tried a lot of things but I was not able to fix this problem.

Here is my configuration for the package.json file:

"build": {
"asar": true,
"asarUnpack": "node_modules/puppeteer/.local-chromium/**/*",
"publish": [
  {
    "provider": "generic",
    "url": "http://www.someProvider.com"
  }
],
"appId": "SomeApp",
"afterSign": "notarize.js",
"mac": {
  "icon": "build/logo.png",
  "category": "public.app-category.productivity",
  "target": [
    "dmg", "zip"
  ],
  "signIgnore": "/node_modules/puppeteer/.local-chromium/",
  "gatekeeperAssess": false
}

This is just the lastest configuration I tried! (I read about the signIgnore property on a GitHub post where someone mentioned a similar problem and was able to fix it with this, but this hasn't changed anything - I tried multiple paths in case this one is a wrong expression). I also tried to set the "hardendedRuntime" property to true.

To use puppeteer-core is not an option!

These are some errors I receive - they all state that the content in the .localChromium folder isn't signed:

enter image description here

Does anyone know how to fix this problem?

1

There are 1 best solutions below

0
On

I solved this by using puppeteer-in-electron. Just replace import puppeteer from 'puppeteer' with import puppeteer from 'puppeteer-core'. That way .local-chromium wont be included with your electron app because it will just use the chromium that is built in along with electron. You will also need to remove puppeteer from package.json