M1 Mac Monterey 12.3 build failed with error "cannot cleanup"

See original GitHub issue
  • Electron-Builder Version: ^22.14.13
  • Node Version: v16.14.0
  • Electron Version: ^17.1.2
  • Electron Type (current, beta, nightly): current
  • Target: macos

Build log:

> electron-builder -m --arm64 --x64

  • electron-builder  version=22.14.13 os=21.4.0
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=output/app/builder-effective-config.yaml
  • packaging       platform=darwin arch=x64 electron=17.1.2 appOutDir=output/app/mac
  • skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible, see https://electron.build/code-signing allIdentities=     0 identities found
                                                Valid identities only
     0 valid identities found
  • building        target=DMG arch=x64 file=output/app/filename-x64.dmg
  • Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+
  • packaging       platform=darwin arch=arm64 electron=17.1.2 appOutDir=output/app/mac-arm64
  • skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible, see https://electron.build/code-signing allIdentities=     0 identities found
                                                Valid identities only
     0 valid identities found
  • building        target=DMG arch=arm64 file=output/app/filename-arm64.dmg
  • Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+
  ⨯ Cannot cleanup: 

Error #1 --------------------------------------------------------------------------------
Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
    at /Users/xxx/electron-project/node_modules/.pnpm/builder-util@22.14.13/node_modules/builder-util/src/util.ts:133:18
    at exithandler (node:child_process:406:5)
    at ChildProcess.errorhandler (node:child_process:418:5)
    at ChildProcess.emit (node:events:520:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Error #2 --------------------------------------------------------------------------------
Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
    at /Users/xxx/electron-project/node_modules/.pnpm/builder-util@22.14.13/node_modules/builder-util/src/util.ts:133:18
    at exithandler (node:child_process:406:5)
    at ChildProcess.errorhandler (node:child_process:418:5)
    at ChildProcess.emit (node:events:520:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)  failedTask=build stackTrace=Error: Cannot cleanup: 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Error #1 --------------------------------------------------------------------------------
Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
    at /Users/xxx/electron-project/node_modules/.pnpm/builder-util@22.14.13/node_modules/builder-util/src/util.ts:133:18
    at exithandler (node:child_process:406:5)
    at ChildProcess.errorhandler (node:child_process:418:5)
    at ChildProcess.emit (node:events:520:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Error #2 --------------------------------------------------------------------------------
Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
    at /Users/xxx/electron-project/node_modules/.pnpm/builder-util@22.14.13/node_modules/builder-util/src/util.ts:133:18
    at exithandler (node:child_process:406:5)
    at ChildProcess.errorhandler (node:child_process:418:5)
    at ChildProcess.emit (node:events:520:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
    at throwError (/Users/xxx/electron-project/node_modules/.pnpm/builder-util@22.14.13/node_modules/builder-util/src/asyncTaskManager.ts:88:11)
    at checkErrors (/Users/xxx/electron-project/node_modules/.pnpm/builder-util@22.14.13/node_modules/builder-util/src/asyncTaskManager.ts:53:9)
    at AsyncTaskManager.awaitTasks (/Users/xxx/electron-project/node_modules/.pnpm/builder-util@22.14.13/node_modules/builder-util/src/asyncTaskManager.ts:67:7)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Packager.doBuild (/Users/xxx/electron-project/node_modules/.pnpm/app-builder-lib@22.14.13/node_modules/app-builder-lib/src/packager.ts:453:5)
    at Object.executeFinally (/Users/xxx/electron-project/node_modules/.pnpm/builder-util@22.14.13/node_modules/builder-util/src/promise.ts:12:14)
    at Packager._build (/Users/xxx/electron-project/node_modules/.pnpm/app-builder-lib@22.14.13/node_modules/app-builder-lib/src/packager.ts:376:31)
    at Packager.build (/Users/xxx/electron-project/node_modules/.pnpm/app-builder-lib@22.14.13/node_modules/app-builder-lib/src/packager.ts:337:12)
    at Object.executeFinally (/Users/xxx/electron-project/node_modules/.pnpm/builder-util@22.14.13/node_modules/builder-util/src/promise.ts:12:14)
 ELIFECYCLE  Command failed with exit code 1.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

8reactions
SerhiiGadzhilovcommented, Mar 15, 2022

@jiadesen @dwrtz Looks like this is a duplicate of https://github.com/electron-userland/electron-builder/issues/6606 It has already been fixed under https://github.com/electron-userland/electron-builder/pull/6617 It should work with version 23.0.2 As alternative solution you can install Python 2 manually and set environment variable PYTHON_PATH

0reactions
utd1878commented, Jun 23, 2022

@jiadesen @dwrtz Looks like this is a duplicate of #6606 It has already been fixed under #6617 It should work with version 23.0.2 As alternative solution you can install Python 2 manually and set environment variable PYTHON_PATH

It was the Python 2 install that fixed it in my environment.

I lied. Still not working…getting the ‘Above command failed, retrying 5 more times’ error on the dmg step

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not Able to Build Some Versions of Python on M1 at 12.3.1
I trying to build older version of python such as 3.6, 3.7, 3.8 using pyenv and having build failures. I am on apple...
Read more >
How to Fix It When macOS Monterey Installation Fails - Lifewire
There can be many reasons your Mac shows an 'Installation Failed' error when you're trying to upgrade to macOS Monterey. They include:.
Read more >
Issues installing Python 3.8.10 on macOS 12.3 Monterey
Any version I try to install using pyenv install gives me this error: python-build: use openssl@1.1 from homebrew python-build: use readline ...
Read more >
Monterey Problems: How to fix the most common macOS 12 ...
Press Command + R to refresh the Software Update dialog. It should fix the problem in case there was some kind of network...
Read more >
Mac won't update to macOS Monterey? Try this - MacPaw
Other error messages when macOS Monterey won't install. macOS Monterey cannot be installed on Macintosh HD. Failed to personalise the update.
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