-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
EPERM: operation not permitted, lstat electron.zip in windows due to corporate proxy preventing download #1019
Comments
👋 Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines. |
Thanks for filing an issue! In order to help you with your problem, we're going to need more information about it. In particular:
|
Thanks for your help so far. Here is the console output with debug option on:
I think the problem is in downloading electron. Because the corporate proxy won't allow that so easily. With the debug log I thought of downloading the file and putting it in there. However the directory name in temp changes everytime I start the build process. |
Download the zip to the appropriate cache folder: https://github.com/electron/get#how-it-works |
Was this resolved? how do i determine which is the appropriate cache folder? |
Click the link and choose the operating system you're running Electron Packager on (not the target). |
EDIT: could the problem be due to not having correct privileges to create symbolic links? I'm certain most group policies would have that disabled outside of true admins. Not sure what a workaround for that would be if that is true I'm having the same exact issue. The zip is in the appropriate cache. I can see the temp electron download folder created, the image of the zip file appears with file size 0kb, then a few seconds later we get the lstat error message. I tried from my personal machine and it works fine, but it does not work on my company laptop. I can install packages just fine, but for some reason the packager can't get past this part. |
I am facing a similar issue as @kolomu . Here is what I get when i run it on the mac (behind corporate proxy):
I did some digging and this is what I understand:
What all have I tried unsuccessfully?
@malept / others - any other recommendations? |
There was a recent change to
As a last resort, you may have to write your own CLI wrapper around the |
I was able to get it to work by using electron-packager-interactive. it must use a different mechanism, but I didn't have time to dig further into it. see if it could work for you? |
My electron-packager always tries to go download electron on my offline machine with this dependency version. This worked fine in @electron/get@1.3.1. |
@a4chet if |
Hi, if still someone struggles with this problem here is my current workaround :
Now it should build. |
I do what you said above, but it still failed.it reported "EPERM: operation not permitted, lstat 'C:\Users\y\AppData\Local\Temp\electron-download-nprkeq\electron-v6.0.12-win32-x64.zip'" |
It seems like it still tries to download the file remotely. Did you start the http server with the zip file and provided the download.mirrorOptions.mirror which is pointing to localhost? What electron-packager version are you using? I installed the latested version with |
I did it again and it worked success!! Thank you so much!love you |
Better proxy support was added to |
I have NodeJS 12.12.0, npm 6.11.3, electron 7.0.1, electron-packager 14.1.0, and @electron/get 1.6.0. I have set My build command looks something like this:
However, I'm still getting this error:
The directory I have another project that's using electron 4.2.12, electron-packager 13.1.1, and electron-download 4.1.1. It builds without error using a similar build command. Update (November 5th, 2019):I upgraded to electron 7.1.0 and now I'm getting this error during postinstall. It seems to be related.
|
I'm getting the same error, I'm not behind a proxy. |
Had the same error on my company laptop. I could fix it by disconnecting from the company network and using my private mobile hotspot. |
Tried what you suggested and I still get "EPERM: operation not permitted, lstat 'C:\Users\y\AppData\Local\Temp\electron-download-nprkeq\electron-v6.0.12-win32-x64.zip'" this is my build command : do you have any suggestions on what the problem might be? |
yep the mirror should not include the full url but just the hostname |
|
I give up :-)
Does somebody still have an idea? Thanks |
I have the same problem, but I can access github to download the package through. So I think it is not due to proxy setting (I have set ELECTRON_GET_USE_PROXY already). But I still have the same problem. I tried also using the local web server approach but without luck. |
Had the same problem and did some debugging. Turns out, if you set ELECTRON_GET_USE_PROXY then @electron/get uses global-agent as proxy lib. Setting both resolved the issue for me! |
Story I am running windows 10 on my work laptop. I've ask my colleagues to try installing electron under corporate network, they can all run it with no problem. So at least in my case, this error is not caused by firewalls or other corporate network related setting. Understand the Problem (please skip directly to solution is not interested)
I only explored solution2 because I am not familiar with building local host in solution1. If you can, by all means use solution1 because you can then reuse it for other apps without manually repeat solution2. Steps for Solution2
Wish everyone good luck and please let me know if you have any questions. Happy coding! |
For me, specify electron version in command line Example : |
In my case I've downloaded an electron zip file from https://github.com/electron/electron/releases/ and stored it in my computer. electron-packager has a command-line option called Example: That way electron-packager won't try to download it using your proxy. |
Preflight Checklist
Issue Details
When trying to create an exe-File by using electron-packagr the following message gets displayed:
I run the following command: electron-packager . --overwrite --DEBUG=* --platform=win32 --arch=x64 --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName="MyApp"
``
14.0.0
1.8.8
Windows 7 SP1
I do not know. It was 2018 when i last build that application but since then I deleted it and reinstalled.
Expected Behavior
To build the exe File
Actual Behavior
Builds nothing
To Reproduce
I am a restricted user because of company guidelines. Also I operate behind a corporate proxy.
Additional Information
This changes nothing of the output.
The text was updated successfully, but these errors were encountered: