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

bug: Debian install breaks due to 'error creating hard link: Invalid cross-device link' #3692

Open
1 of 3 tasks
josepgl opened this issue Sep 18, 2024 · 4 comments
Open
1 of 3 tasks
Labels
category: app shell os: linux Linux issues type: bug Something isn't working wontfix This will not be worked on

Comments

@josepgl
Copy link

josepgl commented Sep 18, 2024

Jan version

0.5.4

Describe the Bug

Hard links break install when /opt/ is on a different partition.

Steps to Reproduce

  1. Have more than one partition. (In my case I have partitions for / and /home.)
  2. Have /opt and /usr in different partitions. (In my case I use a symbolic link /opt -> /home/opt)
  3. Attempt to install jan with sudo dpkg -i jan-linux-amd64-0.5.4.deb.

Screenshots / Logs

$ sudo dpkg -i jan-linux-amd64-0.5.4.deb
(Reading database ... 421073 files and directories currently installed.)
Preparing to unpack jan-linux-amd64-0.5.4.deb ...
Unpacking jan (0.5.4) ...
dpkg: error processing archive jan-linux-amd64-0.5.4.deb (--install):
error creating hard link './opt/Jan/resources/app.asar.unpacked/icons/512x512.png': Invalid cross-device link
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for mailcap (3.70+nmu1) ...
Errors were encountered while processing:
jan-linux-amd64-0.5.4.deb

What is your OS?

  • MacOS
  • Windows
  • Linux
@josepgl josepgl added the type: bug Something isn't working label Sep 18, 2024
@imtuyethan
Copy link
Contributor

@josepgl Thanks for reporting, can you give more information on how to reproduce this bug?

@imtuyethan imtuyethan added the needs info This doesn't seem right, more information is requested label Sep 18, 2024
@josepgl
Copy link
Author

josepgl commented Sep 18, 2024

@imtuyethan I have included the steps to reproduce in the description.

For more information, this issue is with two files:

  • opt/Jan/resources/app.asar.unpacked/icons/512x512.png
  • opt/Jan/resources/app.asar.unpacked/icons/[email protected]

I would suggest to use symbolic links if you are trying to avoid having them duplicated.

Let me know if you need more info.

@imtuyethan imtuyethan self-assigned this Sep 18, 2024
@imtuyethan imtuyethan added os: linux Linux issues category: app shell and removed needs info This doesn't seem right, more information is requested labels Sep 18, 2024
@imtuyethan
Copy link
Contributor

imtuyethan commented Sep 18, 2024

Thanks for reporting this issue @josepgl.

Jan is an Electron-based application. You've identified a known problem that affects not just Jan, but many Electron-based applications packaged as .deb files, particularly when installed on systems where /opt is on a separate partition. The packaging process creates hard links, which fail when crossing device boundaries (i.e., different partitions or drives).

My proposed workaround for this is: Use the Appimage (portable build) instead.

The long-term solution would involve working with the electron-builder community to address the issue at its source, which could take months, unfortunately.

Similar reported issues:

electron-userland/electron-builder#5721
LN-Zap/zap-desktop#2089
beekeeper-studio/beekeeper-studio#593

@imtuyethan imtuyethan added the wontfix This will not be worked on label Sep 18, 2024
@imtuyethan imtuyethan removed their assignment Sep 18, 2024
@josepgl
Copy link
Author

josepgl commented Sep 18, 2024

@imtuyethan Nice finding.

I didn't expect it to be an issue with electron since I have installed other electron based applications and this is the first time I find this issue. Hopefully they fix it eventually.

Since I prefer to use the deb package I just chose to repack it with my fix, and now I'm enjoying Jan.

Thanks for this great application.

@imtuyethan imtuyethan closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2024
@imtuyethan imtuyethan reopened this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: app shell os: linux Linux issues type: bug Something isn't working wontfix This will not be worked on
Projects
Status: Scheduled
Development

No branches or pull requests

2 participants