Repository navigation
Unexpected token in dialog.js:1 #6276
Description
[Enter steps to reproduce below:]
- ...
- ...
Atom Version: 0.188.0
System: Mac OS X 10.10.2
Thrown From: Atom Core
Stack Trace
Uncaught Error: /Applications/Atom.app/Contents/Resources/atom.asar/browser/api/lib/dialog.js:1
(function (exports, require, module, __filename, __dirname) { .exports.DEFAULT
^
Unexpected token .
/Applications/Atom.app/Contents/Resources/atom.asar/browser/api/lib/dialog.js:1
(function (exports, require, module, __filename, __dirname) { .exports.DEFAULT
^
SyntaxError: Unexpected token .
at exports.runInThisContext (vm.js:75:16)
at Module._compile (module.js:458:25)
at Object.Module._extensions..js (module.js:493:10)
at Module.load (module.js:370:32)
at Function.Module._load (module.js:325:12)
at Module.require (module.js:380:17)
at EventEmitter. (/Applications/Atom.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:128:79)
at EventEmitter.emit (events.js:119:17)
at EventEmitter. (/Applications/Atom.app/Contents/Resources/atom.asar/browser/api/lib/web-contents.js:99:23)
at EventEmitter.emit (events.js:119:17)
At /Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:77
Error: /Applications/Atom.app/Contents/Resources/atom.asar/browser/api/lib/dialog.js:1
(function (exports, require, module, __filename, __dirname) { .exports.DEFAULT
^
Unexpected token .
/Applications/Atom.app/Contents/Resources/atom.asar/browser/api/lib/dialog.js:1
(function (exports, require, module, __filename, __dirname) { .exports.DEFAULT
^
SyntaxError: Unexpected token .
at exports.runInThisContext (vm.js:75:16)
at Module._compile (module.js:458:25)
at Object.Module._extensions..js (module.js:493:10)
at Module.load (module.js:370:32)
at Function.Module._load (module.js:325:12)
at Module.require (module.js:380:17)
at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:128:79)
at EventEmitter.emit (events.js:119:17)
at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/atom.asar/browser/api/lib/web-contents.js:99:23)
at EventEmitter.emit (events.js:119:17)
at metaToValue (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:77:15)
at Object.exports.require (/Applications/Atom.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:157:34)
at Atom.module.exports.Atom.showSaveDialogSync (/Applications/Atom.app/Contents/Resources/app/src/atom.js:846:23)
at Pane.module.exports.Pane.saveItemAs (/Applications/Atom.app/Contents/Resources/app/src/pane.js:572:26)
at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:562:21)
at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:537:19)
at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:687:35)
at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:295:30)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:242:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at KeymapManager.module.exports.KeymapManager.terminatePendingState (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:539:14)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:428:21)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:180:20)
Commands
-1:56.7 window:update-available (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-monokai.theme-atom-dark-ui)
2x -0:40.4 core:save-as (atom-text-editor.editor.is-focused)
-0:01.4 core:save (atom-text-editor.editor.is-focused)
Config
{
"core": {
"themes": [
"atom-dark-ui",
"monokai"
]
},
"editor": {
"invisibles": {}
}
}Installed Packages
# User
autoclose-html, v0.15.0
autocomplete-plus, v2.7.1
color-picker, v1.6.0
dash, v1.1.0
minimap, v4.7.5
monokai, v0.13.0
# Dev
No dev packages
Activity
notslang commentedon Apr 7, 2015
+1 - just got the same issue on Ubuntu in Atom 0.188 (after upgrading my installation to 0.189) when trying to save a file created my opening a new/empty tab
notslang commentedon Apr 7, 2015
I think that the stack trace is referring to this file: https://github.com/atom/atom-shell/blob/fb00c280264ab9beac7032ff3a2b7ae14b00536c/atom/browser/api/lib/dialog.coffee
winstliu commentedon Apr 7, 2015
Possibly related to atom/tree-view#399.
kevinsawicki commentedon Apr 8, 2015
@zcbenz any thoughts on this one?
izuzak commentedon Apr 8, 2015
Another report here: atom/tabs#128
ybounya commentedon Apr 8, 2015
0.190.0 fixed it for me.
[-]Uncaught Error: /Applications/Atom.app/Contents/Resources/atom.asar/browser/api/lib/dialog.js:1(function (exports, require, module, __filename, __dirname) { .exports.DEFAULT^Unexpected token ./Applications/Atom.app/Contents/Resources/atom.asar/browser/api/lib/dialog.js:1(function (exports, require, module, __filename, __dirname) { .exports.DEFAULT^SyntaxError: Unexpected token . at exports.runInThisContext (vm.js:75:16) at Module._compile (module.js:458:25) at Object.Module._extensions..js (module.js:493:10) at Module.load (module.js:370:32) at Function.Module._load (module.js:325:12) at Module.require (module.js:380:17) at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:128:79) at EventEmitter.emit (events.js:119:17) at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/atom.asar/browser/api/lib/web-contents.js:99:23) at EventEmitter.emit (events.js:119:17)[/-][+]Unexpected token in dialog.js:1[/+]kevinsawicki commentedon Apr 28, 2015
Found another one like this atom/tabs#127
@zcbenz any idea what is going on here?
zcbenz commentedon Apr 29, 2015
From the stack trace the
dialog.jswas read at wrong offset, it seems that theatom.asarhas been updated but Atom is still using the old header to read it. A restart of Atom should fix this.Fixing electron/electron#1219 will solve this.
izuzak commentedon May 13, 2015
electron/electron#1219 was fixed a few days ago -- would it be okay to close this out or should we keep it open @zcbenz @kevinsawicki?
kevinsawicki commentedon May 13, 2015
I'd like to keep it open until we integrate that version of Electron into Atom.
Scsharath2 commentedon Nov 30, 2016
Faced same issue, my fix was restarted atom->select all code->execute
It worked for me!!
lock commentedon Apr 4, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!