Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign failed: Cannot read property 'nodeName' of null #199

Closed
steffanhalv opened this issue Jul 19, 2019 · 4 comments
Closed

Sign failed: Cannot read property 'nodeName' of null #199

steffanhalv opened this issue Jul 19, 2019 · 4 comments

Comments

@steffanhalv
Copy link

steffanhalv commented Jul 19, 2019

I get this error when I try to sign app, even with no arguments:

cmd

electron-osx-sign "dist/mas-dev/electron-quick-start.app" --platform=mas --type=development --identity="xxx@gmail.com (XXX)" --entitlements="entitlements.mas.plist" --provisioning-profile="development.provisionprofile" --hardened-runtime

or

electron-osx-sign "dist/mas-dev/electron-quick-start.app" --platform=mas --type=development

returns

Sign failed:
Cannot read property 'nodeName' of null

Project copied from here with only electron-builder installed in addition:
https://github.com/electron/electron-quick-start

Else, only the following files has been added and changed:

entitlements.mas.inherit.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.inherit</key>
    <true/>
  </dict>
</plist>

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/>
  </dict>
</plist>

package.json

{
  "name": "electron-quick-start",
  "version": "1.0.0",
  "main": "main.js",
  "scripts": {
    "build": "electron-builder"
  },
  "build": {
    "appId": "com.electron.electron-quick-start",
    "mas": {
      "entitlements": "entitlements.mas.plist",
      "entitlementsInherit": "entitlements.mas.inherit.plist"
    },
    "mac": {
      "target": [
        {
          "target": "mas-dev"
        }
      ]
    }
  },
  "author": "GitHub",
  "devDependencies": {
    "electron": "^5.0.7",
    "electron-builder": "^21.1.1"
  }
}

Certs was also just created:
Skjermbilde 2019-07-19 kl  20 19 08

DEBUG:

electron-osx-sign electron-osx-sign@0.4.11 +0ms
  electron-osx-sign `identity` passed in arguments. +12ms
  electron-osx-sign Executing... security find-identity -v +1ms
  electron-osx-sign Identity: 
 > Name: Mac Developer: xxx@gmail.com (XXX) 
 > Hash: xxx +157ms
  electron-osx-sign Found 1 identity. +1ms
  electron-osx-sign:warn No `entitlements-inherit` passed in arguments: 
 * Sandbox entitlements file for enclosing app files is default to: /Users/steffanhalvorsen/.nvm/versions/node/v11.13.0/lib/node_modules/electron-osx-sign/default.entitlements.mas.inherit.plist +0ms
  electron-osx-sign Pre-sign operation enabled for provisioning profile: 
 * Disable by setting `pre-embed-previsioning-profile` to `false`. +0ms
  electron-osx-sign Pre-sign operation enabled for entitlements automation with versions >= `1.1.1`: 
 * Disable by setting `pre-auto-entitlements` to `false`. +0ms
  electron-osx-sign `provisioning-profile` passed in arguments. +1ms
  electron-osx-sign Executing... security cms -D -i development.provisionprofile +0ms
  electron-osx-sign Provisioning profile: 
 > Name: development 
 > Platforms: [ 'darwin', 'mas' ] 
 > Type: development 
 > Path: development.provisionprofile 
 > Message: { AppIDName: 'XXX',
  ApplicationIdentifierPrefix: [ 'XXX' ],
  CreationDate: 2019-07-19T16:37:31.000Z,
  Platform: [ 'OSX' ],
  IsXcodeManaged: false,
  DeveloperCertificates:
   [ <Buffer ... 1373 more bytes> ],
  Entitlements:
   { 'com.apple.application-identifier': 'xxx.com.xxx.XXX',
     'keychain-access-groups': [ 'XXX.*' ],
     'com.apple.developer.team-identifier': 'XXX' },
  ExpirationDate: 2020-07-18T16:37:31.000Z,
  Name: 'development',
  ProvisionedDevices: [ 'xxx' ],
  TeamIdentifier: [ 'XXX' ],
  TeamName: 'xxx',
  TimeToLive: 365,
  UUID: 'xxx',
  Version: 1 } +56ms
  electron-osx-sign Looking for existing provisioning profile... +5ms
  electron-osx-sign Embedding provisioning profile... +1ms
  electron-osx-sign Copying file... 
 > Source: development.provisionprofile 
 > Target: dist/mas-dev/electron-quick-start.app/Contents/embedded.provisionprofile +0ms
  electron-osx-sign Automating entitlement app group... 
 > Info.plist: dist/mas-dev/electron-quick-start.app/Contents/Info.plist 
 > Entitlements: entitlements.mas.plist +5ms
  electron-osx-sign Sign failed: +3ms
  electron-osx-sign Cannot read property 'nodeName' of null +0ms
@steffanhalv
Copy link
Author

Looks like this was a problem caused by electron-builder ref electron-userland/electron-builder#4048

@lanistor
Copy link

lanistor commented Apr 3, 2020

Remove com.apple.security.app-sandbox from your entitlements' file. electron-userland/electron-builder/4048/511095310

@steffanhalv
Copy link
Author

Remove com.apple.security.app-sandbox from your entitlements' file. electron-userland/electron-builder/4048/511095310

Sanbox is required for the mac app store

@lanistor
Copy link

lanistor commented Apr 3, 2020

Yeah, it's.
I haven't resolved it. I'm facing crash problem with mas and mas-dev build target, it's really hard to resolve: electron-userland/electron-builder#4834

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants