Electron Forge stuck on same 3 steps
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 641
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 30
Description
### Pre-flight checklist
- [x] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [x] I have searched the issue tracker for a bug that matches the one I want to file, without success.
### Forge version
7.11.2
### Electron version
43.4.1
### Operating system
CachyOS (Arch-based), kernel 7.2.0-1-cachyos
### Last known working Forge version
N/A
### Expected behavior
`electron-forge make` SHOULD package the app and make distributable installers (deb/rpm), like how it did on Windows without changing a thing.
### Actual behavior
Packaging just hangs with no message, mostly inside the "Copying files" / "Preparing native dependencies" / "Finalizing package" steps.
### Steps to reproduce
I didn't see this at first, and I put it in Additional Information, sorry :(
### Additional information
It's my first time trying a Linux build on this machine, the same repo and forge.config.js builds fine on Windows and gives me a working installer so I really don't think the config is the problem here.
Basically `electron-forge make` gets half way through packaging and then just stops. There's no error and no crash, it just sits there. Somewhere in these steps:
```
❯ Packaging for x64 on linux
❯ Copying files
❯ Preparing native dependencies
❯ Finalizing package
```
And it's not really consistent which one it dies on.
Most of the time it just hangs forever. I left it running once and after 14 minutes it had burned through like 9 seconds of actual CPU time, so whatever it's "doing" isn't much of anything.
Solutions I've already ruled out: pretty sure it's not disk, same thing happens on an exFAT external drive and on my btrfs root partition. Not memory either, `free -h` showed 9+GB free the whole time it was stuck. Not network, `ss -tnp` showed zero connections from the node process. Checked `/proc//status` and it's sitting in `S` (sleeping) not `D`, so it's not blocked on disk IO at the kernel level.
I ran `strace -p -f` during one of the hangs and the main thread was just looping on epoll_pwait/write, basically redrawing the spinner over and over?? Worker threads were all idle in futex waits. So as far as I can tell literally nothing is happening even though Forge still says the step is "running."
When it does make progress, `/proc//fd` shows it writing Electron locale .pak files one at a time. But it'll just randomly stop partway through, I watched it sit on ru.pak for like 6 minutes until I manually stopped it.
I cleared `~/.cache/electron` for a fresh download, I cleared `/tmp/electron-packager` before every retry, same thing every time. I pulled `@electron-forge/plugin-auto-unpack-natives` out since I don't even have native dependencies, no change, I put it back. I tried just the deb target by itself with `npx electron-forge make --targets=@electron-forge/maker-deb` to rule out AppImage/RPM causing it, but it still hung. Same with maker-rpm. Updated all the `@electron-forge/*` packages to newest, but no difference. I checked dmesg and journalctl for OOM kills or crashes, but there was nothing.
I have not tried downgrading off Node 26 yet, that's my next move since it's pretty new and this could just be something nobody's reported yet or I haven't seen.
Repro from a clean install:
```bash
npm install
npx electron-forge make --targets=@electron-forge/maker-deb
```
forge.config.js:
```js
const { FusesPlugin } = require('@electron-forge/plugin-fuses');
const { FuseV1Options, FuseVersion } = require('@electron/fuses');
const { MakerAppImage } = require('@reforged/maker-appimage');
module.exports = {
packagerConfig: {
asar: true,
electronLanguages: ['en-US', 'en'],
},
rebuildConfig: {},
makers: [
{ name: '@electron-forge/maker-wix', platforms: ['win32'], config: { language: 1033, manufacturer: 'ShellSurfer' } },
{ name: '@electron-forge/maker-zip', platforms: ['darwin'] },
{ name: '@electron-forge/maker-deb', config: {} },
{ name: '@electron-forge/maker-rpm', config: {} },
new MakerAppImage({ options: {} }),
],
plugins: [
{ name: '@electron-forge/plugin-auto-unpack-natives', config: {} },
new FusesPlugin({
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false,
[FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
[FuseV1Options.EnableNodeCliInspectArguments]: false,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true,
}),
],
};
```
package.json dependencies:
```json
"dependencies": {
"chroma-js": "^3.2.0",
"electron-prompt": "^1.7.0",
"electron-squirrel-startup": "^1.0.1"
}
```
Google hasn't been a massive help either.
Contributor guide
Research direction
Start with forge.config.js and package.json, then reproduce the reported hang using npm install followed by npx electron-forge make --targets=@electron-forge/maker-deb on the reported Linux and Node 26 setup. Trace the Copying files, Preparing native dependencies, and Finalizing package entry points to identify why packaging stops; done means the clean install completes a deb package without hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arch-linux, linux, node.js, typescript
- Domain
- build-system, operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100