question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mac App Store Signing Fails With ENOENT: no such file or directory, unlink

See original GitHub issue
  • Version: 21.2.0
  • Target: Mac App Store (MAS)

When I run electron-builder, and I specify that I want to create a Mac App Store version:

        "mac": {
            "type": "distribution",
            "target": [
                {
                    "target": "pkg"
                },
                {
                    "target": "dmg"
                },
                {
                    "target": "zip"
                },
                {
                    "target": "mas"
                }
            ],
            "hardenedRuntime": true,
            "gatekeeperAssess": false,
            "entitlements": "certs/entitlements.mac.plist",
            "entitlementsInherit": "certs/entitlements.mac.plist",
            "provisioningProfile": "embedded.provisionprofile",
            "category": "public.app-category.productivity",
            "icon": "desktop/icon.icns",
            "files": [
                "icon.icns",
                "tray.png",
                "tray@2x.png"
            ]
        }
        "mas": {
            "type": "distribution",
            "category": "public.app-category.productivity",
            "entitlements": "certs/entitlements.mas.plist",
            "entitlementsInherit": "certs/entitlements.mas.plist",
            "provisioningProfile": "embedded.provisionprofile",
            "icon": "desktop/icon.icns",
            "files": [
                "icon.icns",
                "tray.png",
                "tray@2x.png"
            ]
        },

The standalone mac version signs just fine. But when it gets to the MAS version, it fails with the following error:

• signing         file=electronbuild/mas/myapp.app identityName=Developer ID Application.......... provisioningProfile=embedded.provisionprofile
  ⨯ ENOENT: no such file or directory, unlink '/var/folders/rp/rvsxk1sx5l199p96hxtncflj2v3g7p/T/c4268fc22b00dab5be25354ae494f3b70fa01b40.plist'  stackTrace=
                                                                                                                                                   Error: ENOENT: no such file or directory, unlink '/var/folders/rp/rvsxk1sx5l199p96hxtncflj2v3g7p/T/c4268fc22b00dab5be25354ae494f3b70fa01b40.plist'
                                                                                                                                                       at runCallback (timers.js:694:18)
                                                                                                                                                       at tryOnImmediate (timers.js:665:5)
                                                                                                                                                       at processImmediate (timers.js:647:5)
                                                                                                                                                   From previous event:
                                                                                                                                                       at module.exports.getProvisioningProfileAsync (/Users/erickm/work/broadvoice.communicator/node_modules/app-builder-lib/electron-osx-sign/util-provisioning-profiles.js:66:6)
                                                                                                                                                       at module.exports.preEmbedProvisioningProfile (/Users/johndoe/work/myapp/node_modules/app-builder-lib/electron-osx-sign/util-provisioning-profiles.js:153:14)
                                                                                                                                                       at /Users/johndoe/work/myapp/node_modules/app-builder-lib/electron-osx-sign/sign.js:327:15
(node:16971) UnhandledPromiseRejectionWarning: Error: Command failed: codesign --sign D6BBB06A458F54EF7753EE9E20B62DA7B7B67DB6 --force --keychain /var/folders/rp/rvsxk1sx5l199p96hxtncflj2v3g7p/T/459f55100f305cd801c67e4b6f88c408f2899ac54a69abffa33deed71e0337ee.keychain --options runtime --entitlements ### certs/entitlements.mac.plist
error: The specified item could not be found in the keychain.

It seems to be trying to generate a temp plist file, but then the file can’t be found. I tested my directory, it’s not requiring sudo to create files in it. The file seems to not be created when it should be?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
JCBsystemcommented, Sep 20, 2019

better workaround build one target at the time

1reaction
JCBsystemcommented, Sep 17, 2019

dirty work around go to /node_modules/app-builder-lib/electron-osx-sign/util-provisioning-profiles.js:66:6 and comment out the unlink

you may have to build 2 times

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: ENOENT: no such file or directory, unlink - Stack Overflow
Consider like you are in app.js file and give the relative path of deleting file to the fs.unlink('path/to/file') . it will work!
Read more >
Error: ENOENT: no such file or directory, unlink '<PATH>'.
It works fine and deletes as expected. However after about a minute the node server throws the error: [Error: ENOENT: no such file...
Read more >
How to fix: npm ERR! enoent ENOENT: no such file or ...
I recently struggled for a while with an npm error thrown when executing npm install of some package. The error message was npm...
Read more >
Enoent No Such File Or Directory Android
Error : ENOENT: no such file or directory, open 'android\app. hello, my RP2 died in may after i turned it off and it...
Read more >
Safely open apps on your Mac - Apple Support
If there's ever a problem with an app, Apple can quickly remove it ... outside the App Store, macOS checks the Developer ID...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found