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

Build failing on M1 macOS Ventura 13.5.2 #258

Open
3 tasks done
eb1 opened this issue Sep 8, 2023 · 2 comments
Open
3 tasks done

Build failing on M1 macOS Ventura 13.5.2 #258

eb1 opened this issue Sep 8, 2023 · 2 comments
Labels

Comments

@eb1
Copy link

eb1 commented Sep 8, 2023

Bug Report

Problem

Plain vanilla Cordova electron project fails cordova build electron with the dreaded ENOENT error (ref. earlier error: #220 --> marked as fixed).

What is expected to happen?

Successful build

What does actually happen?

Looks like it's still looking for python in the wrong place.

Information

Was trying to build an existing project on the electron platform (I think this was working on a previous OS / chipset IIRC) and running into this same error, so I tried the basic steps on a new project (https://cordova.apache.org/#getstarted):
cordova create tmpElectron
cd tmpElectron
cordova platform add electron
cordova build electron --verbose

output from the build:

No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking for saved platforms that haven't been added to the project
Loaded API for electron project /Users/erik/dev/tmpElectron/platforms/electron/cordova/Api.js
Checking for saved plugins that haven't been added to the project
Generating config.xml from defaults for platform "electron"
Merging and updating files from [www, platforms/electron/platform_www] to platforms/electron/www
  copy  platforms/electron/platform_www/cdv-electron-settings.json platforms/electron/www/cdv-electron-settings.json (updated file)
  copy  platforms/electron/platform_www/config.xml platforms/electron/www/config.xml (updated file)
  delete platforms/electron/www/manifest.json (no source)
This app does not have icons defined
This app does not have splash screens defined.
Creating new manifest file in => undefined
No scripts found for hook "after_prepare".
No scripts found for hook "before_compile".
  • electron-builder  version=22.14.13 os=22.6.0
  • writing effective config  file=platforms/electron/build/builder-effective-config.yaml
  • packaging       platform=darwin arch=x64 electron=14.2.9 appOutDir=platforms/electron/build/mac
  • signing         file=platforms/electron/build/mac/HelloCordova.app identityName=Developer ID Application: [snip -- it's me, I'm the developer]
  • building        target=DMG arch=x64 file=platforms/electron/build/HelloCordova-1.0.0.dmg
  • building        target=macOS zip arch=x64 file=platforms/electron/build/HelloCordova-1.0.0-mac.zip
  • Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+
  • building block map  blockMapFile=platforms/electron/build/HelloCordova-1.0.0-mac.zip.blockmap
Exit code: ENOENT. spawn /usr/bin/python ENOENT
Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
    at /Users/erik/dev/tmpElectron/node_modules/builder-util/src/util.ts:133:18
    at exithandler (node:child_process:408:5)
    at ChildProcess.errorhandler (node:child_process:420:5)
    at ChildProcess.emit (node:events:513: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)

Command or Code

See above steps

Environment, Platform, Device

macOS 13.5.2 on M1 Pro (chip is probably not as important as the OS; I think this is a python-not-found issue)

Version information

Cordova: Cordova-lib@12.0.1
Cordova-electron: 3.1.0
Xcode 14.3.1, but building this from the command line

I should mention that I do have several python installations, but the electron-builder seems to be missing them all:

tmpElectron % which -a python python2 python2.7 python3 python3.6
/usr/local/bin/python
/usr/local/bin/python2
/usr/local/bin/python2.7
/opt/homebrew/bin/python3
/usr/bin/python3

The only one installed in the directory electron is looking for (/usr/bin) is python3 -- I'm guessing that's the version pre-installed with macOS these days.

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@breautek breautek added the bug label Sep 8, 2023
@jneuendorf
Copy link

jneuendorf commented Oct 3, 2023

As you mentioned, according to #220 the same problem has apparently been fixed in #227. The issue was then added to the milestone 4.0.0 which is not yet released 1.5 years later even though all issues are closed. I could neither find a planned release date nor a way to use the latest code, e.g. by installing a @next version, so far.

Do you know a way for installing the bleeding edge version?

@sithwarrior
Copy link

having the same issue on my M1 Mac.

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

No branches or pull requests

4 participants