Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Unexpected token in dialog.js:1 #6276

Closed

Description

@TrinityKai

[Enter steps to reproduce below:]

  1. ...
  2. ...

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

  1. notslang commented on Apr 7, 2015

    @notslang

    +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

  2. winstliu commented on Apr 7, 2015

    @winstliu
    Contributor

    Possibly related to atom/tree-view#399.

  3. kevinsawicki commented on Apr 8, 2015

    @kevinsawicki
    Contributor

    @zcbenz any thoughts on this one?

  4. izuzak commented on Apr 8, 2015

    @izuzak
    Contributor

    Another report here: atom/tabs#128

  5. ybounya commented on Apr 8, 2015

    @ybounya

    0.190.0 fixed it for me.

  6. changed the title [-]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[/+] on Apr 9, 2015
  7. self-assigned this
    on Apr 13, 2015
  8. kevinsawicki commented on Apr 28, 2015

    @kevinsawicki
    Contributor

    Found another one like this atom/tabs#127

    @zcbenz any idea what is going on here?

  9. zcbenz commented on Apr 29, 2015

    @zcbenz
    Contributor

    From the stack trace the dialog.js was read at wrong offset, it seems that the atom.asar has 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.

  10. izuzak commented on May 13, 2015

    @izuzak
    Contributor

    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?

  11. kevinsawicki commented on May 13, 2015

    @kevinsawicki
    Contributor

    would it be okay to close this out or should we keep it open @zcbenz @kevinsawicki?

    I'd like to keep it open until we integrate that version of Electron into Atom.

  12. Scsharath2 commented on Nov 30, 2016

    @Scsharath2

    Faced same issue, my fix was restarted atom->select all code->execute
    It worked for me!!

  13. lock commented on Apr 4, 2018

    @lock

    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!

  14. locked and limited conversation to collaborators on Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions