Electron-builder: TypeError: Cannot read property 'com.apple.security.app-sandbox' of null

Created on 17 Sep 2019  Â·  3Comments  Â·  Source: electron-userland/electron-builder

Got this error while building.

Here is full Log :

  • electron-builder  version=21.2.0 os=18.7.0
  • loaded configuration  file=package.json ("build" field)
  • effective config  config=
                        directories:
                          output: release
                          buildResources: build
                        appId: desktop.clovis.app
                        extends: null
                        productName: Clovis
                        files:
                          - filter:
                              - ./build/**/*
                              - ./src/**/*
                              - ./main.js
                        dmg:
                          contents:
                            - x: 110
                              'y': 270
                            - x: 370
                              'y': 270
                              type: link
                              path: /Applications
                        mac:
                          category: public.app-category.productivity
                          hardenedRuntime: true
                          entitlements: .build/entitlements.mac.plist
                          extendInfo:
                            CFBundleURLName: clovis
                            CFBundleURLSchemes:
                              - clovis
                            NSUserNotificationAlertStyle: alert
                          target:
                            - dmg
                            - zip
                            - pkg
                            - mas
                          icon: icon.icns
                        mas:
                          category: public.app-category.productivity
                          entitlements: build/entitlements.mas.plist
                          entitlementsInherit: build/entitlements.mas.inherit.plist
                          type: distribution
                          icon: icon.icns
                        linux:
                          category: productivity
                          icon: build/1024x1024.png
                          target:
                            - AppImage
                        win:
                          target: nsis
                          icon: build/icons/win/icon.ico
                          certificateFile: build/clovis_sectigo_cert.p12
                          verifyUpdateCodeSignature: true
                          publisherName: CLOTILDE

  • writing effective config  file=release/builder-effective-config.yaml
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder node-dep-tree --dir /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop
  • unresolved deps  unresolved=is-wslsemvershellwordswhichgrowly nodeModuleDir=/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules round=0
  • unresolved deps  unresolved=semversource-map-supportpakolazy-valfs-extra-pjs-yamllodash.isequal
                     nodeModuleDir=/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules
                     round=0
  • unresolved deps  unresolved=semver nodeModuleDir=/Users/clementfradetnormand/node_modules round=1
  • unresolved deps  unresolved=bluebird nodeModuleDir=/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules round=0
  • unresolved deps  unresolved=fs-extra-pbluebird-lstsax nodeModuleDir=/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules round=0
  • unresolved deps  unresolved=fs-extra-p nodeModuleDir=/Users/clementfradetnormand/node_modules round=1
  • unresolved deps  unresolved=ms nodeModuleDir=/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules round=0
  • unresolved deps  unresolved=bluebird nodeModuleDir=/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules round=0
  • unresolved deps  unresolved=bluebird nodeModuleDir=/Users/clementfradetnormand/node_modules round=1
  • unresolved deps  unresolved=graceful-fsjsonfileuniversalify nodeModuleDir=/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules round=0
  • unresolved deps  unresolved=graceful-fs nodeModuleDir=/Users/clementfradetnormand/node_modules round=0
  • unresolved deps  unresolved=argparseesprima nodeModuleDir=/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules round=0
  • unresolved deps  unresolved=mkdirpjsonfile nodeModuleDir=/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules round=0
  • unresolved deps  unresolved=jsonfile nodeModuleDir=/Users/clementfradetnormand/node_modules round=1
  • exited          command=app-builder code=0 pid=19274 out=[{"dir":"/Users/clementfradetnormand/node_modules","deps":[{"name":"bluebird","version":"2.11.0"},{"name":"graceful-fs","version":"4.1.9","optional":true},{"name":"jsonfile","version":"2.4.0"},{"name":"semver","version":"5.3.0"}]},{"dir":"/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules","deps":[{"name":"argparse","version":"1.0.10"},{"name":"bluebird","version":"3.5.4"},{"name":"bluebird-lst","version":"1.0.9"},{"name":"buffer-from","version":"1.1.1"},{"name":"electron-is-dev","version":"1.1.0"},{"name":"electron-updater","version":"4.0.6"},{"name":"electron-window-state","version":"5.0.3"},{"name":"electron-windows-badge","version":"1.0.5"},{"name":"esprima","version":"4.0.1"},{"name":"fs-extra-p","version":"7.0.1"},{"name":"graceful-fs","version":"4.1.15"},{"name":"growly","version":"1.3.0"},{"name":"howler","version":"2.1.1"},{"name":"is-wsl","version":"1.1.0"},{"name":"isexe","version":"2.0.0"},{"name":"js-yaml","version":"3.13.1"},{"name":"jsonfile","version":"4.0.0"},{"name":"lazy-val","version":"1.0.4"},{"name":"lodash.isequal","version":"4.5.0"},{"name":"mkdirp","version":"0.5.1"},{"name":"ms","version":"2.1.1"},{"name":"node-machine-id","version":"1.1.12"},{"name":"node-notifier","version":"5.4.0"},{"name":"pako","version":"1.0.10"},{"name":"sax","version":"1.2.4"},{"name":"semver","version":"5.7.0"},{"name":"shellwords","version":"0.1.1"},{"name":"source-map","version":"0.6.1"},{"name":"source-map-support","version":"0.5.12"},{"name":"sprintf-js","version":"1.0.3"},{"name":"ua-parser-js","version":"0.7.20"},{"name":"universalify","version":"0.1.2"},{"name":"which","version":"1.3.1"}]},{"dir":"/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules/bluebird-lst/node_modules","deps":[{"name":"bluebird","version":"3.5.5"}]},{"dir":"/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules/electron-updater/node_modules","deps":[{"name":"bluebird-lst","version":"1.0.7"},{"name":"builder-util-runtime","version":"8.1.1"},{"name":"debug","version":"4.1.1"}]},{"dir":"/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules/fs-extra-p/node_modules","deps":[{"name":"bluebird-lst","version":"1.0.7"},{"name":"fs-extra","version":"7.0.1"}]},{"dir":"/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/node_modules/mkdirp/node_modules","deps":[{"name":"minimist","version":"0.0.8"}]}]
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder rebuild-node-modules cwd=/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop
  • map async       taskCount=6
  • map async       taskCount=1
  • map async       taskCount=1
  • map async       taskCount=33
  • map async       taskCount=2
  • map async       taskCount=4
  • map async       taskCount=3
  • no native dependencies
  • exited          command=app-builder code=0 pid=19275
  • packaging       platform=darwin arch=x64 electron=6.0.9 appOutDir=release/mac
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder unpack-electron --configuration [{"platform":"darwin","arch":"x64","version":"6.0.9"}] --output /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/mac --distMacOsAppName Electron.app
  • packaging       platform=mas arch=x64 electron=6.0.9 appOutDir=release/mas
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder unpack-electron --configuration [{"platform":"mas","arch":"x64","version":"6.0.9"}] --output /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/mas --distMacOsAppName Electron.app
  • map async       taskCount=2
  • map async       taskCount=1
  • map async       taskCount=2
  • map async       taskCount=1
  • map async       taskCount=228
  • map async       taskCount=334
  • exited          command=app-builder code=0 pid=19276
  • exited          command=app-builder code=0 pid=19277
  • async task error  error=pattern.startsWith is not a function
(node:19273) UnhandledPromiseRejectionWarning: TypeError: pattern.startsWith is not a function
    at FileMatcher.normalizePattern (/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/fileMatcher.ts:58:17)
    at FileMatcher.patterns.map.it (/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/fileMatcher.ts:53:54)
    at Array.map (<anonymous>)
    at new FileMatcher (/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/fileMatcher.ts:53:39)
    at computeNodeModuleFileSets (/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/util/appFileCopier.ts:200:21)
(node:19273) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:19273) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder decode-plist -f /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/mas/Electron.app/Contents/Info.plist -f /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/mas/Electron.app/Contents/Frameworks/Electron Helper.app/Contents/Info.plist -f /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/mas/Electron.app/Contents/Frameworks/Electron Helper EH.app/Contents/Info.plist -f /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/mas/Electron.app/Contents/Frameworks/Electron Helper NP.app/Contents/Info.plist -f /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/mas/Electron.app/Contents/Frameworks/Electron Helper (Renderer).app/Contents/Info.plist -f /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/mas/Electron.app/Contents/Frameworks/Electron Helper (Plugin).app/Contents/Info.plist -f /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/mas/Electron.app/Contents/Frameworks/Electron Helper (GPU).app/Contents/Info.plist -f /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/mas/Electron.app/Contents/Library/LoginItems/Electron Login Helper.app/Contents/Info.plist
  • map async       taskCount=8
  • exited          command=app-builder code=0 pid=19287 out=[{"CFBundleName":"Electron","CFBundlePackageType":"APPL","CFBundleShortVersionString":"6.0.9","DTCompiler":"com.apple.compilers.llvm.clang.1_0","DTSDKBuild":"10.13","LSMinimumSystemVersion":"10.10.0","CFBundleExecutable":"Electron","DTXcodeBuild":"9F2000","NSCameraUsageDescription":"This app needs access to the camera","NSHighResolutionCapable":true,"NSMicrophoneUsageDescription":"This app needs access to the microphone","CFBundleIdentifier":"com.github.Electron","CFBundleIconFile":"electron.icns","DTXcode":"0941","LSApplicationCategoryType":"public.app-category.developer-tools","NSMainNibFile":"MainMenu","NSSupportsAutomaticGraphicsSwitching":true,"BuildMachineOSBuild":"17D102","CFBundleInfoDictionaryVersion":"6.0","CFBundleVersion":"6.0.9","DTSDKName":"macosx10.13","NSPrincipalClass":"AtomApplication","CFBundleDisplayName":"Electron"},{"CFBundleName":"Electron Helper","DTCompiler":"com.apple.compilers.llvm.clang.1_0","DTXcode":"0941","LSUIElement":true,"NSSupportsAutomaticGraphicsSwitching":true,"BuildMachineOSBuild":"17D102","CFBundleIdentifier":"com.github.Electron.helper","DTSDKName":"macosx10.13","DTXcodeBuild":"9F2000","CFBundlePackageType":"APPL","DTSDKBuild":"10.13"},null,null,{"NSSupportsAutomaticGraphicsSwitching":true,"CFBundleName":"Electron Helper (Renderer)","LSUIElement":true,"CFBundlePackageType":"APPL","DTCompiler":"com.apple.compilers.llvm.clang.1_0","DTSDKBuild":"10.13","DTSDKName":"macosx10.13","DTXcode":"0941","DTXcodeBuild":"9F2000","BuildMachineOSBuild":"17D102","CFBundleIdentifier":"com.github.Electron.helper"},{"CFBundleIdentifier":"com.github.Electron.helper","DTSDKName":"macosx10.13","DTXcode":"0941","DTXcodeBuild":"9F2000","BuildMachineOSBuild":"17D102","CFBundlePackageType":"APPL","DTCompiler":"com.apple.compilers.llvm.clang.1_0","DTSDKBuild":"10.13","LSUIElement":true,"NSSupportsAutomaticGraphicsSwitching":true,"CFBundleName":"Electron Helper (Plugin)"},{"LSUIElement":true,"NSSupportsAutomaticGraphicsSwitching":true,"DTCompiler":"com.apple.compilers.llvm.clang.1_0","CFBundleIdentifier":"com.github.Electron.helper","CFBundleName":"Electron Helper (GPU)","CFBundlePackageType":"APPL","DTSDKBuild":"10.13","DTSDKName":"macosx10.13","DTXcode":"0941","DTXcodeBuild":"9F2000","BuildMachineOSBuild":"17D102"},{"DTCompiler":"com.apple.compilers.llvm.clang.1_0","DTSDKName":"macosx10.13","DTXcode":"0941","BuildMachineOSBuild":"17D102","CFBundleExecutable":"Electron Login Helper","CFBundleIdentifier":"com.github.Electron.loginhelper","CFBundleName":"Electron Login Helper","CFBundlePackageType":"APPL","DTSDKBuild":"10.13","DTXcodeBuild":"9F2000","LSBackgroundOnly":true}]
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder icon --format icns --root /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/build --root /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop --out /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/.icon-icns --input icon.icns
  • path resolved   path=/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/build/icon.icns outputFormat=icns
  • exited          command=app-builder code=0 pid=19288 out={"icons":[{"file":"/Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/build/icon.icns","size":0}],"isFallback":false}
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder encode-plist
  • map async       taskCount=6
  • exited          command=app-builder code=0 pid=19289
  • executing       file=security args=list-keychains -d user
  • executed        file=security stdout=
                          "/Users/clementfradetnormand/Library/Caches/electron-builder/electron-builder-root-certs.keychain"
                          "/Users/clementfradetnormand/Library/Keychains/login.keychain-db"
                          "/Users/clementfradetnormand/Library/Keychains/Microsoft_Intermediate_Certificates"
                          "/Users/clementfradetnormand/Library/Application Support/Adobe/AIR/ELS/ElephormDVDPlayer/PrivateEncryptedDatak"

  • executing       file=security args=delete-keychain /var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain
  • executing       file=security args=list-keychains -d user
  • executed        file=security stdout=
                          "/Users/clementfradetnormand/Library/Caches/electron-builder/electron-builder-root-certs.keychain"
                          "/Users/clementfradetnormand/Library/Keychains/login.keychain-db"
                          "/Users/clementfradetnormand/Library/Keychains/Microsoft_Intermediate_Certificates"
                          "/Users/clementfradetnormand/Library/Application Support/Adobe/AIR/ELS/ElephormDVDPlayer/PrivateEncryptedDatak"

  • executing       file=security args=create-keychain -p 5432b0d3e306063c0ec97f198493a05d7b2cc6313251c56195a65a17349604eb (sha256 hash) /var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain
  • executed        file=security
  • executing       file=security args=unlock-keychain -p 5432b0d3e306063c0ec97f198493a05d7b2cc6313251c56195a65a17349604eb (sha256 hash) /var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain
  • executed        file=security
  • executing       file=security args=set-keychain-settings /var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain
  • executed        file=security
  • executing       file=security args=list-keychains -d user -s /var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain /Users/clementfradetnormand/Library/Caches/electron-builder/electron-builder-root-certs.keychain /Users/clementfradetnormand/Library/Keychains/login.keychain-db /Users/clementfradetnormand/Library/Keychains/Microsoft_Intermediate_Certificates /Users/clementfradetnormand/Library/Application Support/Adobe/AIR/ELS/ElephormDVDPlayer/PrivateEncryptedDatak
  • executed        file=security
  • executing       file=security args=import /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/build/all-certs.p12 -k /var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain -T /usr/bin/codesign -T /usr/bin/productbuild -P 3d3367228f9c7665266604462ec60029bcd83ad89614021a80b2eb879c572510 (sha256 hash)
  • executed        file=security stdout=
                      4 identities imported.

  • executing       file=security args=set-key-partition-list -S apple-tool:,apple: -s -k 181920 /var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain
  • executed        file=security stdout=
                      keychain: "/private/var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain"
                      version: 256
                      class: 0x00000010
                      attributes:
                          0x00000000 <uint32>=0x00000010
                          0x00000001 <blob>="Mac Developer ID Installer: Clovis"
                          0x00000002 <blob>=<NULL>
                          0x00000003 <uint32>=0x00000001
                          0x00000004 <uint32>=0x00000000
                          0x00000005 <uint32>=0x00000000
                          0x00000006 <blob>=0x51E4A0696CBFD228DB0867039495FA717221F352  "Q\344\240il\277\322(\333\010g\003\224\225\372qr!\363R"
                          0x00000007 <blob>=<NULL>
                          0x00000008 <blob>=0x7B38373139316361322D306663392D313164342D383439612D3030303530326235323132327D00  "{87191ca2-0fc9-11d4-849a-000502b52122}\000"
                          0x00000009 <uint32>=0x0000002A  "\000\000\000*"
                          0x0000000A <uint32>=0x00000800
                          0x0000000B <uint32>=0x00000800
                          0x0000000C <blob>=0x0000000000000000
                          0x0000000D <blob>=0x0000000000000000
                          0x0000000E <uint32>=0x00000001
                          0x0000000F <uint32>=0x00000001
                          0x00000010 <uint32>=0x00000001
                          0x00000011 <uint32>=0x00000000
                          0x00000012 <uint32>=0x00000001
                          0x00000013 <uint32>=0x00000001
                          0x00000014 <uint32>=0x00000001
                          0x00000015 <uint32>=0x00000001
                          0x00000016 <uint32>=0x00000001
                          0x00000017 <uint32>=0x00000001
                          0x00000018 <uint32>=0x00000001
                          0x00000019 <uint32>=0x00000001
                          0x0000001A <uint32>=0x00000001
                      keychain: "/private/var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain"
                      version: 256
                      class: 0x00000010
                      attributes:
                          0x00000000 <uint32>=0x00000010
                          0x00000001 <blob>="Mac Developer ID Application: Clovis"
                          0x00000002 <blob>=<NULL>
                          0x00000003 <uint32>=0x00000001
                          0x00000004 <uint32>=0x00000000
                          0x00000005 <uint32>=0x00000000
                          0x00000006 <blob>=0x6A46E6F13C6C9D15E7827D422FA53B2A7FA7E805  "jF\346\361<l\235\025\347\202}B/\245;*\177\247\350\005"
                          0x00000007 <blob>=<NULL>
                          0x00000008 <blob>=0x7B38373139316361322D306663392D313164342D383439612D3030303530326235323132327D00  "{87191ca2-0fc9-11d4-849a-000502b52122}\000"
                          0x00000009 <uint32>=0x0000002A  "\000\000\000*"
                          0x0000000A <uint32>=0x00000800
                          0x0000000B <uint32>=0x00000800
                          0x0000000C <blob>=0x0000000000000000
                          0x0000000D <blob>=0x0000000000000000
                          0x0000000E <uint32>=0x00000001
                          0x0000000F <uint32>=0x00000001
                          0x00000010 <uint32>=0x00000001
                          0x00000011 <uint32>=0x00000000
                          0x00000012 <uint32>=0x00000001
                          0x00000013 <uint32>=0x00000001
                          0x00000014 <uint32>=0x00000001
                          0x00000015 <uint32>=0x00000001
                          0x00000016 <uint32>=0x00000001
                          0x00000017 <uint32>=0x00000001
                          0x00000018 <uint32>=0x00000001
                          0x00000019 <uint32>=0x00000001
                          0x0000001A <uint32>=0x00000001
                      keychain: "/private/var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain"
                      version: 256
                      class: 0x00000010
                      attributes:
                          0x00000000 <uint32>=0x00000010
                          0x00000001 <blob>="Mac Developer: Clement Fradet Normand (Clovis)"
                          0x00000002 <blob>=<NULL>
                          0x00000003 <uint32>=0x00000001
                          0x00000004 <uint32>=0x00000000
                          0x00000005 <uint32>=0x00000000
                          0x00000006 <blob>=0xA19312F072EAF2ED8FFA6BCA00AFE1746802C433  "\241\223\022\360r\352\362\355\217\372k\312\000\257\341th\002\3043"
                          0x00000007 <blob>=<NULL>
                          0x00000008 <blob>=0x7B38373139316361322D306663392D313164342D383439612D3030303530326235323132327D00  "{87191ca2-0fc9-11d4-849a-000502b52122}\000"
                          0x00000009 <uint32>=0x0000002A  "\000\000\000*"
                          0x0000000A <uint32>=0x00000800
                          0x0000000B <uint32>=0x00000800
                          0x0000000C <blob>=0x0000000000000000
                          0x0000000D <blob>=0x0000000000000000
                          0x0000000E <uint32>=0x00000001
                          0x0000000F <uint32>=0x00000001
                          0x00000010 <uint32>=0x00000001
                          0x00000011 <uint32>=0x00000000
                          0x00000012 <uint32>=0x00000001
                          0x00000013 <uint32>=0x00000001
                          0x00000014 <uint32>=0x00000001
                          0x00000015 <uint32>=0x00000001
                          0x00000016 <uint32>=0x00000001
                          0x00000017 <uint32>=0x00000001
                          0x00000018 <uint32>=0x00000001
                          0x00000019 <uint32>=0x00000001
                          0x0000001A <uint32>=0x00000001
                      keychain: "/private/var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain"
                      version: 256
                      class: 0x00000010
                      attributes:
                          0x00000000 <uint32>=0x00000010
                          0x00000001 <blob>="Mac Developer: Clement Fradet Normand (Clovis)"
                          0x00000002 <blob>=<NULL>
                          0x00000003 <uint32>=0x00000001
                          0x00000004 <uint32>=0x00000000
                          0x00000005 <uint32>=0x00000000
                          0x00000006 <blob>=0xA3C19AFFAFAF55C5350B3E5BCC9557E093D3CF6E  "\243\301\232\377\257\257U\3055\013>[\314\225W\340\223\323\317n"
                          0x00000007 <blob>=<NULL>
                          0x00000008 <blob>=0x7B38373139316361322D306663392D313164342D383439612D3030303530326235323132327D00  "{87191ca2-0fc9-11d4-849a-000502b52122}\000"
                          0x00000009 <uint32>=0x0000002A  "\000\000\000*"
                          0x0000000A <uint32>=0x00000800
                          0x0000000B <uint32>=0x00000800
                          0x0000000C <blob>=0x0000000000000000
                          0x0000000D <blob>=0x0000000000000000
                          0x0000000E <uint32>=0x00000001
                          0x0000000F <uint32>=0x00000001
                          0x00000010 <uint32>=0x00000001
                          0x00000011 <uint32>=0x00000000
                          0x00000012 <uint32>=0x00000001
                          0x00000013 <uint32>=0x00000001
                          0x00000014 <uint32>=0x00000001
                          0x00000015 <uint32>=0x00000001
                          0x00000016 <uint32>=0x00000001
                          0x00000017 <uint32>=0x00000001
                          0x00000018 <uint32>=0x00000001
                          0x00000019 <uint32>=0x00000001
                          0x0000001A <uint32>=0x00000001

  • executing       file=security args=find-identity -v /var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain
  • executing       file=security args=find-identity -v -p 7af95cecdd0c3f541bcc912b113c3ed21ed9e4c7c32f40b73a00e2b19a9500f5 (sha256 hash) /var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain
  • executed        file=security stdout=
                        1) DD515B18BF8F7747850A5E469B7CD553C58A5009 "Developer ID Application: Clovis (U3R2JY6V65)"
                        2) 5046DC20E5B312BD662F39A627B009BF5DDD3836 "Mac Developer: Clement Fradet Normand (3AGGYM23GZ)"
                        3) 12F5F16F9DC056CB6C5EA48BCB09857E6EF7553E "Mac Developer: Clement Fradet Normand (3AGGYM23GZ)"
                           3 valid identities found

  • executed        file=security stdout=
                        1) 95F7C96AD56A40B7EFA64FDC5444D0742CE94F01 "Developer ID Installer: Clovis (U3R2JY6V65)"
                        2) DD515B18BF8F7747850A5E469B7CD553C58A5009 "Developer ID Application: Clovis (U3R2JY6V65)"
                        3) 5046DC20E5B312BD662F39A627B009BF5DDD3836 "Mac Developer: Clement Fradet Normand (3AGGYM23GZ)"
                        4) 12F5F16F9DC056CB6C5EA48BCB09857E6EF7553E "Mac Developer: Clement Fradet Normand (3AGGYM23GZ)"
                           4 valid identities found

  • signing         file=release/mas/Clovis.app identityName=Developer ID Application: Clovis (U3R2JY6V65) identityHash=DD515B18BF8F7747850A5E469B7CD553C58A5009 provisioningProfile=none
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder decode-plist -f /var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/ef75cec761b465dbd0171995cf3999f0d72474f3.plist
  • map async       taskCount=1
  • exited          command=app-builder code=0 pid=19303 out=[{"AppIDName":"Desktop application of Clovis","IsXcodeManaged":false,"DeveloperCertificates":["MIIFnzCCBIegAwIBAgIIZH2JJpkObf8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBsZSBXb3JsZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBwbGUgV29ybGR3aWRlIERldmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTkwNDExMTY1NzIxWhcNMjAwNDEwMTY1NzIxWjCBkjEaMBgGCgmSJomT8ixkAQEMClUzUjJKWTZWNjUxQTA/BgNVBAMMODNyZCBQYXJ0eSBNYWMgRGV2ZWxvcGVyIEFwcGxpY2F0aW9uOiBDbG92aXMgKFUzUjJKWTZWNjUpMRMwEQYDVQQLDApVM1IySlk2VjY1MQ8wDQYDVQQKDAZDbG92aXMxCzAJBgNVBAYTAlVTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArD9h5PVvJZxHgW4txoRSl++mO6w4WMEkGtzK89TyfRHfuukjnrqd/deJtCy4F/DOS08qKgGbmUDr0wf/DDVX0QyiPSh0fzUX1MJxCR+egiwLmj+2x9jOu6dTzsm+OGlpRRybjvgxRuXKV5niOo7RvlL6K/aPdkBIWO/gLE06036fIrnO28FNUziceFZkRGBt6H8Q6h2xfPsWa+ZatliKAw2mIh50OWpwQINT1fiUh5BfYI6k+foQwtDLjzsrLHXmobp/XCLVZKFxmvXCHggTdNG/t1Wg2ZDUF7jFCeERNMkXghZcQ3fSWJF+va7PzPn8qcB6s4Bby/FBsj4k1PxZnwIDAQABo4IB8TCCAe0wDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBSIJxcJqbYYYIvs67r2R1nFUlSjtzCCAQ8GA1UdIASCAQYwggECMIH/BgkqhkiG92NkBQEwgfEwgcMGCCsGAQUFBwICMIG2DIGzUmVsaWFuY2Ugb24gdGhpcyBjZXJ0aWZpY2F0ZSBieSBhbnkgcGFydHkgYXNzdW1lcyBhY2NlcHRhbmNlIG9mIHRoZSB0aGVuIGFwcGxpY2FibGUgc3RhbmRhcmQgdGVybXMgYW5kIGNvbmRpdGlvbnMgb2YgdXNlLCBjZXJ0aWZpY2F0ZSBwb2xpY3kgYW5kIGNlcnRpZmljYXRpb24gcHJhY3RpY2Ugc3RhdGVtZW50cy4wKQYIKwYBBQUHAgEWHWh0dHA6Ly93d3cuYXBwbGUuY29tL2FwcGxlY2EvMBYGA1UdJQEB/wQMMAoGCCsGAQUFBwMDME0GA1UdHwRGMEQwQqBAoD6GPGh0dHA6Ly9kZXZlbG9wZXIuYXBwbGUuY29tL2NlcnRpZmljYXRpb25hdXRob3JpdHkvd3dkcmNhLmNybDAdBgNVHQ4EFgQUX7vxG+sEZa6vnBpWoIQ9F2UuIIswDgYDVR0PAQH/BAQDAgeAMBMGCiqGSIb3Y2QGAQcBAf8EAgUAMA0GCSqGSIb3DQEBBQUAA4IBAQCJYVhdRJdmRVlEjx/59IOuBEQt87Le1qOHNZQ/JpFSToIPXC8fytAhd7Yb6Pm3KkAKS7R4FU30HKkEuQTwsg/Zpl55CU9Fv3AGDIA43/OUUh5GzHE3WIUDAkTa76paJ6uauXJfaEbBqF5gSWWEMPHI/h7nAtHuEQ2qJU2jsjlKUPYe1U689+P31Hf8fCoDKRCIl9j5ZCPavE+GUHMk/MwWrHY3LX9PW3iazW1FhfiKGzVPVpG/Ht9Fc0ZMiwDD6mJpjoAp9oj9pKi6vvxkyN5Ni9we0soPgMnfKQeAd5xgUOz+49oBpRi6dwEx9EpVi9r0m0b+HVrVWtLttzjLsAah"],"ExpirationDate":"2020-04-10T16:57:21Z","Name":"embedded","TeamIdentifier":["U3R2JY6V65"],"Platform":["OSX"],"Entitlements":{"com.apple.application-identifier":"U3R2JY6V65.desktop.clovis.app","keychain-access-groups":["U3R2JY6V65.*"],"com.apple.developer.team-identifier":"U3R2JY6V65","com.apple.developer.aps-environment":"production","com.apple.developer.maps":true},"UUID":"00b57d18-e0d9-4bd3-bf51-b768404411ae","Version":1,"TeamName":"Clovis","ApplicationIdentifierPrefix":["U3R2JY6V65"],"CreationDate":"2019-04-11T17:20:26Z","TimeToLive":364}]
  • spawning        command=/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-bin/mac/app-builder decode-plist -f .build/entitlements.mac.plist -f /Users/clementfradetnormand/IT-Projects/Clovis-team-repo/clovis-desktop/release/mas/Clovis.app/Contents/Info.plist
  • map async       taskCount=2
  • exited          command=app-builder code=0 pid=19304 out=[null,{"CFBundlePackageType":"APPL","CFBundleExecutable":"Clovis","CFBundleIconFile":"Clovis.icns","DTSDKName":"macosx10.13","DTCompiler":"com.apple.compilers.llvm.clang.1_0","NSCameraUsageDescription":"This app needs access to the camera","NSHighResolutionCapable":true,"NSUserNotificationAlertStyle":"alert","CFBundleURLName":"clovis","CFBundleURLSchemes":["clovis"],"LSMinimumSystemVersion":"10.10.0","CFBundleInfoDictionaryVersion":"6.0","CFBundleName":"Clovis","CFBundleVersion":"4.7.0","DTSDKBuild":"10.13","DTXcode":"0941","NSPrincipalClass":"AtomApplication","CFBundleDisplayName":"Clovis","CFBundleIdentifier":"desktop.clovis.app","DTXcodeBuild":"9F2000","LSApplicationCategoryType":"public.app-category.productivity","NSHumanReadableCopyright":"Copyright © 2019 Made with passion by Clovis team","NSMicrophoneUsageDescription":"This app needs access to the microphone","NSSupportsAutomaticGraphicsSwitching":true,"BuildMachineOSBuild":"17D102","CFBundleShortVersionString":"4.7.0","AsarIntegrity":"{\"checksums\":{\"app.asar\":\"NPP/8QsZHATdRD+dCcErLLCLrNjjMitcT8HJE95woR+/z++jg6NZbZ9NytFq7+bJ6QoWiOmgs+3Nc2QlQGNdxw==\",\"electron.asar\":\"OEdnmHGLrpEwyEdYJAizh2B/3CjoOhwzb6Cn9W/hANU2VZ2AwFGbKWXI8Mzb1+Yv+7ClwNHrnlZ8RyCBqVoqtA==\"}}","NSMainNibFile":"MainMenu"}]
  • executing       file=security args=delete-keychain /var/folders/nl/hx0jxxhs1zgbhb2ktb4pzdf40000gn/T/8552a608b7336fa40c62211c98cab1d8c88382aeef4bcca2aa61d562d913db15.keychain
  • executed        file=security
  ⨯ Cannot read property 'com.apple.security.app-sandbox' of null  stackTrace=
                                                                     TypeError: Cannot read property 'com.apple.security.app-sandbox' of null
                                                                         at preAutoEntitlements (/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-lib/electron-osx-sign/util-entitlements.js:34:20)
                                                                         at process._tickCallback (internal/process/next_tick.js:68:7)
                                                                     From previous event:
                                                                         at runCallback (timers.js:705:18)
                                                                         at tryOnImmediate (timers.js:676:5)
                                                                         at processImmediate (timers.js:658:5)
                                                                     From previous event:
                                                                         at MacPackager.signApp (/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/macPackager.ts:326:27)
                                                                         at MacPackager.doPack (/usr/local/lib/node_modules/electron-builder/node_modules/app-builder-lib/src/platformPackager.ts:243:16)

Most helpful comment

I had this problem. It turned out that my entitlements file wasn't being copied into the right place, so wasn't in the location specified by the entitlements property of the package.json when code signing was taking place.

Once I sorted that out it all worked.

All 3 comments

I had this problem. It turned out that my entitlements file wasn't being copied into the right place, so wasn't in the location specified by the entitlements property of the package.json when code signing was taking place.

Once I sorted that out it all worked.

@ndtreviv to help those of us still learning the ins&outs of electron builder, how did you sort this?

Before your call to electron-builder build make sure your entitlements files are located in the place specified in the mac section of the build properties in your package.json file, ie:

If this is in the build section of your package.json file:

    "mac": {
      "category": "public.app-category.productivity",
      "icon": "build/icons/icon.icns",
      "hardenedRuntime": true,
      "gatekeeperAssess": false,
      "entitlements": "build/entitlements.mac.plist",
      "entitlementsInherit": "build/entitlements.mac.plist",
      "provisioningProfile": "embedded.provisionprofile"
    },

then make sure that your directory structure looks like this:

    ├── build/
    │   └── entitlements.mac.plist
    ├── package.json
Was this page helpful?
0 / 5 - 0 ratings