Skip to content

Build arch: universal fail macOS 12.3 TypeError: Cannot read properties of undefined (reading 'Resources') #6735

@bjbk

Description

@bjbk
  • Electron-Builder Version: 23.0.3
  • Node Version: 16.13.2 [updated to 16.14.3]
  • Electron Version: 17.1.2
  • Electron Type (current, beta, nightly): current
  • Electron Updater: 5.0.0
  • Target: mac: { target: { target: 'default', arch: 'universal' } }

  • Dev Machine: Mac mini (M1, 2020)

  • Dev OS version: macOS Monterey 12.3

After experiencing the issue raised #6606 here, I now get the following errors trying to build.

App · Bundling app with electron-builder...

  • electron-builder  version=23.0.3 os=21.4.0
  • writing effective config  file=dist/electron/Packaged/builder-effective-config.yaml
  • packaging       platform=darwin arch=x64 electron=17.1.2 appOutDir=dist/electron/Packaged/mac-universal--x64
  • packaging       platform=darwin arch=arm64 electron=17.1.2 appOutDir=dist/electron/Packaged/mac-universal--arm64
  • packaging       platform=darwin arch=universal electron=17.1.2 appOutDir=dist/electron/Packaged/mac-universal

 App · ⚠️  [FAIL] electron-builder could not build

TypeError: Cannot read properties of undefined (reading 'Resources')

UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".

I can't seem to get any further diagnosis.

EDIT:

Tried to build changing arch to arm64 - build was successful. Now to figure out how to build a universal dmg bundle. 🤔 Was even able to build win-ia32, arm64-win, and AppImage without issues.

...
mac: {
  target: {
     target: 'default',
     // arch: 'universal'
     arch: 'arm64'
  },
…

Build with x64 also successful.

...
mac: {
  target: {
     target: 'default',
     // arch: 'universal'
     arch: 'x64'
  },
…

cannot build universal dmg.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions