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

EEXIST: icon already exists building AppImage #2599

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

EEXIST: icon already exists building AppImage #2599

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

Comments

@mykter
Copy link

mykter commented Feb 17, 2018

  • Version: 20.0.5
  • Target: AppImage

When trying to build an AppImage I get:

Error: EEXIST: file already exists, link '/home/mike/TagTime-desktop/dist/.icon-set/icon_512.png' -> '/home/mike/TagTime-desktop/dist/__appImage-x64/usr/share/icons/hicolor/0x0/apps/tagtime-desktop.png'
    at copyOrLinkFile (/home/mike/TagTime-desktop/node_modules/builder-util/src/fs.ts:169:5)
    at /home/mike/TagTime-desktop/node_modules/electron-builder-lib/src/targets/AppImageTarget.ts:108:13
    at Generator.next (<anonymous>)
    at xfs.stat (/home/mike/TagTime-desktop/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
    at /home/mike/TagTime-desktop/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:153:5)
From previous event:
    at iconNames.default.map (/home/mike/TagTime-desktop/node_modules/electron-builder-lib/out/targets/AppImageTarget.js:177:34)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at /home/mike/TagTime-desktop/node_modules/electron-builder-lib/src/targets/AppImageTarget.ts:102:45

snap, deb, and rpm build fine. If I put in a directories/buildResources configuration to the directory with my icon, and there is an icon.png file in that directory, the issue goes away (but in turn those resources don't get packed).

Here's the debug output prior to the backtrace from above:

  • electron-builder version=20.0.5
  • loaded configuration file=package.json ("build" field)
  • effective config config=
                       directories:
                         output: dist
                         buildResources: 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
                       
  • writing effective config file=dist/electron-builder.yaml
  • no native production dependencies
  • packaging       platform=linux arch=x64 electron=1.8.2 appOutDir=dist/linux-unpacked
  • spawning        command=/home/mike/TagTime-desktop/node_modules/7zip-bin-linux/x64/7za x -bd /home/mike/.cache/electron/electron-v1.8.2-linux-x64.zip -aoa -o/home/mike/TagTime-desktop/dist/linux-unpacked

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,64 bits,12 CPUs AMD Ryzen 5 1600 Six-Core Processor             (800F11),ASM,AES-NI)

Scanning the drive for archives:
1 file, 51030111 bytes (49 MiB)

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=16760
  • building        target=AppImage arch=x64 file=dist/TagTime-desktop-0.7.1-x86_64.AppImage
  • spawning        command=/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 --out /home/mike/TagTime-desktop/dist/.icon-set --input icons --input resources/icon.icns --input /home/mike/TagTime-desktop/node_modules/electron-builder-lib/templates/linux/electron-icons
  • path doesn't exist        path=/home/mike/TagTime-desktop/build/icons
  • path doesn't exist        path=/home/mike/TagTime-desktop/icons
  • path doesn't exist        path=/home/mike/TagTime-desktop/build/icon.png
  • path doesn't exist        path=/home/mike/TagTime-desktop/icon.png
  • path doesn't exist        path=/home/mike/TagTime-desktop/build/resources/icon.icns
  • skip unsupported icns sub image format file=/home/mike/TagTime-desktop/resources/icon.icns type=is32
  • skip unsupported icns sub image format file=/home/mike/TagTime-desktop/resources/icon.icns type=s8mk
  • skip unsupported icns sub image format file=/home/mike/TagTime-desktop/resources/icon.icns type=l8mk
  • skip unsupported icns sub image format file=/home/mike/TagTime-desktop/resources/icon.icns type=h8mk
  • skip unsupported icns sub image format file=/home/mike/TagTime-desktop/resources/icon.icns type=it32
  • execute command           args=[opj_decompress -i /home/mike/TagTime-desktop/dist/.icon-set/icon_ic08.jp2 -o /home/mike/TagTime-desktop/dist/.icon-set/icon_256.png] path=/usr/bin/opj_decompress
  • 
[INFO] Start to read j2k main header (119).
[INFO] Main header has been correctly decoded.
[INFO] No decoded area parameters, set the decoded area to the whole image
[INFO] Header of tile 0 / 0 has been read.
[INFO] Tile 1/1 has been decoded.
[INFO] Image data has been updated with tile 1.

[INFO] Stream reached its end !
/build/openjpeg2-9n62XJ/openjpeg2-2.1.0/src/bin/jp2/convert.c:3554:sgnd(0,0,0) w(256) h(256) alpha(1)
[INFO] Generated Outfile /home/mike/TagTime-desktop/dist/.icon-set/icon_256.png

  • skip unsupported icns sub image format file=/home/mike/TagTime-desktop/resources/icon.icns type=il32
  • skip unsupported icns sub image format file=/home/mike/TagTime-desktop/resources/icon.icns type=ih32
  • skip unsupported icns sub image format file=/home/mike/TagTime-desktop/resources/icon.icns type=t8mk
  • execute command           args=[opj_decompress -i /home/mike/TagTime-desktop/dist/.icon-set/icon_ic09.jp2 -o /home/mike/TagTime-desktop/dist/.icon-set/icon_512.png] path=/usr/bin/opj_decompress
  • 
[INFO] Start to read j2k main header (119).
[INFO] Main header has been correctly decoded.
[INFO] No decoded area parameters, set the decoded area to the whole image
[INFO] Header of tile 0 / 0 has been read.
[INFO] Tile 1/1 has been decoded.
[INFO] Image data has been updated with tile 1.

[INFO] Stream reached its end !
/build/openjpeg2-9n62XJ/openjpeg2-2.1.0/src/bin/jp2/convert.c:3554:sgnd(0,0,0) w(512) h(512) alpha(1)
[INFO] Generated Outfile /home/mike/TagTime-desktop/dist/.icon-set/icon_512.png

  • map async                 taskCount=9
  • exited          command=app-builder code=0 pid=16762
  • async task error error=EEXIST: file already exists, link '/home/mike/TagTime-desktop/dist/.icon-set/icon_512.png' -> '/home/mike/TagTime-desktop/dist/__appImage-x64/usr/share/icons/hicolor/0x0/apps/tagtime-desktop.png'
@laurent22
Copy link
Contributor

laurent22 commented Feb 20, 2018

Getting the same error too since yesterday:

yarn run v1.3.2
$ node_modules/.bin/electron-builder
electron-builder 19.45.4

Error is:

Error: EEXIST: file already exists, link '/home/travis/build/laurent22/joplin/ElectronClient/app/build/icons/16x16.png' -> '/home/travis/build/laurent22/joplin/ElectronClient/app/dist/__appimage-x64/usr/share/icons/hicolor/16x16/apps/joplin.png'
    at copyOrLinkFile (/home/travis/build/laurent22/joplin/ElectronClient/app/node_modules/builder-util/src/fs.ts:169:5)
    at /home/travis/build/laurent22/joplin/ElectronClient/app/node_modules/electron-builder/src/targets/AppImageTarget.ts:152:13
    at Generator.next (<anonymous>)
    at xfs.stat (/home/travis/build/laurent22/joplin/ElectronClient/app/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
    at /home/travis/build/laurent22/joplin/ElectronClient/app/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:153:5)

If the target of the link already exists, perhaps it should simply be deleted first?

@jarrodek
Copy link

Apparently this is not fixed. I tried to build AppImage just seconds ago with version 20.0.9 (today's latest) and I see the same error message.

@develar
Copy link
Member

develar commented Feb 23, 2018

@jarrodek Is it possible to provide project to reproduce?

@laurent22
Copy link
Contributor

@develar, here is a recent example from a few minutes ago: https://travis-ci.org/laurent22/joplin/jobs/343608178

If you need any help to replicate the bug please let me know.

@develar
Copy link
Member

develar commented Feb 23, 2018

@laurent22 In your package.json I see that you use old 19.x, not latest 20.1.0.

@develar
Copy link
Member

develar commented Feb 23, 2018

@laurent22 reproduced. Fixed in 20.1.1.

@mykter
Copy link
Author

mykter commented Feb 23, 2018

When this fails, despite the error trace appearing the overall command succeeds. This means an automated build won't detect this failure - it would be good if partial build failures led to an overall non-zero exit code I think.

@jarrodek
Copy link

@develar Sorry, I was busy.
Here's the project: http://github.com/advanced-rest-client/arc-electron/

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