Access is denied when running the app
- Electron version: 1.4.6
- Operating system: win 10
Expected behavior
Running well
Actual behavior
Got error like this, please advice.
Access is denied.
?\c:\Users\Alley\AppData\Local\Temp\EA4B.tmp.node at Error (natvie) ......... .........
How to reproduce
It happens on some of our customers. can not reproduce on my machine
Please provide a minimal app that reproduces this problem, and include the commands run as well as the entire stack trace.
FWIW I can't reproduce this but I do have ~200 sentry reports for this issue across a variety of installs (all windows based though). It appears to be a random issue caused by A/V when Electron attempts to pull a native module out of an ASAR. (Just a theory)
We've received Sentry reports of this as well. We fixed it by keeping the *.node files unpacked.
If you use electron-builder, you can use:
{
"build": {
"asar": {
"unpack": "*.node"
}
}
thanks for the hint @poiru , will take a try.
@zeke it is not reproducable, but many users do encounter it.
This is caused by anti-virus software deleting the unpacked the .node files, the solution posted by @poiru can solve this.
@wangxiexe Has this problem been solved?