-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Failed to create dylib symbolic link on Windows #8149
Comments
This error is happening in our CI where running as administrator is not allowed. Is there a workaround for running as an unprivileged user? |
I also encountered this issue and solved it using 'PowerShell with ADMINISTRATOR' |
FYI, it seems like it's an issue with the 7zip upgrade under the hood. Workaround: downgrade to |
I've the same issue. There is maybe a better workaround available: Download the winCodeSign.7z package manually. You can use the same URL as electron-builder is using: Then extract the archive to the requested location (I've used 7-Zip 23.01 for Windows) so that you have this folder on your machine: That's it. I got no errors during extraction. Once the folder exists the download and extraction of the 7z file is skipped during the electron-builder run. Pro:
Con
|
I got 2 errors after extraction: Cannot create symbolic link : A required privilege is not held by the client. : c:\users[username]\appdata\local\electron-builder\cache\wincodesign\wincodesign-2.6.0\darwin\10.12\lib\libcrypto.dylib |
We are experiencing this issue as well, downgrading to electron-builder@24.6.3 helped, for now. Hopefully this can be resolved. The downgrade diff does indeed show that the 7zip dependency has also been downgraded, so I wonder if it would help to pin it to the old version using resolutions, if someone actually needs to be on the latest electron-builder until this is resolved. |
also solved by running as Admin privileged user, unfortunately workarounds with fixing the 7z version were not helpful for me... |
the archive just needs to repacked by electron-builder without the links .. so whatever is used to create the archive in the first place includes the option to archive symlinks ... which is not default behaviour of 7z |
Also hit this issue. Worked around by running Powershell as admin. Would love to see this fixed properly. |
The symlinks are due to the downloader downloading Mac app bundles on Windows. Those symlinks are required for Mac apps to work, but AFAIK there's no reason for the Windows downloader to be downloading Mac build assets. If the downloader only downloaded what it needed, this would not be a problem at all for most users (assuming there's a legitimate reason for this download to be happening in the first place). |
FYI - I ran into this issue as well. Rather than downgrading, I upgraded to the latest version (25.0.5 currently) as there's a note in the recent changelogs about symlinks, but the issue is still present (windows 11). I followed the instructions above about manually downloading the zipfile and extracting all contents to the electron-builder\cache\winCodeSign folder and it worked perfectly so thanks for that solution, @renkei! |
I tried using 7zip 23.01 and 24.08, nothing worked. I downloaded the winCodeSign-2.6.0's source code from https://github.com/electron-userland/electron-builder-binaries/releases/tag/winCodeSign-2.6.0 Then navigated to: Copied all the contents and pasted it in Doing this worked for me! I don't have the administrator access, yet I'm able to get the files from the source code (zip) rather than the 7zip file, so it's working just fine! Thanks to @renkei for your amazing answer! able to sort this issue out. I guess it's some problem with 7zip itself because I was not able to extract manually too. |
Hey all, returning to this issue. Am I understanding this correctly? The 7zip file isn't properly able to be extracted or is running into an issue due to the upgrade that occurred in this PR? #7829 Wondering if this binary (that created the winCodeSign 7z file) needs to be updated: https://github.com/electron-userland/electron-builder-binaries/blob/master/7za |
The bug is caused by the confluence of 2 factors:
|
This should involve releasing winCodeSign for mac/win/linux in electron-builder-binaries based on the system, then downloading the appropriate version for the specific system being used. Another option is to see if parameters can be added during 7z extraction to convert symbolic links to hard links. |
|
Hmmmm, so there's a manner with which to avoid using 7zip-bin altogether is by using env var Might be worth trying that out and test if a newer version of 7za resolves the issue for you? If it does, then I'd imagine this workaround would no longer be needed #8149 (comment) and we can proceed with opening a PR upstream for 7zip-bin. There's coincidentally a vulnerability reported develar/7zip-bin#26 that requires it to be updated anyhow. |
FWIW, I've started working on getting 7zip updated. https://github.com/develar/7zip-bin/tree/update-7zip Few tests are failing for electron-builder with that specific branch, so far I have needed to remove a Unfortunately (or fortunately?), I'll need to investigate further, but it seems we have some package interdependencies and my familiarity with Go is nil. |
Update: I've gotten the new 7zip binaries in PR develar/7zip-bin#27 tested with app-builder-bin's extract logic develar/app-builder#139 Working on getting the two dependencies running together through electron-builder's CI but running into pnpm install errors trying to pull from a specific pre-release/feature branch |
Alright, got a draft PR up with the updated 7zip binaries. #8530 One of the notable changes in app-builder-bin upstream dependency was the need to add the extract flag |
I could fix this on Windows 10 with this solution by adding my user to the security policy for creating symbolic links:
|
It means i can not use vscode terminal to run |
For Windows users who still having this problem:
|
I tried to make Windows installer of my app with following command and settings:
build_win.js
But it is failed with following errors:
Even if I changed the target from NSIS to portable, it was also failed with the same error.
The error says "libssl.dylib" or "Cannot create symbolic link", so I believe it was caused that needless apple resources were extracted in Windows, and failed to create symbolic link on Windows FS.
Are there any fix for this or any work-around?
The text was updated successfully, but these errors were encountered: