-
-
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
High Windows defender CPU usage when accessing NSIS installer #1165
Comments
Have you tried to add an exception to your appdata folder? |
@willyb321: My installer does not get run; I am simply right clicking on it. |
F*** MS. F*** MS Defender. After some of the latest win10 updates (yet another restart, f** MS) I experienced the same behaviour (of course, I use VM using Parallels). Maybe you can report bug to MS support? Or just disable defender and use some normal antivirus (if you use Windows)? |
Thanks for issue reporting — I disabled MS F*** Dedender and can work :) |
Experiencing the same issue with Microsoft Defender. Althought it seems to already be very well known. |
If MS cannot handle LZMA stream correctly — it is MS bug. I think it is temporary MS Defender bug and will be fixed soon. In any case MS Defender is ***. If MS will not fix it and it will be important for you — ZIP can be used instead of LZMA (maybe it will help) as an option. |
@develar How do we use ZIP instead of LZMA? |
@mikecao Sorry for confusion — not yet implemented, but possible (price — 1.5-2x size). In any case you can test it — set |
Ok thanks. I would gladly pay a size penalty for a better experience for the users. Even clicking the exe to run the installer freezes for 60 seconds with Windows Defender on. |
@develar What is the ETA on trying to get ZIP implemented? |
@mastergberry Did you tried "set compression option to store"? |
store: ~358MB Store is working fine with Windows Defender. Normal and maximum are both going slow with Windows Defender. |
Sorry forgot to tag @develar again We definitely need some other form of compression that isn't going to have issues with Windows Defender (Microsoft and their lovely software). As you can see the file is almost 5x bigger for us which is a huge impact on downloads/cost |
@mastergberry Do you confirm that it is a latest regression in the MS Defender or do you observe such behaviour previously? Do you distribute ia32 or only x64? |
We did not use this software you provide until 2 weeks ago and have experienced this since we started using compression. At the moment we have only been distributing x64 but we will need to most likely provide ia32 as well. |
@develar forgot to tag again .-. |
FYI: NSIS installer contain both archs, https://github.com/electron-userland/electron-builder/wiki/NSIS#32-bit--64-bit |
@develar Setting the compression level to "store" does not fix the issue for me. |
I see a |
@develar is there an ETA for this feature fix? Next Monday i am pushing out first version of this software publically to a lot of users and i would much prefer to ship an 80MB file vs a 350MB file. |
@mastergberry As @bontibon said, and I confirm, "Setting the compression level to "store" does not fix the issue for me". So, I will investigate issue this weekends. There are 2 solutions:
|
Ok thanks @develar plz feel free to tag me for any testing that you need. |
@mastergberry and others Please answer to 2 questions:
|
This is how a lot of products work, the installer is just downloading the actual app package and then runs it. |
|
MS Defender hangs for a little even for a simple nsis installer. "hangs" — "open context menu for file" So, issue is not major — user just click to install and it works (several seconds to open). If issue is major for you — open issue to add ability to download app package in runtime (it is good in any case because in this case you will not bundle 2 packages for different archs — correct arch will be selected automatically and downloaded). Any attempt to shut up MS Defender (e.g. encrypt app package to hide content) will lead to block by normal antivirus software. So, it is not a solution and will be not considered. |
Latest (insider preview) MS Defender 4.10.14393.726 is broken as well. |
FWIW, I just noticed that this happens on the written uninstaller too. |
@develar I do not think this has to do with a broken version of Windows Defender. Because If I use a very old installer made with electron builder 2.0 I do not have this issue. Only when using the latest versions of electron builder the installer is super slow. I can see that the file architecture is different inside the installer and is not compressed. But that would be fine for us if we only could find a way for the installer to look the same as in version 2 of electron builder. |
@UI-Jakob electron-builder now uses NSIS 3.0 Unicode. And it is an issue in the MS Defender. Because other antiviruses work correctly (no surprise, yeach, MS Defender not an antivirus). Web installer feature is implemeneted (#1207).
I guess we can try to cheat MS Defender using custom build of NSIS makensis (reorder С-structure to break detection). I will experiment on weekends. |
@develar Alright because if I just revert to before we updated electron builder from version 2. It still works. even with latest version of NSIS. |
@UI-Jakob You are hero. MS Defender hangs due to Unicode. Option to disable Unicode (or even disable it by default) will be implemented on weekends. Reported as https://sourceforge.net/p/nsis/bugs/1175/ Please contact MS support to ask about it. |
Disabled unicode support means that installer will not display correctly unicode symbols, e.g. |
…sing NSIS installer Close electron-userland#1165
13.5.0 released. "nsis": {
"unicode": false,
} to disable Unicode. Still enabled by default — wait for NSIS or MS developers answer. |
@develar You are a freaking genius! Your new version solves the problem for us :D |
NSIS developers confirmed that it is a bug in the MS Defender (no surprise). Unlikely that MS will fix this issue anytime soon (or at least answer/confirm), so, probably, in the 14 Unicode will be disabled by default if product name contains only ASCII symbols. |
MS fixed the issue in the MS Defender definitions update. |
@develar so we can re-enable the unicode flag assuming the user is on the latest definitions right? |
@mastergberry Yes. |
Today, I noticed that the NSIS installers I have have built (current and ones from a few months ago) with electron-builder are causing Windows defender to act up.
To reproduce:
All of my installers are signed. I have tried this on 3 separate Windows 10 machines, all with the same results.
I have no reason to believe this is an issue with electron-builder directly, but I thought it would be useful to log it anyway, and to find out if anyone else is experiencing this issue.
Windows defender version:
The text was updated successfully, but these errors were encountered: