electron / electron/universal

Symlinked file problem during asar merge with unpacked directory

Open
#53 0 comments 2 reactions 0 assignees View on GitHub
asar bug
Dominant language
TypeScript
Stars
148
Forks
47
Avg merge
3h 57m
Merged PRs (30d)
5

Description

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 ()
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.