Skip to content

Symlinked file problem during asar merge with unpacked directory #53

Description

@andymartinwork

I'm merging two asars for x64 and arm64 on Mac.

Unfortunately this fails with the following error:

  • spawning        command=/app/node_modules/app-builder-bin/mac/app-builder_arm64 encode-plist
  • map async       taskCount=5
  • exited          command=app-builder_arm64 code=0 pid=66084
  • packaging       platform=darwin arch=universal electron=19.0.8 appOutDir=dist/mac-universal
  ⨯ Cannot read properties of undefined (reading 'Breakpad')  failedTask=build stackTrace=TypeError: Cannot read properties of undefined (reading 'Breakpad')
    at Filesystem.getNode (/app/node_modules/asar/lib/filesystem.js:132:24)
    at Filesystem.getFile (/app/node_modules/asar/lib/filesystem.js:140:23)
    at Filesystem.getFile (/app/node_modules/asar/lib/filesystem.js:144:19)
    at Object.module.exports.statFile (/app/node_modules/asar/lib/asar.js:157:21)
    at buildUnpacked (/app/node_modules/@electron/universal/src/asar-utils.ts:95:25)
    at Object.exports.mergeASARs (/app/node_modules/@electron/universal/src/asar-utils.ts:108:3)
    at exports.makeUniversalApp (/app/node_modules/@electron/universal/src/index.ts:205:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at MacPackager.doPack (/app/node_modules/app-builder-lib/src/macPackager.ts:125:9)
    at MacPackager.pack (/app/node_modules/app-builder-lib/src/macPackager.ts:192:7)
    at Packager.doBuild (/app/node_modules/app-builder-lib/src/packager.ts:441:9)
    at Object.executeFinally (/app/node_modules/builder-util/src/promise.ts:12:14)
    at Packager._build (/app/node_modules/app-builder-lib/src/packager.ts:376:31)
    at Packager.build (/app/node_modules/app-builder-lib/src/packager.ts:337:12)
    at Object.executeFinally (/app/node_modules/builder-util/src/promise.ts:12:14)

There is another Mac app in the asar unpacked directory which contains the Breakpad framework. One of the files inside the .app is a framework which contains a symlinked file called Breakpad. I think this is what causes the issue.

The universal building works if I specify mergeAsar = false, but then the app is rather large.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    asarbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions