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

Failing to build RPMs: Asset already exists - electron builder #91

Open
philip-peterson opened this issue Nov 29, 2024 · 6 comments
Open

Comments

@philip-peterson
Copy link

philip-peterson commented Nov 29, 2024

Failed runner output:

https://github.com/quine-global/hyper/actions/runs/12083105781/job/33696333940#step:11:194

  • cannot move downloaded into final location (another process downloaded faster?)  path=/home/runner/.cache/electron-builder/appimage/appimage-12.0.1
                                                                                     tempFile=/home/runner/.cache/electron-builder/appimage/216984929
                                                                                     error=rename /home/runner/.cache/electron-builder/appimage/216984929 /home/runner/.cache/electron-builder/appimage/appimage-12.0.1: file exists
  • publishing      publisher=Github (owner: quine-global, project: hyper, version: 4.0.0-q-canary.6)
  • uploading       file=Hyper-4.0.0-q-canary.6-x86_64.AppImage provider=github
  • overwrite published file  file=Hyper-4.0.0-q-canary.6-x86_64.AppImage reason=already exists on GitHub
  • publishing      publisher=Snap Store
  • uploading       file=Hyper-4.0.0-q-canary.6-amd64.snap provider=snapStore
  • building        target=deb arch=x64 file=dist/Hyper-4.0.0-q-canary.6-amd64.deb
  • adding autoupdate files for: deb. (Beta feature)  resourceDir=/home/runner/work/hyper/hyper/dist/linux-unpacked/resources
  ⨯ snapcraft is not installed, please: sudo snap install snapcraft --classic  
  • downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/fpm-1.9.3-2.3.1-linux-x86_64/fpm-1.9.3-2.3.1-linux-x86_64.7z size=5.0 MB parts=1
  • downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/fpm-1.9.3-2.3.1-linux-x86_64/fpm-1.9.3-2.3.1-linux-x86_64.7z duration=825ms
  • building        target=rpm arch=x64 file=dist/Hyper-4.0.0-q-canary.6-x86_64.rpm
  • adding autoupdate files for: rpm. (Beta feature)  resourceDir=/home/runner/work/hyper/hyper/dist/linux-unpacked/resources
  • uploading       file=Hyper-4.0.0-q-canary.6-amd64.deb provider=github
  • overwrite published file  file=Hyper-4.0.0-q-canary.6-amd64.deb reason=already exists on GitHub
  • building        target=pacman arch=x64 file=dist/Hyper-4.0.0-q-canary.6-x64.pacman
  • uploading       file=Hyper-4.0.0-q-canary.6-x86_64.rpm provider=github
  • overwrite published file  file=Hyper-4.0.0-q-canary.6-x86_64.rpm reason=already exists on GitHub
  • uploading       file=Hyper-4.0.0-q-canary.6-x64.pacman provider=github
  ⨯ /home/runner/work/hyper/hyper/node_modules/app-builder-bin/linux/x64/app-builder process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1  failedTask=build stackTrace=Error: /home/runner/work/hyper/hyper/node_modules/app-builder-bin/linux/x64/app-builder process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1
    at ChildProcess.<anonymous> (/home/runner/work/hyper/hyper/node_modules/builder-util/src/util.ts:252:14)
    at Object.onceWrapper (node:events:633:26)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1104:16)
    at Socket.<anonymous> (node:internal/child_process:456:11)
    at Socket.emit (node:events:518:28)
    at Pipe.<anonymous> (node:net:343:12)
  • overwrite published file  file=Hyper-4.0.0-q-canary.6-x64.pacman reason=already exists on GitHub
error Command failed with exit code 1.

Maybe related to:

electron-userland/electron-builder#4940

@philip-peterson
Copy link
Author

This may be nondeterministic so retrying may help.

@philip-peterson
Copy link
Author

@corneliusroemer I am curious if this is an issue that interests you at all. I will likely need some help on it, as it's to do with the upstream Github actions being bugged out.

@philip-peterson
Copy link
Author

Likely a problem with https://github.com/develar/app-builder

BTW this issue would unlock binary releases.

@philip-peterson
Copy link
Author

Only occurs on Ubuntu

@philip-peterson
Copy link
Author

philip-peterson commented Dec 8, 2024

What I've learned so far:

electron-builder tries to build an rpm (hence the "only on Linux") and it fails.
the thing that fails seems to be fpm via rpmbuild:

    {:timestamp=>"2024-12-08T13:17:59.731530+0000", :message=>"Process failed: rpmbuild failed (exit code ). Full command was:[\"rpmbuild\", \"-bb\", \"--target\", \"x86_64-unknown-linux\", \"--define\", \"buildroot /tmp/package-rpm-build-6dbe4f025bae1500a1b6132f4419a5f5319690e3d0762bb5931e4f15e943/BUILD\", \"--define\", \"_topdir /tmp/package-rpm-build-6dbe4f025bae1500a1b6132f4419a5f5319690e3d0762bb5931e4f15e943\", \"--define\", \"_sourcedir /tmp/package-rpm-build-6dbe4f025bae1500a1b6132f4419a5f5319690e3d0762bb5931e4f15e943\", \"--define\", \"_rpmdir /tmp/package-rpm-build-6dbe4f025bae1500a1b6132f4419a5f5319690e3d0762bb5931e4f15e943/RPMS\", \"--define\", \"_tmppath /tmp\", \"--define\", \"_build_id_links none\", \"/tmp/package-rpm-build-6dbe4f025bae1500a1b6132f4419a5f5319690e3d0762bb5931e4f15e943/SPECS/hyper.spec\"]", :level=>:error, :file=>"fpm/command.rb", :line=>"521", :method=>"rescue in execute"}
    {:timestamp=>"2024-12-08T13:17:59.734606+0000", :message=>"Cleaning up staging path", :path=>"/tmp/package-dir-staging-e947ccec677085189f70c9c7aed110e545c5896fce42baa4c7d6401c457a", :level=>:debug, :file=>"fpm/package.rb", :line=>"284", :method=>"cleanup_staging"}
    {:timestamp=>"2024-12-08T13:17:59.962738+0000", :message=>"Cleaning up build path", :path=>"/tmp/package-dir-build-40a271f1657cd1d15ae1f7893277fcdb5f5f778bcbb471ce73002b64554a", :level=>:debug, :file=>"fpm/package.rb", :line=>"291", :method=>"cleanup_build"}
    {:timestamp=>"2024-12-08T13:17:59.963075+0000", :message=>"Cleaning up build path", :path=>"/tmp/package-rpm-build-6dbe4f025bae1500a1b6132f4419a5f5319690e3d0762bb5931e4f15e943", :level=>:debug, :file=>"fpm/package.rb", :line=>"291", :method=>"cleanup_build"}
    
                    command=fpm -s dir --force -t rpm --debug --log debug -d gtk3 -d libnotify -d nss -d libXScrnSaver -d '(libXtst or libXtst6)' -d xdg-utils -d at-spi2-core -d '(libuuid or libuuid1)' --rpm-os linux --rpm-compression xzmt --architecture amd64 --after-install /tmp/t-XiZOMD/1-after-install --after-remove /tmp/t-XiZOMD/0-after-remove --description 'A terminal built on web technologies' --version '4.0.0~q~canary.6' --package /home/ironmagma/Code/hyper/dist/Hyper-4.0.0-q-canary.6-x86_64.rpm --name hyper --maintainer 'ZEIT, Inc. <[email protected]>' --url 'https://github.com/quine-global/hyper#readme' --vendor 'ZEIT, Inc. <[email protected]>' --license MIT --rpm-rpmbuild-define '_build_id_links none' /home/ironmagma/Code/hyper/dist/linux-unpacked/=/opt/Hyper /home/ironmagma/Code/hyper/dist/.icon-set/icon_16x16.png=/usr/share/icons/hicolor/16x16/apps/hyper.png /home/ironmagma/Code/hyper/dist/.icon-set/icon_32.png=/usr/share/icons/hicolor/32x32/apps/hyper.png /home/ironmagma/Code/hyper/dist/.icon-set/icon_48x48.png=/usr/share/icons/hicolor/48x48/apps/hyper.png /home/ironmagma/Code/hyper/dist/.icon-set/icon_64.png=/usr/share/icons/hicolor/64x64/apps/hyper.png /home/ironmagma/Code/hyper/dist/.icon-set/icon_128.png=/usr/share/icons/hicolor/128x128/apps/hyper.png /home/ironmagma/Code/hyper/dist/.icon-set/icon_256.png=/usr/share/icons/hicolor/256x256/apps/hyper.png /home/ironmagma/Code/hyper/dist/.icon-set/icon_512.png=/usr/share/icons/hicolor/512x512/apps/hyper.png /home/ironmagma/Code/hyper/dist/.icon-set/icon_1024.png=/usr/share/icons/hicolor/1024x1024/apps/hyper.png /tmp/t-XiZOMD/2-Hyper.desktop=/usr/share/applications/hyper.desktop

So probably it's down to a bug in fpm. There is a way to pin fpm version, by export USE_SYSTEM_FPM=true. But the latest Ruby is not compatible with old fpm versions due to File.exists? having been renamed to File.exist?, so will need to downgrade Ruby.

@philip-peterson
Copy link
Author

After following this line of thought, and seeing as fpm hasn't had a release since Jan 2023, it may not be worth it to build rpms.

@philip-peterson philip-peterson changed the title Asset already exists - electron builder Failing to build RPMs: Asset already exists - electron builder Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant