atom / atom

:atom: The hackable text editor
https://atom.io
MIT License
60.27k stars 17.4k forks source link

Uncaught Error: Cannot find module '../node_modules/keyboard-layout/build/Release/keyboard-layout... #14461

Open ghost opened 7 years ago

ghost commented 7 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.17.0 x64 Electron: 1.3.15 OS: Microsoft Windows 7 Professional Thrown From: Atom Core

Stack Trace

Uncaught Error: Cannot find module '../node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node'

At module.js:457

Error: Cannot find module '../node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node'
    at Module._resolveFilename (module.js:455:15)
    at Module._resolveFilename (~/AppData/Local/atom/app-1.17.0/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (~/AppData/Local/atom/app-1.17.0/resources/app/src/module-cache.js:354:1)
    at Module.require (~/AppData/Local/atom/app-1.17.0/resources/app/static/index.js:40:43)
    at require (internal/module.js:20:19)
    at customRequire (~/AppData/Local/atom/app-1.17.0/resources/app/static/<embedded>:73:1)
    at get_KeyboardLayoutManager (~/AppData/Local/atom/app-1.17.0/resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:7:1)
    at get_manager (~/AppData/Local/atom/app-1.17.0/resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:16:1)
    at getCurrentKeyboardLayout (~/AppData/Local/atom/app-1.17.0/resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:32:1)
    at Object.getCurrentKeymap (~/AppData/Local/atom/app-1.17.0/resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:22:1)
    at exports.keystrokeForKeyboardEvent (~/AppData/Local/atom/app-1.17.0/resources/app/node_modules/atom-keymap/lib/helpers.js:244:1)
    at KeymapManager.module.exports.KeymapManager.keystrokeForKeyboardEvent (~/AppData/Local/atom/app-1.17.0/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:456:1)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.17.0/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:336:1)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.17.0/resources/app/src/window-event-handler.js:100:1)
    at HTMLDocument.<anonymous> (~/AppData/Local/atom/app-1.17.0/resources/app/src/window-event-handler.js:3:1)

Commands

     -3:14.8.0 core:delete (span.syntax--text.syntax--plain.syntax--null-grammar)
  2x -1:18.1.0 core:save (input.hidden-input)

Non-Core Packages

rsese commented 7 years ago

Thanks for the report! Can you confirm a few things for us?

ghost commented 7 years ago

Open new file (2nd time using after install) pressed key and then error messages began.

Repeatable? Yes, I have gotten the error every time I have touched a key on the keyboard to type in line.

On May 17, 2017 5:50 PM, "Robert Sese" notifications@github.com wrote:

Thanks for the report! Can you confirm a few things for us?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/atom/atom/issues/14461#issuecomment-302252966, or mute the thread https://github.com/notifications/unsubscribe-auth/Aafp_4LYd9JbT30CzyeOFuHZpLVef_X3ks5r63m2gaJpZM4Neeob .

rsese commented 7 years ago

Thanks for confirming - not sure why that module wouldn't get installed. Can you confirm whether this directory exists or not?

%LOCALAPPDATA%/atom/app-1.17.0/resources/app/node_modules/keyboard-layout/

ghost commented 7 years ago

At this point I've already moved to uninstall it.

If I push it in again I'll check for it.

On May 22, 2017 4:11 PM, "Robert Sese" notifications@github.com wrote:

Thanks for confirming - not sure why that module wouldn't get installed. Can you confirm whether this directory exists or not?

~/AppData/Local/atom/app-1.17.0/resources/app/node_modules/ keyboard-layout/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/atom/atom/issues/14461#issuecomment-303221118, or mute the thread https://github.com/notifications/unsubscribe-auth/Aafp_0qHvmpoMkuBWaBWtzvqmv6Mcy7-ks5r8fnqgaJpZM4Neeob .

rsese commented 7 years ago

Thanks @ragiemouse :v:

@Xsinh - can you try re-installing? It looks like some files didn't get installed so hopefully re-installing will resolve it for you.

Xsinh commented 7 years ago

Good night ( we have a night:) ).It's happened when i tried changed some files in ftp server (open with atom). After save application is crashed because before i changed some inaccessible files. After that application is crashed with exception(I do not remember, but if this important, i'll see this exception on work tomorrow and send you). I was restart my mashine but this not helped, error was otavalas. I did not try to reinstall the application, since I had to operatively use notpad ++ at that time. I hope I helped you)

P.S Sorry for my English if i wrote with exception)

2017-05-24 0:39 GMT+03:00 Robert Sese notifications@github.com:

Thanks @ragiemouse https://github.com/ragiemouse ✌️

@Xsinh https://github.com/xsinh - can you try re-installing? It looks like some files didn't get installed so hopefully re-installing will resolve it for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atom/atom/issues/14461#issuecomment-303539940, or mute the thread https://github.com/notifications/unsubscribe-auth/AQr9f9jaUYBdBGq4aMeLDm7qkfIZHvhWks5r81H9gaJpZM4Neeob .

alexandernst commented 7 years ago

I just hit this, fresh installed Atom, no plugins, no themes. On a fresh MBP. I was trying to create a new file.

rsese commented 7 years ago

@alexandernst - curious if you tried re-installing? There's been sporadic reports of this type of error but we haven't been able to reproduce.

ghost commented 7 years ago

Not yet.

On Jul 19, 2017 2:54 PM, "Robert Sese" notifications@github.com wrote:

@alexandernst https://github.com/alexandernst - curious if you tried re-installing? There's been sporadic reports of this type of error but we haven't been able to reproduce.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atom/atom/issues/14461#issuecomment-316498032, or mute the thread https://github.com/notifications/unsubscribe-auth/Aafp__3VQPca26I4PBCIii6YQ781SH71ks5sPl8DgaJpZM4Neeob .

alexandernst commented 7 years ago

@rsese I successfully figured out what exactly happened, but I forgot to report it. I'm sorry.

The thing is that Atom for Mac will download as an .app file (it downloads a .zip, but Safari automatically extracts it). I then double-clicked the file (thinking that Atom will be smart enough to copy itself to the Applications folder) and then removed it.

Turns out Atom doesn't copy itself to anywhere. Running Atom and then deleting the .app file will trigger those errors, as Atom is trying to access files that don't exist anymore. Hence the Cannot find module... errors.

I hope this helps.

winstliu commented 7 years ago

Well that could explain the error on macOS but not on Windows. The original report is coming from the typical Atom installation directory on Windows.

ncoder-1 commented 7 years ago

I am getting this error on ArchLinux with Gnome as well.

process.versions:

ares:"1.10.1-DEV" atom-shell:"1.6.9" chrome:"56.0.2924.87" electron:"1.6.9" http_parser:"2.7.0" modules:"53" node:"7.4.0" openssl:"1.0.2j" uv:"1.10.1" v8:"5.6.326.50" zlib:"1.2.8"

Full stack trace here:

Error: Could not connect to X display. at get_manager (/usr/share/atom/resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:16:37) at getCurrentKeyboardLayout (/usr/share/atom/resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:32:17) at Object.getCurrentKeymap (/usr/share/atom/resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:22:31) at exports.keystrokeForKeyboardEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/helpers.js:244:66) at KeymapManager.module.exports.KeymapManager.keystrokeForKeyboardEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:456:20) at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:336:30) at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/usr/share/atom/resources/app/src/window-event-handler.js:100:42) at HTMLDocument.<anonymous> (/usr/share/atom/resources/app/src/window-event-handler.js:3:65)

Happens when I open a file in Atom from Gnome, anything I type crashes immediately. Oddly enough, if I start atom from gnome-terminal, no issues at all.

mLaird commented 7 years ago

Yesterday 20 September, Atom was working fine. I may have done an Atom update at the end of my work, I'm not sure.

Today, any keystroke causes a red error box. The message varies depending on what I do. The delete key causes no error and works. The Control X keystroke causes an error and does not work.

Additionally, I no longer get the github arrow on the right side to open up Atom's input panel for entering an update to my local repository.

Here's what I get when I enter a comma to add to an array. module.js:472 Hide Stack Trace Error: Cannot find module '../node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node' at Module._resolveFilename (module.js:470:15) at Module._resolveFilename (C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\electron.asar\common\reset-search-paths.js:35:12) at Function.get_Module._resolveFilename (C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\src\module-cache.js:354:58) at Module.require (file:///C:/Users/Robyn/AppData/Local/atom/app-1.20.1/resources/app/static/index.js:40:43) at require (internal/module.js:20:19) at customRequire (C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\static\:96:26) at get_KeyboardLayoutManager (C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\node_modules\keyboard-layout\lib\keyboard-layout.js:7:65) at get_manager (C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\node_modules\keyboard-layout\lib\keyboard-layout.js:16:42) at getCurrentKeyboardLayout (C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\node_modules\keyboard-layout\lib\keyboard-layout.js:32:17) at Object.getCurrentKeymap (C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\node_modules\keyboard-layout\lib\keyboard-layout.js:22:31) at exports.keystrokeForKeyboardEvent (C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\node_modules\atom-keymap\lib\helpers.js:244:66) at KeymapManager.module.exports.KeymapManager.keystrokeForKeyboardEvent (C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:467:20) at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:347:30) at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\src\window-event-handler.js:100:42)

vltrrr commented 7 years ago

Both keyboard-layout-manager.node and keytar.node were removed automatically by F-Secure safe as "Trojan.RansomKD.6011707" and "Trojan.RansomKD.6011829" today about 30 minutes ago on my win7 machine, resulting this issue. Not sure if it is f-secure heuristics gone wrong or actually malware leaked into Atom.

juhojo commented 7 years ago

I can confirm that the same reason caused my atom to break as for vltrr (win10 machine + F-Secure). Uninstalling and downloading a new atom from website did resolve this error. However, I have yet to do a virus scan for possible malware. The two Trojans are quarantined and so far no new malware have been automatically found by antivirus from these two .node-files.

mLaird commented 7 years ago

I uninstalled Atom from my Windows10 and attempted twice to re-install. Both times the install package failed. What's going on here? A large message described the fail. It starts as follows:

Program: Starting Squirrel Updater: --install . Program: Starting install, writing to C:\Users\Robyn\AppData\Local\SquirrelTemp CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Robyn\AppData\Local\atom\packages\RELEASES'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

and ends with:

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.UpdateManager.ApplyReleasesImpl.<>c__DisplayClass7_0.<b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

On Thu, Sep 21, 2017 at 4:08 PM, Juho Jokela notifications@github.com wrote:

I can confirm that the same reason caused my atom to break as for vltrr (win10 machine + F-Secure). Uninstalling and downloading a new atom from website did resolve this error. However, I have yet to do a virus scan for possible malware. The two Trojans are quarantined and so far no new malware have been automatically found by antivirus from these two .node-files.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/atom/atom/issues/14461#issuecomment-331266848, or mute the thread https://github.com/notifications/unsubscribe-auth/ADDSb16ohwIu-wWXFVB_InCWHsX5smbsks5sksJHgaJpZM4Neeob .

--

Mike Laird

12 Arbor Creek Drive, Pittsford, New York 14534 mlaird@alum.mit.edu

". . . remembering on both sides that civility is not a sign of weakness, and sincerity is always subject to proof. Let us never negotiate out of fear, but let us never fear to negotiate." - John F. Kennedy

IndraBuana commented 7 years ago

I can confirm @vltrrr ...

I'm having this problem since yesterday in Windows 10 Pro. Any key raise red alert :

'../node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node' module.js:472

And when I check my Bitdefender Total Security 2018, the culprit was in Atom's User App Data, it registered as :

lchenco commented 7 years ago

Can confirm exactly the same situation as @IndraBuana, running Bitdefender Free.

Trojan.RansomKD.6011829: ...\atom\app-1.20.1\resources\app\apm\node_modules\keytar\build\release\keytar.node Trojan.RansomKD.6011707: ...\atom\app-1.20.1\resources\app\node_modules\keyboard-layout\build\release\keyboard-layout-manager.node

rsese commented 7 years ago

About these false positives, please report them to your anti-virus vendor, e.g. see this recent issue in keytar's repository:

https://github.com/atom/node-keytar/issues/75

BEllis commented 7 years ago

I am using BitDefender and can confirm the same issue.

ghost commented 7 years ago

This issue also exists when using Heat EMSS anti-virus (Atom version 1.20.1). Judging from the range of comments, it seems probable that the issue lies with Atom as opposed to every anti-virus vendor in the world.

kafoso commented 7 years ago

Getting this issue as well. Atom editor is slow, error messages pop up everywhere, and it frequently crashes with freeze but also occasionally a sudden shutdown of the application.

Anti-virus: F-Secure PSB Workstation Security 12.01 build 283

Issues with:

F-Secure categorizes them as Trojan and Ransomware, and it has removed the files.


Edit

"Packages" under Settings won't load. Can't even disable (if at all possible) the mentioned problematic packages. "Updates" gives errors, too.


Temporary work-around for Windows users running Atom 1.20.1

You can start up a different version of atom by running e.g. C:\Users\<username>\AppData\Local\atom\app-1.20.0\atom.exe. No need to completely reinstall.

This might also be possible on Linux and/or Mac. If you run these OSs, feel free to share similar work-arounds.

stevenmason commented 7 years ago

I am also getting this issue with Atom + Bitdefender. In the bitdefender log On-Access scanning has detected a threat. The file has been deleted.C:\Users\Steven\AppData\Local\atom\app-1.20.1\resources\app\node_modules\keyboard-layout\build\Release\keyboard-layout-manager.node is malware of type Trojan.RansomKD.6011707

mLaird commented 7 years ago

My Bitdefender says the same thing as Kasper Sofren reported above. I tried a third new install this morning and it failed, again. It seems Bitdefender is denying installation of the keytar and keyboard-layout-manager files. The problem is in the current Atom code. This is a mess. Atom doesn't work, and new installs will not install because they include a Trojan. Here's a small section of the failure log:

2017-09-21 16:54:30> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Robyn\AppData\Local\atom\packages\RELEASES'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Squirrel.Utility.LoadLocalReleases(String localReleaseFile) at Squirrel.UpdateManager.CheckForUpdateImpl.d2.MoveNext() 2017-09-21 16:54:30> CheckForUpdateImpl: Reading RELEASES file from C:\Users\Robyn\AppData\Local\SquirrelTemp 2017-09-21 16:54:30> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch 2017-09-21 16:54:30> ApplyReleasesImpl: Writing files to app directory: C:\Users\Robyn\AppData\Local\atom\app-1.20.1 2017-09-21 16:54:31> LogHost: Rigging execution stub for atom_ExecutionStub.exe to C:\Users\Robyn\AppData\Local\atom\atom.exe 2017-09-21 16:54:38> IEnableLogger: Failed to install package to app dir: System.UnauthorizedAccessException: Access to the path 'C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\apm\node_modules\keytar\build\Release\keytar.node' is denied. at System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath)

On Fri, Sep 22, 2017 at 5:49 AM, Steven Mason notifications@github.com wrote:

I am also getting this issue with Atom + Bitdefender. In the bitdefender log On-Access scanning has detected a threat. The file has been deleted.C:\Users\Steven\AppData\Local\atom\app-1.20.1\ resources\app\node_modules\keyboard-layout\build\Release\keyboard-layout-manager.node is malware of type Trojan.RansomKD.6011707

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/atom/atom/issues/14461#issuecomment-331402890, or mute the thread https://github.com/notifications/unsubscribe-auth/ADDSb4gg790ULhx8yjU7oWqq7Z8qnJR1ks5sk4KlgaJpZM4Neeob .

--

Mike Laird

12 Arbor Creek Drive, Pittsford, New York 14534 mlaird@alum.mit.edu

". . . remembering on both sides that civility is not a sign of weakness, and sincerity is always subject to proof. Let us never negotiate out of fear, but let us never fear to negotiate." - John F. Kennedy

vltrrr commented 7 years ago

@duckboy1981 @rsese @juhojo seems like this might not be just a false alarm. I reinstalled atom too, and compared the quarantined files, and they differ, while both were atom 1.20.1. F-Secure doesn't complain on the new install, not even with a manual scan.

SHA256 hashes

keytar

# atom/app-1.20.1/resources/app/apm/node_modules/keytar/build/Release/keytar.node

# possibly infected, 91136 bytes:
5cebb88cfea9a603ff1e69bfed199744975a571ea2895d5490136d2ec1089ef3

# new install, 113664 bytes
b66b224c2252b0e469f7c299044d179d1983f9b247051de833a946a5bd30b8e5

keyboard-layout-manager

# atom/app-1.20.1/resources/app/node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node

# possibly infected, 129536 bytes
1ce5677f9d6fba5b8141ac75c9f2a0de82f0925cac91ce25efc48d051703e545

# new install, 157184 bytes
9effac8bc80e49584dca64259553fbb00e2851f70de28de826cd7376bc8673a7

The date on the quarantined files is also weird, 31 dec 1979, but might be a side effect from the quarantine.

mLaird commented 7 years ago

I attempted a new download and install at about 1:00PM, 22 September, and it again failed. Its not clear whether the new files are infected, or quarantined old files are disrupting the install. Here is most of the failure log:

2017-09-22 13:00:56> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Robyn\AppData\Local\atom\packages\RELEASES'. at System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Squirrel.Utility.LoadLocalReleases(String localReleaseFile) at Squirrel.UpdateManager.CheckForUpdateImpl.d2.MoveNext() 2017-09-22 13:00:56> CheckForUpdateImpl: Reading RELEASES file from C:\Users\Robyn\AppData\Local\SquirrelTemp 2017-09-22 13:00:56> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch 2017-09-22 13:00:56> ApplyReleasesImpl: Writing files to app directory: C:\Users\Robyn\AppData\Local\atom\app-1.20.1 2017-09-22 13:00:57> LogHost: Rigging execution stub for atom_ExecutionStub.exe to C:\Users\Robyn\AppData\Local\atom\atom.exe 2017-09-22 13:01:04> IEnableLogger: Failed to install package to app dir: System.UnauthorizedAccessException: Access to the path 'C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\apm\node_modules\keytar\build\Release\keytar.node' is denied. at System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at SharpCompress.Readers.IReaderExtensions.WriteEntryToFile(IReader reader, String destinationFileName, ExtractionOptions options) at Squirrel.ReleasePackage.<>cDisplayClass15_2.b1() at Squirrel.Utility.<>cDisplayClass8_0.b0() at Squirrel.Utility.Retry[T](Func`1 block, Int32 retries) at Squirrel.Utility.Retry(Action block, Int32 retries) at Squirrel.ReleasePackage.<>cDisplayClass15_0.b0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.UpdateManager.ApplyReleasesImpl.<>cDisplayClass7_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.d431.MoveNext() 2017-09-22 13:01:04> Unhandled exception: System.AggregateException: One or more errors occurred. ---> System.UnauthorizedAccessException: Access to the path 'C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\apm\node_modules\keytar\build\Release\keytar.node' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at SharpCompress.Readers.IReaderExtensions.WriteEntryToFile(IReader reader, String destinationFileName, ExtractionOptions options) at Squirrel.ReleasePackage.<>c__DisplayClass15_2.<ExtractZipForInstall>b__1() at Squirrel.Utility.<>c__DisplayClass8_0.<Retry>b__0() at Squirrel.Utility.Retry[T](Func1 block, Int32 retries) at Squirrel.Utility.Retry(Action block, Int32 retries) at Squirrel.ReleasePackage.<>cDisplayClass15_0.b0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.UpdateManager.ApplyReleasesImpl.<>cDisplayClass7_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.d43`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Squirrel.UpdateManager.ApplyReleasesImpl.d2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.UpdateManager.d10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Squirrel.Update.Program.d4.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at Squirrel.Update.Program.executeCommandLine(String[] args) at Squirrel.Update.Program.main(String[] args) ---> (Inner Exception #0) System.UnauthorizedAccessException: Access to the path 'C:\Users\Robyn\AppData\Local\atom\app-1.20.1\resources\app\apm\node_modules\keytar\build\Release\keytar.node' is denied. at System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at SharpCompress.Readers.IReaderExtensions.WriteEntryToFile(IReader reader, String destinationFileName, ExtractionOptions options) at Squirrel.ReleasePackage.<>c__DisplayClass15_2.b1() at Squirrel.Utility.<>cDisplayClass8_0.b0() at Squirrel.Utility.Retry[T](Func`1 block, Int32 retries) at Squirrel.Utility.Retry(Action block, Int32 retries) at Squirrel.ReleasePackage.<>cDisplayClass15_0.b0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.UpdateManager.ApplyReleasesImpl.<>c__DisplayClass7_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Utility.d43`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Squirrel.UpdateManager.ApplyReleasesImpl.d2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.UpdateManager.d10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Squirrel.Update.Program.d__4.MoveNext()<---

On Fri, Sep 22, 2017 at 10:26 AM, vltrrr notifications@github.com wrote:

@duckboy1981 https://github.com/duckboy1981 @rsese https://github.com/rsese seems like this might not be just a false alarm. I reinstalled atom, and compared the quarantined files, and they differ, while both were atom 1.20.1. F-Secure doesnt complain on the new install, not even with a manual scan.

SHA256 hashes

keytar

atom/app-1.20.1/resources/app/apm/node_modules/keytar/build/Release/keytar.node

possibly infected, 91136 bytes:

5cebb88cfea9a603ff1e69bfed199744975a571ea2895d5490136d2ec1089ef3

new install, 113664 bytes

b66b224c2252b0e469f7c299044d179d1983f9b247051de833a946a5bd30b8e5

keyboard-layout-manager

atom/app-1.20.1/resources/app/node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node

possibly infected, 129536 bytes

1ce5677f9d6fba5b8141ac75c9f2a0de82f0925cac91ce25efc48d051703e545

new install, 157184 bytes

9effac8bc80e49584dca64259553fbb00e2851f70de28de826cd7376bc8673a7

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/atom/atom/issues/14461#issuecomment-331461865, or mute the thread https://github.com/notifications/unsubscribe-auth/ADDSb1a1qrSnI1LNh-NI1KRkg7uoX_UCks5sk8OMgaJpZM4Neeob .

--

Mike Laird

12 Arbor Creek Drive, Pittsford, New York 14534 mlaird@alum.mit.edu

". . . remembering on both sides that civility is not a sign of weakness, and sincerity is always subject to proof. Let us never negotiate out of fear, but let us never fear to negotiate." - John F. Kennedy

iolsen commented 7 years ago

Hey all I'm sorry for the frustrating experience here. It does often feel like when it comes to anti-virus, the cure is worse than the disease. I just want to reiterate that these are false-positives that need to be reported to your AV software vendors.

vltrrr commented 7 years ago

@iolsen I have also supplied F-Secure with the quarantined files, no reply so far (and I don't know how much hope there is for one :). Changed to sublime for now to avoid issues.

mLaird commented 7 years ago

@Ian Olsen, for the moment I'll take your word that false positives are an issue because I did finally get a new Atom install to work. However, Atom has some issues to deal with from this mess also. Your install program does not clean out old versions. In Safe Mode looking at hidden files (ie my time was wasted getting there) I found my 3 prior Atom installs from the past 2 days all concatenated together in one directory. This glob of files certainly didn't help to get a clean install. After I removed them, I finally got my 4th install to work. Nothing changed with Bitdefender, to my knowledge.

On Fri, Sep 22, 2017 at 2:27 PM, vltrrr notifications@github.com wrote:

@iolsen https://github.com/iolsen I have also supplied F-Secure with the quarantined files, no reply so far (and I don't know how much hope there is for one :). Changed to sublime for now to avoid issues.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/atom/atom/issues/14461#issuecomment-331524792, or mute the thread https://github.com/notifications/unsubscribe-auth/ADDSbxir2f_xWR0oZVSdViO4mMFyiSS0ks5sk_v6gaJpZM4Neeob .

--

Mike Laird

12 Arbor Creek Drive, Pittsford, New York 14534 mlaird@alum.mit.edu

". . . remembering on both sides that civility is not a sign of weakness, and sincerity is always subject to proof. Let us never negotiate out of fear, but let us never fear to negotiate." - John F. Kennedy

rsese commented 7 years ago

our install program does not clean out old versions. In Safe Mode looking at hidden files (ie my time was wasted getting there) I found my 3 prior Atom installs from the past 2 days all concatenated together in one directory. This glob of files certainly didn't help to get a clean install. After I removed them, I finally got my 4th install to work

Sorry about that one @mLaird, there's a known bug where old installs on Windows weren't getting cleaned up and that will be fixed in an upcoming release /cc https://github.com/atom/atom/issues/15320#issuecomment-331391592.

BEllis commented 7 years ago

If it helps anyone, I had to reboot before I could re-install. It appears the file location was locked for some reason even after deleting the whole atom directory.

nrshapiro commented 7 years ago

I am now having this problem as well. Bitdefender found the two modules

keyboard-layout-manager.node' keytar.node

Looking at the web access logs, I note that Atom is connecting to 192.30.253.117. Not sure whether that normal or it's evidence that Atom is really infected.

mLaird commented 7 years ago

@Neil Shapiro According to Whois.com, that link is registered to Github. You are probably sharing Atom usage info with Github - it is part of your settings options. https://www.whois.com/whois/192.30.253.117

With all due respect to Bitdefender (I am a happy customer), you can fix the problem faster with the process I described above. Uninstall Atom, go into Safe Mode, show hidden files, delete the AppData files that Atom does not uninstall, reinstall Atom.

On Mon, Sep 25, 2017 at 9:40 AM, Neil Shapiro notifications@github.com wrote:

I am now having this problem as well. Bitdefender found the two modules

keyboard-layout-manager.node' keytar.node

Looking at the web access logs, I note that Atom is connecting to 192.30.253.117. Not sure whether that normal or it's evidence that Atom is really infected.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atom/atom/issues/14461#issuecomment-331883876, or mute the thread https://github.com/notifications/unsubscribe-auth/ADDSb6q4QUZbQJq57A5LZz6SwbHyPqiNks5sl61cgaJpZM4Neeob .

--

Mike Laird

12 Arbor Creek Drive, Pittsford, New York 14534 mlaird@alum.mit.edu

". . . remembering on both sides that civility is not a sign of weakness, and sincerity is always subject to proof. Let us never negotiate out of fear, but let us never fear to negotiate." - John F. Kennedy

nrshapiro commented 7 years ago

@mLaird Thanks!

I've removed it but it seems there are two scenarios impacting reinstalling the same version again:

  1. Assuming it's a false positive, Bitdefender would just flag it again, unless they have already changed/fixed their virus detection profile affecting it. Does anyone know if that's the case?
  2. Assuming somehow the ATOM distribution is fine, it's a bit worrying that perhaps those modules were somehow targeted and changed after they were installed (and BD didn't notice).

After the CCleaner fiasco, I feel it's better to error on the side of caution when something like this happens--at least to let the dust settle. I'm going to sit it out and use a different code editor at least until the next release or until the true nature of this is clearly elaborated. (Though #2 above still could be a problem and worries me!)

mLaird commented 7 years ago

@ Neil Shapiro Somehow Case #1 does not happen. But you have to do whatever you have to do.

On Mon, Sep 25, 2017 at 12:55 PM, Neil Shapiro notifications@github.com wrote:

@mLaird https://github.com/mlaird Thanks!

I've removed it but it seems there are two scenarios impacting reinstalling the same version again:

  1. Assuming it's a false positive, Bitdefender would just flag it again, unless they have already changed/fixed their virus detection profile affecting it. Does anyone know if that's the case?
  2. Assuming somehow the ATOM distribution is fine, it's a bit worrying that perhaps those modules were somehow targeted and changed after they were installed (and BD didn't notice).

After the CCleaner fiasco, I feel it's better to error on the side of caution when something like this happens--at least to let the dust settle. I'm going to sit it out and use a different code editor at least until the next release or until the true nature of this is clearly elaborated. (Though #2 https://github.com/atom/atom/issues/2 above still could be a problem and worries me!)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atom/atom/issues/14461#issuecomment-331943849, or mute the thread https://github.com/notifications/unsubscribe-auth/ADDSb6emoJFxPpcNZNei1Gn-Jg-RMYyzks5sl9r5gaJpZM4Neeob .

--

Mike Laird

12 Arbor Creek Drive, Pittsford, New York 14534 mlaird@alum.mit.edu

". . . remembering on both sides that civility is not a sign of weakness, and sincerity is always subject to proof. Let us never negotiate out of fear, but let us never fear to negotiate." - John F. Kennedy

martinetoye commented 7 years ago

Seems for me to be down to AVG Anti virus quarantining a file. Restored the file and now back to normal. If it happens again I shall drop and email to AVG to notify them.

vltrrr commented 7 years ago

F-secure answered and confirmed false positive. Issue should be and seems to be resolved (in f-secure products at least).

slimdave commented 7 years ago

Just hit this problem on macOS Sierra, following a crash trying to close a file. No anti-virus implicated in it, as far as I know:

Error: Cannot find module '../node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node'
    at Module._resolveFilename (module.js:455:15)
    at Module._resolveFilename (/Applications/Atom.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app/src/module-cache.js:354:58)
    at Module.require (file:///Applications/Atom.app/Contents/Resources/app/static/index.js:40:43)
    at require (internal/module.js:20:19)
    at customRequire (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:96:26)
    at get_KeyboardLayoutManager (/Applications/Atom.app/Contents/Resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:7:65)
    at get_manager (/Applications/Atom.app/Contents/Resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:16:42)
    at getCurrentKeyboardLayout (/Applications/Atom.app/Contents/Resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:32:17)
    at Object.getCurrentKeymap (/Applications/Atom.app/Contents/Resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:22:31)
    at exports.keystrokeForKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/helpers.js:244:66)
    at KeymapManager.module.exports.KeymapManager.keystrokeForKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:456:20)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:336:30)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:100:42)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:3:65)

I've restarted and upgraded all add ins, and it hasn't reoccurred yet ...

elisei-timofte commented 7 years ago

OSX High Sierra I've got the same error after added a keybinding in keymap.cson

'.platform-darwin atom-text-editor':
    'ctrl-cmd-a':   'aligner:align'

After I removed the .platform-darwin it worked just fine

This is the error stack

Error: Cannot find module '../node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node'
    at Module._resolveFilename (module.js:470:15)
    at Module._resolveFilename (/Applications/Atom.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app/src/module-cache.js:354:58)
    at Module.require (file:///Applications/Atom.app/Contents/Resources/app/static/index.js:40:43)
    at require (internal/module.js:20:19)
    at customRequire (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:96:26)
    at get_KeyboardLayoutManager (/Applications/Atom.app/Contents/Resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:7:65)
    at get_manager (/Applications/Atom.app/Contents/Resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:16:42)
    at Object.getCurrentKeyboardLayout (/Applications/Atom.app/Contents/Resources/app/node_modules/keyboard-layout/lib/keyboard-layout.js:32:17)
    at exports.keystrokeForKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/helpers.js:244:117)
    at KeymapManager.module.exports.KeymapManager.keystrokeForKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:467:20)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:347:30)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:100:42)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:3:65)
rsese commented 7 years ago

I've restarted and upgraded all add ins, and it hasn't reoccurred yet ...

Thanks for the details @slimdave - if you come across steps to reproduce, definitely let us know.

OSX High Sierra I've got the same error after added a keybinding in keymap.cson

Thanks @elisei-timofte - it sounds like you have reproducible steps but it seems pretty different from the rest of the reports in this thread. Can you open a separate issue and fill out the issue template so we can track it and try to reproduce (I don't have High Sierra to test with at the moment)?

hyakuhei commented 7 years ago

Also having this issue on OSX

sergeymalinka commented 7 years ago

As a temporary solution for my OSX Sierra, I just downloaded atom/keyboard-layout repo and copied it into /Applications/Atom.app/Contents/Resources/app/apm/node_modules

rsese commented 7 years ago

@hyakuhei have you tried reinstalling?

griesmey commented 7 years ago

I'm on OSX and sergeymalinka's suggestion worked for me.

"As a temporary solution for my OSX Sierra, I just downloaded atom/keyboard-layout repo and copied it into /Applications/Atom.app/Contents/Resources/app/apm/node_modules"

Showcase-Joz commented 7 years ago

i have a fix for this.

its not ideal, but will fix the problem while a patch for the missing files/folder is put together....allowing you to continue working.

DiThi commented 6 years ago

Still happening after deleting 1.26.0 and updating again. Error appears when modifying any file.

rpichioli commented 6 years ago

Worked on Win7 Professional x64 installing Atom again above the current installed version, without uninstalling it. It's OK here after that.

harisarang commented 6 years ago

I reinstalled my atom compiler without uninstalling it. It started working. Thanks rsese .

mayadapples commented 6 years ago

Will there be a fix for this in the future? reinstalling Atom has worked so far, but it becomes irritating and I wished there was some kind of fix for this bug that somehow got around this.

asdf23 commented 6 years ago

I was able to resolve it by copying keyboard__layout from a different version (app-1.28)