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

Problems building for arm64 Raspberry - Icons Related. #5955

Closed
marceloch2 opened this issue Jun 12, 2021 · 6 comments
Closed

Problems building for arm64 Raspberry - Icons Related. #5955

marceloch2 opened this issue Jun 12, 2021 · 6 comments
Labels

Comments

@marceloch2
Copy link

marceloch2 commented Jun 12, 2021

  • electron-builder 22.11.7
  • electron 13.1.2
  • Node.js v14.17.0

Target

  • ARM64 - Raspberry Pi:

Building my Electron app inside a RaspberryPi 4 ARM64 it fails while copying and/or converting my icons inside resources/icons and crashes with a message that is not very clear.

snapcraft is not installed, please: sudo snap install snapcraft --classic

More logs with the error that Can say more about the app-builder-bin failing with the icons part.

• exited          command=app-builder code=0 pid=9793
  • packaging       platform=linux arch=arm64 electron=13.1.2 appOutDir=release/linux-arm64-unpacked
  • spawning        command=/root/countr-desktop-next/node_modules/app-builder-bin/linux/arm64/app-builder unpack-electron --configuration [{"platform":"linux","arch":"arm64","version":"13.1.2"}] --output /root/countr-desktop-next/release/linux-arm64-unpacked --distMacOsAppName Electron.app
  • map async       taskCount=2
  • map async       taskCount=1
  • map async       taskCount=73
  • exited          command=app-builder code=0 pid=10276
  • building        target=snap arch=arm64 file=release/countr-desktop_4.0.1_arm64.snap
  • spawning        command=/root/countr-desktop-next/node_modules/app-builder-bin/linux/arm64/app-builder icon --format set --root /root/countr-desktop-next/resources --root /root/countr-desktop-next --out /root/countr-desktop-next/release/.icon-set --input icons/ --fallback-input /root/countr-desktop-next/node_modules/app-builder-lib/templates/icons/electron-linux
  • path resolved   path=/root/countr-desktop-next/resources/icons outputFormat=set
  • map async       taskCount=8
  • exited          command=app-builder code=0 pid=10283 out={"icons":[{"file":"/root/countr-desktop-next/resources/icons/24x24.png","size":24},{"file":"/root/countr-desktop-next/resources/icons/32x32.png","size":32},{"file":"/root/countr-desktop-next/resources/icons/48x48.png","size":48},{"file":"/root/countr-desktop-next/resources/icons/64x64.png","size":64},{"file":"/root/countr-desktop-next/resources/icons/96x96.png","size":96},{"file":"/root/countr-desktop-next/resources/icons/128x128.png","size":128},{"file":"/root/countr-desktop-next/resources/icons/256x256.png","size":256},{"file":"/root/countr-desktop-next/resources/icons/512x512.png","size":512}],"isFallback":false}
  • application Linux category is set to default "Utility"  reason=linux.category is not set and cannot map from macOS docs=https://www.electron.build/configuration/linux
  • spawning        command=/root/countr-desktop-next/node_modules/app-builder-bin/linux/arm64/app-builder snap --app /root/countr-desktop-next/release/linux-arm64-unpacked --stage /root/countr-desktop-next/release/__snap-arm64 --arch arm64 --output /root/countr-desktop-next/release/countr-desktop_4.0.1_arm64.snap --executable countr-desktop --icon /root/countr-desktop-next/resources/icons/512x512.png --extraAppArgs=--no-sandbox
  • copy files      from=/root/countr-desktop-next/resources/icons/512x512.png to=/root/countr-desktop-next/release/__snap-arm64/snap/gui/icon.png isUseHardLinks=true
  • exit status 1   
  ⨯ snapcraft is not installed, please: sudo snap install snapcraft --classic  
  • exited          command=app-builder code=1 pid=10288
  • async task error  error=/root/countr-desktop-next/node_modules/app-builder-bin/linux/arm64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
  ⨯ /root/countr-desktop-next/node_modules/app-builder-bin/linux/arm64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE  stackTrace=
                                                                                                                                           Error: /root/countr-desktop-next/node_modules/app-builder-bin/linux/arm64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
                                                                                                                                               at ChildProcess.<anonymous> (/root/countr-desktop-next/node_modules/builder-util/src/util.ts:243:14)
                                                                                                                                               at Object.onceWrapper (events.js:483:26)
                                                                                                                                               at ChildProcess.emit (events.js:376:20)
                                                                                                                                               at maybeClose (internal/child_process.js:1055:16)
                                                                                                                                               at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] package-pi: `yarn build && electron-builder build --linux --arm64 --publish never

File Package.json - Build section

"build": {
    "buildDependenciesFromSource": true,
    "productName": "Countr-Desktop",
    "appId": "com.en.countr.desktop",
    "compression": "normal",
    "files": [
      "resources/**/*",
      "app/img/",
      "app/dist/",
      "app/app.html",
      "app/main.prod.js",
      "app/main.prod.js.map"
    ],
    "linux": {
      "target": {
        "target": "snap",
        "arch": "arm64"
      },
    },
    "directories": {
      "buildResources": "resources",
      "output": "release"
    }
  }
@marceloch2 marceloch2 changed the title Problems with arm64 Raspberry with Icons. Problems building for arm64 Raspberry - Icons Related. Jun 12, 2021
@marceloch2
Copy link
Author

marceloch2 commented Jun 12, 2021

Seems a problem with app-builder btw.
Issue created in app-builder repo

@aggie2016
Copy link

aggie2016 commented Jun 30, 2021

I've recently encountered this issue as well in my CI/CD pipeline that uses the docker container electronuserland/builder:wine. This might actually be an issue in electron-builder's docker container. app-builder hasn't be updated in over 2 years and my pipeline only recently stopped working after a build was triggered by a change in my .npmignore.

Note that the docker container in question was recently updated this month.

@mmaietta
Copy link
Collaborator

Probably related to this PR then?
#5855

@marceloch2
Copy link
Author

@aggie2016 @mmaietta I don't use the Docker Image mentioned above and still no solution for my case, @aggie2016 With the docker image you manage to build .snap before with it?

Thanks in advance for your time folks.

@aggie2016
Copy link

@marceloch2 Hi! So I was able to build a .snap around a month ago using the docker image mentioned. However, recently, I've disabled that target type in favor of just AppImage since .snap isn't supported by electron-builder's auto update functionality.

@stale
Copy link

stale bot commented Sep 7, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Sep 7, 2021
@stale stale bot closed this as completed Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants