Open Jstaud opened 8 years ago
I'm seeing the same or similar error, but getting to it a different way.
Steps to reproduce:
Atom version: 1.5.4 System: Windows 8.1 remote-edit version: 1.8.24
Stack Trace
TypeError: Cannot read property 'alias' of undefined
at SftpHost.module.exports.Host.getSearchKey (file:///C:/Users/Josh/.atom/packages/remote-edit/lib/model/host.coffee:34:63)
at file:///C:/Users/Josh/.atom/packages/remote-edit/lib/model/host.coffee:18:9
at Config.module.exports.Config.observeKeyPath (C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\src\config.js:612:7)
at Config.module.exports.Config.observe (C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\src\config.js:141:21)
at SftpHost.Host (file:///C:/Users/Josh/.atom/packages/remote-edit/lib/model/host.coffee:17:19)
at new SftpHost (file:///C:/Users/Josh/.atom/packages/remote-edit/lib/model/sftp-host.coffee:32:7)
at Function.module.exports.Serializable.deserialize (C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\node_modules\text-buffer\node_modules\serializable\lib\serializable.js:70:27)
at Function.module.exports.RemoteEditEditor.deserialize (file:///C:/Users/Josh/.atom/packages/remote-edit/lib/model/remote-edit-editor.coffee:156:27)
at DeserializerManager.module.exports.DeserializerManager.deserialize (C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\src\deserializer-manager.js:45:29)
at C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\src\pane.js:34:30
at Array.map (native)
at Function.module.exports.Pane.deserialize (C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\src\pane.js:33:35)
at DeserializerManager.module.exports.DeserializerManager.deserialize (C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\src\deserializer-manager.js:45:29)
at PaneContainer.module.exports.PaneContainer.deserialize (C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\src\pane-container.js:64:40)
at Workspace.module.exports.Workspace.deserialize (C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\src\workspace.js:155:33)
at AtomEnvironment.module.exports.AtomEnvironment.loadStateSync (C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\src\atom-environment.js:940:24)
at AtomEnvironment.module.exports.AtomEnvironment.startEditorWindow (C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\src\atom-environment.js:685:12)
at module.exports (C:\Users\Josh\AppData\Local\atom\app-1.5.4\resources\app.asar\src\initialize-application-window.js:28:10)
at setupWindow (file:///C:/Users/Josh/AppData/Local/atom/app-1.5.4/resources/app.asar/static/index.js:86:5)
at window.onload (file:///C:/Users/Josh/AppData/Local/atom/app-1.5.4/resources/app.asar/static/index.js:41:9)handleSetupError @ index.js:62
I'm confirming bug, same (buggy) behavior, different environment:
Steps to reproduce:
Atom version: 1.5.4 System: Linux remote-edit version: 1.8.24
Stack trace omitted as not needed (same as above, just replace file:///C:/Users/Josh/ with /home/user).
Just updated to new version of Atom: Atom version: 1.6.0
Error still present. Just to let you know, recent Atom changes broke also some other packages, which give almost the same error (TypeError: Cannot read property 'something' of undefined).
Backwards compatibility is hard to achieve.
Same here
Same
[Enter steps to reproduce below:]
Atom Version: 1.6.0 System: Unknown Windows Version Thrown From: remote-edit package, v1.8.24
Uncaught TypeError: Cannot read property 'alias' of undefined
At /C:/Users/User/.atom/packages/remote-edit/lib/model/host.coffee:62
TypeError: Cannot read property 'alias' of undefined
at SftpHost.module.exports.Host.getSearchKey (file:///C:/Users/User/.atom/packages/remote-edit/lib/model/host.coffee:34:63)
at file:///C:/Users/User/.atom/packages/remote-edit/lib/model/host.coffee:18:9
at Config.module.exports.Config.observeKeyPath (C:\Users\User\AppData\Local\atom\app-1.6.0\resources\app.asar\src\config.js:612:7)
at Config.module.exports.Config.observe (C:\Users\User\AppData\Local\atom\app-1.6.0\resources\app.asar\src\config.js:141:21)
at SftpHost.Host (file:///C:/Users/User/.atom/packages/remote-edit/lib/model/host.coffee:17:19)
at new SftpHost (file:///C:/Users/User/.atom/packages/remote-edit/lib/model/sftp-host.coffee:32:7)
at Object.module.exports.newHostSftp (file:///C:/Users/User/.atom/packages/remote-edit/lib/main.coffee:93:70)
at atom-workspace.<anonymous> (file:///C:/Users/User/.atom/packages/remote-edit/lib/main.coffee:83:17)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\User\AppData\Local\atom\app-1.6.0\resources\app.asar\src\command-registry.js:260:29)
at CommandRegistry.handleCommandEvent (C:\Users\User\AppData\Local\atom\app-1.6.0\resources\app.asar\src\command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\User\AppData\Local\atom\app-1.6.0\resources\app.asar\src\command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\User\AppData\Local\atom\app-1.6.0\resources\app.asar\src\atom-environment.js:1013:28)
at emitOne (events.js:77:13)
at EventEmitter.emit (events.js:169:7)
-6:57.2.0 remote-edit:new-host-sftp (atom-text-editor.editor.is-focused)
-6:48.2.0 about:view-release-notes (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
-6:37.1.0 release-notes:show (atom-text-editor.editor.is-focused)
-4:09.7.0 remote-edit:browse (div.panels-item)
-4:03.2.0 remote-edit:new-host-sftp (atom-text-editor.editor.mini.is-focused)
-3:19.9.0 remote-edit:show-open-files (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
-3:18.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-2:25 remote-edit:show-open-files (input#remote-edit.showHiddenFiles.)
-2:20 core:backspace (atom-text-editor.editor.mini.is-focused)
-2:10.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-1:56.8.0 remote-edit:new-host-sftp (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
{
"core": {
"disabledPackages": [
"preview-plus",
"angularjs"
]
},
"remote-edit": {
"showHiddenFiles": true
}
}
# User
angularjs, v0.3.4
atom-html-preview, v0.1.19
atom-jade, v0.3.0
autocomplete-sass, v0.1.0
coffee-compile, v0.21.1
color-picker, v2.1.1
emmet, v2.4.3
language-matlab, v0.2.1
open-recent, v5.0.0
release-notes, v0.53.0
remote-edit, v1.8.24
sass-autocompile, v0.12.6
save-session, v0.16.0
sync-settings, v0.7.2
# Dev
No dev packages
In Atom 1.7.2 if you leave open remote file on closing Atom, on next open you'll see only main menu of Atom window and everything inside it is black. If you try opening local file window will stay black. Your only solution is to close Atom and reopen it, Alt+Ctrl+R is doing nothing, you can do "Open in dev mode" (View->Developer->Open in dev mode), from where you can see that problem is still the same: "Cannot read property 'alias' of undefined".
Workaround exist, close all remote windows before closing Atom, but that can be quite inconvenient when working on lot of remote files. This bug SHOULD be addressed, as it persists from Atom 1.5.3 onward to at this moment Atom 1.7.2, and now behavior is even worse than before.
My CoffeeScript debugging skills suck, but I got following:
In JS notation: atom.config.observe("remote-edit.filterHostsUsing", (function(_this) { return function(settings) { var ref; return _this.searchKey = (ref = _this.getSearchKey(settings)) != null ? ref : _this.searchKey; };
Workaround: I changed in file .atom/packages/remote-edit/lib/model/host.coffee in line 17 method
atom.config.observe
for atom.config.get
and now atom is opening fine, after you closed it with open remote files.
As observe
method is meant to load new settings when they occur, this change means that for any changes in existing remote-edit settings you probably need to reload atom window (or close-open atom), but I can live with it. :)
[Enter steps to reproduce below:]
Atom Version: 1.5.3 System: Mac OS X 10.11.3 Thrown From: remote-edit package, v1.8.24
Stack Trace
Uncaught TypeError: Cannot read property 'alias' of undefined
Commands
Config
Installed Packages