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

app-builder fails to find icons unless buildResources path is specified #2570

Closed
mykter opened this issue Feb 10, 2018 · 10 comments · May be fixed by qcif/data-curator#563
Closed

app-builder fails to find icons unless buildResources path is specified #2570

mykter opened this issue Feb 10, 2018 · 10 comments · May be fixed by qcif/data-curator#563
Labels

Comments

@mykter
Copy link

mykter commented Feb 10, 2018

  • Version: 19.56.0
  • Target: AppImage arch=x64

debug output looks normal then ends with this, after which there is no progress:

 • executing       file=/home/mike/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64/app-builder args=icon --format set --root /home/mike/TagTime-desktop/build --root /home/mike/TagTime-desktop --input icons --input /home/mike/TagTime-desktop/resources/icon.icns --input /home/mike/TagTime-desktop/node_modules/electron-builder-lib/templates/linux/electron-icons cwd=/home/mike/TagTime-desktop env=
                      {
                        "DEBUG": "true",
                        "TMPDIR": "/tmp/temp-dir-jv3FE6"
                      }

When I kill the process with ctrl+c I get more info:

Error: Exit code: null. Command failed: /home/mike/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64/app-builder icon --format set --root /home/mike/TagTime-desktop/build --root /home/mike/TagTime-desktop --input icons --input /home/mike/TagTime-desktop/resources/icon.icns --input /home/mike/TagTime-desktop/node_modules/electron-builder-lib/templates/linux/electron-icons
• tried resolved path, but got error error=stat /home/mike/TagTime-desktop/build/icons: no such file or directory path=/home/mike/TagTime-desktop/build/icons
...
It tries to resolve several more paths, each failing.

My package.json doesn't specify any icons for Linux, here's the config:

  "build": {
    "appId": "com.mykter.tagtime",
    "mac": {
      "category": "public.app-category.productivity",
      "icon": "resources/icon.icns"
    },
    "win": {
      "icon": "resources/tagtime.ico"
    },
    "linux": {
      "category": "Utility",
      "target": ["AppImage", "deb", "rpm"]
    }
  }

If I add in a "directories": {"buildResources": "resources"} entry and create an icon.png file in that directory then it works. Perhaps this is intended behaviour? Though it feels like a regression as there was no major version number change, and the docs says that a Linux icon can be generated from the icns file.

@mykter mykter changed the title app-builder invocation is wrong - hang on linux app-builder fails to find icons - linux build hangs Feb 10, 2018
@mykter mykter changed the title app-builder fails to find icons - linux build hangs app-builder fails to find icons unless buildResources path is specified Feb 10, 2018
@develar
Copy link
Member

develar commented Feb 10, 2018

args here it is args of command, not part of.

@develar
Copy link
Member

develar commented Feb 10, 2018

So, build process doesn't hang, but default electron icon is used, right?
Please set env DEBUG=electron-builder and attach log of the terminal output.

@mykter
Copy link
Author

mykter commented Feb 10, 2018

Thanks, I updated the description.

@mykter
Copy link
Author

mykter commented Feb 10, 2018

And no, the build process does hang - it just stops with the debug output shown above, or without debug it stops at:
• downloading path=/home/travis/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64 url=https://github.com/develar/app-builder/releases/download/v0.6.1/app-builder-v0.6.1-linux-x64.7z

@develar
Copy link
Member

develar commented Feb 10, 2018

Please try electron-builder 20.0.3 and please set env DEBUG=electron-builder and attach log of the terminal output.

mykter added a commit to mykter/TagTime-desktop that referenced this issue Feb 10, 2018
@mykter
Copy link
Author

mykter commented Feb 10, 2018

Same issue. Here is the end of the debug output till it hangs:

Extracting archive: /home/mike/.cache/electron/electron-v1.8.2-linux-x64.zip
--
Path = /home/mike/.cache/electron/electron-v1.8.2-linux-x64.zip
Type = zip
Physical Size = 51030111

Everything is Ok

Files: 71
Size:       132259996
Compressed: 51030111
  • exited          command=7za code=0 pid=21154
  • building        target=AppImage arch=x64 file=dist/TagTime-desktop-0.7.0-x86_64.AppImage
  • executing       file=cp args=-d --recursive --preserve=mode --link -T /home/mike/TagTime-desktop/dist/linux-unpacked/ /home/mike/TagTime-desktop/dist/__appImage-x64/app/
  • executed        file=cp
  • executing       file=/home/mike/TagTime-desktop/node_modules/app-builder-bin-linux/x64/app-builder args=icon --format set --root /home/mike/TagTime-desktop/build --root /home/mike/TagTime-desktop --input icons --input /home/mike/TagTime-desktop/resources/icon.icns --input /home/mike/TagTime-desktop/node_modules/electron-builder-lib/templates/linux/electron-icons cwd=/home/mike/TagTime-desktop env=
                      {
                        "DEBUG": "true",
                        "TMPDIR": "/tmp/temp-dir-VSBAhg"
                      }

Then when I press ctrl+c I get:

^C  • cancelled by SIGINT
  • async task error error=
                       Exit code: null. Command failed: /home/mike/TagTime-desktop/node_modules/app-builder-bin-linux/x64/app-builder icon --format set --root /home/mike/TagTime-desktop/build --root /home/mike/TagTime-desktop --input icons --input /home/mike/TagTime-desktop/resources/icon.icns --input /home/mike/TagTime-desktop/node_modules/electron-builder-lib/templates/linux/electron-icons
                         • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/build/icons: no such file or directory path=/home/mike/TagTime-desktop/build/icons
                         • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/icons: no such file or directory path=/home/mike/TagTime-desktop/icons
                         • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/build/icon.png: no such file or directory path=/home/mike/TagTime-desktop/build/icon.png
                         • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/icon.png: no such file or directory path=/home/mike/TagTime-desktop/icon.png
                       
                         • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/build/icons: no such file or directory path=/home/mike/TagTime-desktop/build/icons
                         • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/icons: no such file or directory path=/home/mike/TagTime-desktop/icons
                         • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/build/icon.png: no such file or directory path=/home/mike/TagTime-desktop/build/icon.png
                         • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/icon.png: no such file or directory path=/home/mike/TagTime-desktop/icon.png
                       
Error: Exit code: null. Command failed: /home/mike/TagTime-desktop/node_modules/app-builder-bin-linux/x64/app-builder icon --format set --root /home/mike/TagTime-desktop/build --root /home/mike/TagTime-desktop --input icons --input /home/mike/TagTime-desktop/resources/icon.icns --input /home/mike/TagTime-desktop/node_modules/electron-builder-lib/templates/linux/electron-icons
  • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/build/icons: no such file or directory path=/home/mike/TagTime-desktop/build/icons
  • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/icons: no such file or directory path=/home/mike/TagTime-desktop/icons
  • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/build/icon.png: no such file or directory path=/home/mike/TagTime-desktop/build/icon.png
  • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/icon.png: no such file or directory path=/home/mike/TagTime-desktop/icon.png

  • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/build/icons: no such file or directory path=/home/mike/TagTime-desktop/build/icons
  • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/icons: no such file or directory path=/home/mike/TagTime-desktop/icons
  • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/build/icon.png: no such file or directory path=/home/mike/TagTime-desktop/build/icon.png
  • tried resolved path, but got error error=stat /home/mike/TagTime-desktop/icon.png: no such file or directory path=/home/mike/TagTime-desktop/icon.png

    at /home/mike/TagTime-desktop/node_modules/builder-util/src/util.ts:123:16
    at ChildProcess.exithandler (child_process.js:282:5)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:554:12)
From previous event:
    at exec (/home/mike/TagTime-desktop/node_modules/builder-util/src/util.ts:86:3)
    at /home/mike/TagTime-desktop/node_modules/electron-builder-lib/src/platformPackager.ts:589:23
    at Generator.next (<anonymous>)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at LinuxPackager.resolveIcon (/home/mike/TagTime-desktop/node_modules/electron-builder-lib/out/platformPackager.js:621:11)
    at /home/mike/TagTime-desktop/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:35:35
    at Generator.next (<anonymous>)
From previous event:
    at LinuxTargetHelper.computeDesktopIcons (/home/mike/TagTime-desktop/node_modules/electron-builder-lib/out/targets/LinuxTargetHelper.js:68:11)
    at Lazy.LinuxTargetHelper.iconPromise.Lazy (/home/mike/TagTime-desktop/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:13:54)
    at Lazy.get value [as value] (/home/mike/TagTime-desktop/node_modules/lazy-val/src/main.ts:18:23)
    at LinuxTargetHelper.get icons [as icons] (/home/mike/TagTime-desktop/node_modules/electron-builder-lib/src/targets/LinuxTargetHelper.ts:21:29)
    at /home/mike/TagTime-desktop/node_modules/electron-builder-lib/src/targets/AppImageTarget.ts:137:61
    at Generator.next (<anonymous>)
    at xfs.mkdir.er (/home/mike/TagTime-desktop/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:37:14)
    at FSReqWrap.oncomplete (fs.js:135:15)
From previous event:
    at AppImageTarget.copyIcons (/home/mike/TagTime-desktop/node_modules/electron-builder-lib/out/targets/AppImageTarget.js:226:11)
...

@develar
Copy link
Member

develar commented Feb 10, 2018

OS? Linux? Version? Distro? sudo apt-get install icnsutils?

@develar develar added the bug label Feb 10, 2018
@mykter
Copy link
Author

mykter commented Feb 10, 2018

Local: Ubuntu 16.04, icnsutils 0.8.1-1
Travis: Trusty, icnsutils 0.8.1-1

@vasyl-shumskyi
Copy link

vasyl-shumskyi commented Feb 11, 2018

Same here while trying to build snap package on macOS with 19.56.0

I believe it was broken since 19.54.0
https://github.com/electron-userland/electron-builder/releases/tag/v19.54.0

Had no issues with building package with previous 19.53.7 build.

@forman
Copy link

forman commented Feb 12, 2018

Same issue here. Copied icons from my ./app/resources into default ./build to make it work again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants