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

Symlinked file problem during asar merge with unpacked directory #53

Open
andymartinwork opened this issue Aug 25, 2022 · 0 comments
Open
Labels
asar bug Something isn't working

Comments

@andymartinwork
Copy link

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.

@erickzhao erickzhao added bug Something isn't working asar labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asar bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants