Electron forge is showing a new Error where it cannot copy my app to /volumes dir
Pre-flight checklist
- [X] I have read the contribution documentation for this project.
- [X] I agree to follow the code of conduct that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
7.2.0
Electron version
27.0.2
Operating system
MacOs 14.4.1
Last known working Electron Forge version
No response
Expected behavior
Running "electron-forge make --arch x64 --platform darwin" should run an executable for macOs x64.
Actual behavior
[email protected] make-x64 electron-forge make --arch x64 --platform darwin
✔ Checking your system ✔ Loading configuration ✔ Loading configuration ✔ Loading configuration ✔ Resolving make targets › Making for the following targets: , ✔ Running package command ✔ Preparing to package application ✔ Running packaging hooks ✔ Running generateAssets hook ✔ Running prePackage hook ✔ Packaging application ✔ Packaging for x64 on darwin [2m1s] ✔ Running postPackage hook ✔ Running preMake hook ❯ Making distributables ✖ Making a zip distributable for darwin/x64 ✖ Making a dmg distributable for darwin/x64 › Command failed: cp -R /Users/m/code/folder/out/App/App.app /Volumes/App/App.app And a thousand more cannot find files in /Volumes
at makeError (/Users/m/code/folder/node_modules/execa/index.js:174:9) at /Users/m/code/DumbNotes/node_modules/execa/index.js:278:16 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Steps to reproduce
electron-forge make --arch x64 --platform darwin
This is my forge.config.js
module.exports = {
packagerConfig: {
appBundleId: "com.app.desktop",
osxSign: {},
asar: true,
icon:'./icons/icon_2',
extraResource: ["./app-binaries", "./models", "./app-data", "./icons"],
extendInfo: './Info.plist'
},
rebuildConfig: {},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {},
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
config: {
arch: ['x64', 'arm64']
}
},
{
name: '@electron-forge/maker-deb',
config: {},
},
{
name: '@electron-forge/maker-rpm',
config: {},
},
{
"name": "@electron-forge/maker-dmg",
config: { // https://js.electronforge.io/maker/dmg/interfaces/makerdmgconfig
icon: './icons/icon_2.icns',
format: 'ULFO',
name: App,
overwrite: true
}
}
],
publishers:[
{
}
}
], plugins: [ { name: '@electron-forge/plugin-auto-unpack-natives', config: {}, }, ], };
Additional information
No response
It was working fine until a month ago. Now, it has completely stopped working, 'make' command doesn't work at all.
I see a similar error. I'm able to run the make command successfully for a while, then it starts to error out consistently with the "Command failed: cp -R" in the "/Volumes" directory. This happens after the package step in the make process.
My hunch is that there's a memory leak somewhere in the forge process, restarting my computer cleared the issue last time... will try again and report if it fixes the issue.
Is this specifically for the DMG maker @davidd8 @mahendra0203? I think the error might be coming from this line of code upstream: https://github.com/LinusU/node-appdmg/blob/bb0f693a74341fda7934b42fd0adcb37022f6e05/lib/appdmg.js#L352
Was running my own tests on the DMG maker for https://github.com/electron/forge/pull/3649 but didn't run into this problem.
This worked for me when I allowed full disk access on macos for terminal.
Confirming it started working again once I restarted my computer. @erickzhao not sure if it's just for the dmg maker, my set up is building for .dmg and .zip at the moment.
Should be related to DMG because the ZIP maker doesn't touch /Volumes at all. One way to isolate the problem would have been to temporarily comment out one of them in your config.
Glad to see a restart worked. I'll close this out if there's a workaround and no consistent repro.
Restart didn't help me. This worked for me after I gave the terminal on my mac full disk access.
Giving full access did'nt work for me any solution on this?