Electron-builder: Cannot create MAS build

Created on 12 Jul 2019  Â·  7Comments  Â·  Source: electron-userland/electron-builder


  • Version: 21.0.15

  • Target: MAS


Cannot create MAS build due to error by signing:

 • signing  file=dist/mas/Mega.app identityName=Mac Developer identityHash=*** provisioningProfile=res/macOS/Mac_Development.provisionprofile
 • signing  file=dist/mas/Mega.app identityName=3rd Party Mac Developer Application identityHash=*** provisioningProfile=res/macOS/Mac_App_Store.provisionprofile

 ⨯ Cannot read property 'nodeName' of null  stackTrace=
    TypeError: Cannot read property 'nodeName' of null
      at Object.parse (node_modules/plist/lib/parse.js:68:25)
      at node_modules/electron-osx-sign/util-entitlements.js:45:27
      ...

It's caused by com.apple.security.app-sandbox entitlement in my custom entitlements. When I remove com.apple.security.app-sandbox from my custom entitlements, MAS build is created. It was not causing any problems with older v20.41.0.

bug mac

Most helpful comment

Fix on the way :)

All 7 comments

+1

But if you remove the com.apple.security.app-sandbox , your app will be rejected by itc.

  • Version: 21.0.6, 21.0.15
  • Target: dmg

Got a very similar issue but slightly different log output. (From a 21.0.6 build)
Complete log can be inspected here: https://travis-ci.org/thomasnordquist/MQTT-Explorer/jobs/560047231#L606

  • signing         file=build/clean/build/mac/MQTT Explorer.app identityName=Developer ID Application: Thomas Nordquist (CSMA55Q8Q5) identityHash=91F3646D799A82FECCF76CBFAF2896EFD6A85D29 provisioningProfile=res/MQTTExplorerdmg.provisionprofile
[xmldom error]  element parse error: Error: invalid tagName:Y127.0.0.1Ylocalhost�23456@E@:@_ 
@#[line:3,col:1035]
(node:4793) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'nodeName' of null
    at Object.parse (/Users/travis/build/thomasnordquist/MQTT-Explorer/node_modules/plist/lib/parse.js:68:25)
    at /Users/travis/build/thomasnordquist/MQTT-Explorer/node_modules/electron-osx-sign/util-entitlements.js:45:27
    at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
From previous event:
    at go$readdir$cb (/Users/travis/build/thomasnordquist/MQTT-Explorer/node_modules/graceful-fs/graceful-fs.js:162:14)
    at FSReqWrap.args [as oncomplete] (fs.js:140:20)
From previous event:
    at MacPackager.signApp (/Users/travis/build/thomasnordquist/MQTT-Explorer/node_modules/app-builder-lib/src/macPackager.ts:315:27)
    at MacPackager.doPack (/Users/travis/build/thomasnordquist/MQTT-Explorer/node_modules/app-builder-lib/src/platformPackager.ts:243:16)

I downgraded to 20.44.4 for a manual OSX build.

Edit: Amend entitlements.mas.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>com.apple.security.app-sandbox</key>
    <true/>
    <key>com.apple.security.network.client</key>
    <true/>
    <key>com.apple.security.files.user-selected.read-only</key>
    <true/>
  </dict>
</plist>

Fix on the way :)

Apple blocked my account because I don't remember f* useless security questions and cannot help me even if I remember all other credentials. So, I cannot for now to verify fixes myself.

You got any other activated Apple device (iPod/Mac/iPhone)? You can normally reset yout credentials if you got an Apple device where you are still logged in.

You got any other activated Apple device (iPod/Mac/iPhone)

For security reasons my developer account was separated from personal. It seems as solution, if Apple will be not able to reset useless security questions, I will create a new account.

Was this page helpful?
0 / 5 - 0 ratings