Skip to content

Electron Forge stuck on same 3 steps #4349

Description

@bayturtleking

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • 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/<pid>/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 <pid> -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/<pid>/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:

npm install
npx electron-forge make --targets=@electron-forge/maker-deb

forge.config.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:

"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.

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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions