New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught SyntaxError: Unexpected token c #273

Closed
jakub-astrahit opened this Issue Jun 14, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@jakub-astrahit

jakub-astrahit commented Jun 14, 2016

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.8.0
System: Microsoft Windows 7 Professional
Thrown From: sync-settings package, v0.7.2

Stack Trace

Uncaught SyntaxError: Unexpected token c

At file:///C:/Users/Admin/AppData/Local/atom/app-1.8.0/resources/app.asar/static/index.html#%7B%22initialPaths%22%3A%5B%22C%3A%5C%5CWork%5C%5CWorkspace%5C%5Cptl-app-klientskazona%5C%5Csrc%22%5D%2C%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22C%3A%5C%5CWork%5C%5CWorkspace%5C%5Cptl-app-klientskazona%5C%5Csrc%22%2C%22initialLine%22%3Anull%2C%22initialColumn%22%3Anull%2C%22forceAddToWindow%22%3Afalse%7D%5D%2C%22windowInitializationScript%22%3A%22C%3A%5C%5CUsers%5C%5CAdmin%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-1.8.0%5C%5Cresources%5C%5Capp.asar%5C%5Csrc%5C%5Cinitialize-application-window.js%22%2C%22resourcePath%22%3A%22C%3A%5C%5CUsers%5C%5CAdmin%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-1.8.0%5C%5Cresources%5C%5Capp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22profileStartup%22%3Afalse%2C%22clearWindowState%22%3Afalse%2C%22env%22%3A%7B%22ALLUSERSPROFILE%22%3A%22C%3A%5C%5CProgramData%22%2C%22ANDROID_HOME%22%3A%22C%3A%5C%5CSoftware%5C%5CAndroid%5C%5Candroid-studio%5C%5Csdk%22%2C%22APPDATA%22%3A%22C%3A%5C%5CUsers%5C%5CAdmin%5C%5CAppData%5C%5CRoaming%22%2C%22ATOM_HOME%22%3A%22C%3A%5C%5CUsers%5C%5CAdmin%5C%5C.atom%22%2C%22ChocolateyInstall%22%3A%22C%3A%5C%5CProgramData%5C%5Cchocolatey%22%2C%22CommonProgramFiles%22%3A%22C%3A%5C%5CProgram%20Files%20(x86)%5C%5CCommon%20Files%22%2C%22CommonProgramFiles(x86)%22%3A%22C%3A%5C%5CProgram%20Files%20(x86)%5C%5CCommon%20Files%22%2C%22CommonProgramW6432%22%3A%22C%3A%5C%5CProgram%20Files%5C%5CCommon%20Files%22%2C%22COMPUTERNAME%22%3A%22JAKUB-WORK%22%2C%22ComSpec%22%3A%22C%3A%5C%5CWindows%5C%5Csystem32%5C%5Ccmd.exe%22%2C%22ESET_OPTIONS%22%3A%22%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%2C%22FP_NO_HOST_CHECK%22%3A%22NO%22%2C%22GOOGLE_API_KEY%22%3A%22AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q%22%2C%22GRADLE_HOME%22%3A%22C%3A%5C%5CSoftware%5C%5Cgradle-1.12%22%2C%22HOMEDRIVE%22%3A%22C%3A%22%2C%22HOMEPATH%22%3A%22%5C%5CUsers%5C%5CAdmin%22%2C%22JAVA_HOME%22%3A%22C%3A%5C%5CSoftware%5C%5CJava%22%2C%22LOCALAPPDATA%22%3A%22C%3A%5C%5CUsers%5C%5CAdmin%5C%5CAppData%5C%5CLocal%22%2C%22LOGONSERVER%22%3A%22%5C%5C%5C%5CJAKUB-WORK%22%2C%22MAVEN_HOME%22%3A%22C%3A%5C%5CSoftware%5C%5Capache-maven-3.2.1%22%2C%22NUMBER_OF_PROCESSORS%22%3A%224%22%2C%22OS%22%3A%22Windows_NT%22%2C%22Path%22%3A%22C%3A%5C%5CRuby23-x64%5C%5Cbin%3BC%3A%5C%5Ctools%5C%5Cruby22%5C%5Cbin%3BC%3A%5C%5CProgramData%5C%5COracle%5C%5CJava%5C%5Cjavapath%3BC%3A%5C%5CWindows%5C%5Csystem32%3BC%3A%5C%5CWindows%3BC%3A%5C%5CWindows%5C%5CSystem32%5C%5CWbem%3BC%3A%5C%5CWindows%5C%5CSystem32%5C%5CWindowsPowerShell%5C%5Cv1.0%5C%5C%3BC%3A%5C%5CProgram%20Files%20(x86)%5C%5CIntel%5C%5COpenCL%20SDK%5C%5C3.0%5C%5Cbin%5C%5Cx86%3BC%3A%5C%5CProgram%20Files%20(x86)%5C%5CIntel%5C%5COpenCL%20SDK%5C%5C3.0%5C%5Cbin%5C%5Cx64%3BC%3A%5C%5CProgram%20Files%5C%5CIntel%5C%5CWiFi%5C%5Cbin%5C%5C%3BC%3A%5C%5CProgram%20Files%5C%5CCommon%20Files%5C%5CIntel%5C%5CWirelessCommon%5C%5C%3BC%3A%5C%5CProgram%20Files%20(x86)%5C%5CCommon%20Files%5C%5CAdobe%5C%5CAGL%3BC%3A%5C%5CSoftware%5C%5Capache-maven-3.2.1%5C%5Cbin%3BC%3A%5C%5CSoftware%5C%5CJava%5C%5Cbin%3BC%3A%5C%5CSoftware%5C%5Cgradle-1.12%5C%5Cbin%3BC%3A%5C%5CProgram%20Files%5C%5CMicrosoft%5C%5CWeb%20Platform%20Installer%5C%5C%3BC%3A%5C%5CProgram%20Files%5C%5CTortoiseSVN%5C%5Cbin%3BC%3A%5C%5CSoftware%5C%5CGit%5C%5Ccmd%3BC%3A%5C%5CSoftware%5C%5Cnodejs%5C%5C%3BC%3A%5C%5CProgram%20Files%20(x86)%5C%5CSkype%5C%5CPhone%5C%5C%3BC%3A%5C%5CProgram%20Files%5C%5CTortoiseGit%5C%5Cbin%3BC%3A%5C%5CProgramData%5C%5Cchocolatey%5C%5Cbin%3BC%3A%5C%5CProgramData%5C%5CComposerSetup%5C%5Cbin%3BC%3A%5C%5CSoftware%5C%5Cbin2%3BC%3A%5C%5CPython27%3Bc%3A%5C%5CSoftware%5C%5CMinGW%5C%5Cbin%5C%5C%3BC%3A%5C%5CSoftware%5C%5CVagrant%5C%5Cbin%3Bc%3A%5C%5CSoftware%5C%5CcwRsync_5.5.0_x86_Free%5C%5C%3BC%3A%5C%5CProgram%20Files%5C%5CIntel%5C%5CWiFi%5C%5Cbin%5C%5C%3BC%3A%5C%5CProgram%20Files%5C%5CCommon%20Files%5C%5CIntel%5C%5CWirelessCommon%5C%5C%3BC%3A%5C%5Caltera%5C%5C13.0sp1%5C%5Cmodelsim_ase%5C%5Cwin32aloem%3BC%3A%5C%5CProgram%20Files%20(x86)%5C%5COpenVPN%5C%5Cbin%3BC%3A%5C%5CProgram%20Files%20(x86)%5C%5CMicrosoft%20VS%20Code%5C%5Cbin%3BC%3A%5C%5CUsers%5C%5CAdmin%5C%5CAppData%5C%5CRoaming%5C%5Cnpm%3BC%3A%5C%5CWork%5C%5CHB%5C%5CvcbuildFixForNode-master%3BC%3A%5C%5CProgram%20Files%20(x86)%5C%5CSophos%5C%5CSophos%20SSL%20VPN%20Client%5C%5Cbin%3BC%3A%5C%5CPROGRA~2%5C%5COracle%5C%5CVirtualBox%3BC%3A%5C%5Ctools%5C%5Cphp%3BC%3A%5C%5CUsers%5C%5CAdmin%5C%5CAppData%5C%5CRoaming%5C%5CComposer%5C%5Cvendor%5C%5Cbin%3BC%3A%5C%5CUsers%5C%5CAdmin%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Cbin%22%2C%22PATHEXT%22%3A%22.COM%3B.EXE%3B.BAT%3B.CMD%3B.VBS%3B.VBE%3B.JS%3B.JSE%3B.WSF%3B.WSH%3B.MSC%3B.RB%3B.RBW%22%2C%22PROCESSOR_ARCHITECTURE%22%3A%22x86%22%2C%22PROCESSOR_ARCHITEW6432%22%3A%22AMD64%22%2C%22PROCESSOR_IDENTIFIER%22%3A%22Intel64%20Family%206%20Model%2069%20Stepping%201%2C%20GenuineIntel%22%2C%22PROCESSOR_LEVEL%22%3A%226%22%2C%22PROCESSOR_REVISION%22%3A%224501%22%2C%22ProgramData%22%3A%22C%3A%5C%5CProgramData%22%2C%22ProgramFiles%22%3A%22C%3A%5C%5CProgram%20Files%20(x86)%22%2C%22ProgramFiles(x86)%22%3A%22C%3A%5C%5CProgram%20Files%20(x86)%22%2C%22ProgramW6432%22%3A%22C%3A%5C%5CProgram%20Files%22%2C%22PSModulePath%22%3A%22C%3A%5C%5CWindows%5C%5Csystem32%5C%5CWindowsPowerShell%5C%5Cv1.0%5C%5CModules%5C%5C%22%2C%22PUBLIC%22%3A%22C%3A%5C%5CUsers%5C%5CPublic%22%2C%22QUARTUS_ROOTDIR%22%3A%22C%3A%5C%5Caltera%5C%5C13.0sp1%5C%5Cquartus%22%2C%22SESSIONNAME%22%3A%22Console%22%2C%22SOPC_KIT_NIOS2%22%3A%22C%3A%5C%5Caltera%5C%5C13.0sp1%5C%5Cnios2eds%22%2C%22SystemDrive%22%3A%22C%3A%22%2C%22SystemRoot%22%3A%22C%3A%5C%5CWindows%22%2C%22TEMP%22%3A%22C%3A%5C%5CUsers%5C%5CAdmin%5C%5CAppData%5C%5CLocal%5C%5CTemp%22%2C%22TMP%22%3A%22C%3A%5C%5CUsers%5C%5CAdmin%5C%5CAppData%5C%5CLocal%5C%5CTemp%22%2C%22USERDOMAIN%22%3A%22JAKUB-WORK%22%2C%22USERNAME%22%3A%22Admin%22%2C%22USERPROFILE%22%3A%22C%3A%5C%5CUsers%5C%5CAdmin%22%2C%22VBOX_MSI_INSTALL_PATH%22%3A%22C%3A%5C%5CProgram%20Files%5C%5COracle%5C%5CVirtualBox%5C%5C%22%2C%22windir%22%3A%22C%3A%5C%5CWindows%22%2C%22windows_tracing_flags%22%3A%223%22%2C%22windows_tracing_logfile%22%3A%22C%3A%5C%5CBVTBin%5C%5CTests%5C%5Cinstallpackage%5C%5Ccsilogfile.log%22%7D%2C%22appVersion%22%3A%221.8.0%22%2C%22atomHome%22%3A%22C%3A%5C%5CUsers%5C%5CAdmin%5C%5C.atom%22%2C%22shellLoadTime%22%3A1035%7D:1

SyntaxError: Unexpected token c
    at Object.parse (native)
    at file:///C:/Users/Admin/.atom/packages/sync-settings/lib/sync-settings.coffee:178:24
    at [object Object].global.sendError (C:\Users\Admin\.atom\packages\sync-settings\node_modules\github4\index.js:729:13)
    at C:\Users\Admin\.atom\packages\sync-settings\node_modules\github4\index.js:736:29
    at callCallback (C:\Users\Admin\.atom\packages\sync-settings\node_modules\github4\index.js:613:17)
    at ClientRequest.<anonymous> (C:\Users\Admin\.atom\packages\sync-settings\node_modules\github4\index.js:684:17)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:169:7)
    at TLSSocket.socketErrorListener (_http_client.js:265:9)
    at emitOne (events.js:77:13)
    at TLSSocket.emit (events.js:169:7)
    at emitErrorNT (net.js:1253:8)
    at doNTCallback2 (node.js:465:9)
    at process._tickCallback (node.js:379:17)

Commands

 10x -1:13.3.0 core:move-up (atom-text-editor.editor.mini.is-focused)
  3x -1:11.3.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -1:10.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:08.7.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
     -1:08.1.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -1:08.1.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -1:06.2.0 core:copy (atom-text-editor.editor.is-focused)
     -1:04.9.0 editor:copy-path (atom-text-editor.editor.is-focused)
     -1:04.0 command-palette:toggle (atom-text-editor.editor.is-focused)
 13x -1:01.4.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:52 core:move-up (atom-text-editor.editor.mini.is-focused)
     -0:51.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:51.1.0 sync-settings:backup (atom-text-editor.editor)
     -0:34.5.0 go-to-line:toggle (atom-text-editor.editor.is-focused)
     -0:33.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:29.6.0 core:move-up (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "activate-power-mode",
      "synced-sidebar",
      "git-control",
      "linter-phpmd"
    ],
    "packagesWithKeymapsDisabled": [
      "atom-autocomplete-php"
    ],
    "themes": [
      "seti-ui",
      "monokai-seti"
    ]
  },
  "sync-settings": {
    "_analyticsUserId": "cfc900a3-d074-4318-97fb-faeddf927d60",
    "_lastBackupHash": "0d9d939494c3e51742862f1875f85f14950ba067",
    "gistId": "18c5b45ba60e7d9e1c893486d3ab6ddd",
    "personalAccessToken": "xxxxx"
  }
}

Installed Packages

# User
aligner, v0.22.0
aligner-php, v1.0.0
aligner-scss, v1.1.0
atom-autocomplete-php, v0.18.9
atom-beautify, v0.29.7
auto-detect-indentation, v1.1.0
autoclose-html, v0.23.0
autocomplete-php, v0.3.7
color-picker, v2.1.1
emmet, v2.4.3
highlight-line, v0.11.1
highlight-selected, v0.11.2
hyperclick, v0.0.36
js-hyperclick, v1.4.2
linter, v1.11.8
linter-csslint, v1.3.2
linter-htmlhint, v1.1.4
linter-jshint, v2.1.0
linter-php, v1.2.0
minimap, v4.24.4
minimap-highlight-selected, v4.4.0
monokai-seti, v0.7.0
open-recent, v5.0.0
pigments, v0.29.2
project-manager, v2.9.7
seti-ui, v1.3.1
sync-settings, v0.7.2
wordpress-api, v1.2.2

# Dev
No dev packages
@dirk-thomas

This comment has been minimized.

Show comment
Hide comment
@dirk-thomas

dirk-thomas Jun 14, 2016

Member

In the above error report you have shared your personalAccessToken. You must revoke it to prevent abuse.

Member

dirk-thomas commented Jun 14, 2016

In the above error report you have shared your personalAccessToken. You must revoke it to prevent abuse.

@dirk-thomas

This comment has been minimized.

Show comment
Hide comment
@dirk-thomas

dirk-thomas Jul 12, 2016

Member

It looks like that the server response was not parsable as JSON. Can you please post the error message from the console (if this happens again). The message might shed some light into why the problem is happening.

Member

dirk-thomas commented Jul 12, 2016

It looks like that the server response was not parsable as JSON. Can you please post the error message from the console (if this happens again). The message might shed some light into why the problem is happening.

@dirk-thomas

This comment has been minimized.

Show comment
Hide comment
@dirk-thomas

dirk-thomas Jul 12, 2016

Member

For the record: this is a duplicate of #152.

Member

dirk-thomas commented Jul 12, 2016

For the record: this is a duplicate of #152.

@lumodon

This comment has been minimized.

Show comment
Hide comment
@lumodon

lumodon Jul 12, 2016

I'm getting this same problem

Steps to reproduce problem:
From fresh install, after entering in personal access token into settings, then creating gist with blank file, then copying gist id into settings, then closing and restarting atom. upon load get warning "sync-settings: Your settings are out of date." click backup and after a few seconds error pops up. Rinse and repeat, happens every time.

Note: I don't understand github at all, I tried to follow install instructions but they were quite a bit confusing.
Also: I may have incorrect gist configuration and I don't know how to double check / i.e. where to look to confirm proper configuration.

lumodon commented Jul 12, 2016

I'm getting this same problem

Steps to reproduce problem:
From fresh install, after entering in personal access token into settings, then creating gist with blank file, then copying gist id into settings, then closing and restarting atom. upon load get warning "sync-settings: Your settings are out of date." click backup and after a few seconds error pops up. Rinse and repeat, happens every time.

Note: I don't understand github at all, I tried to follow install instructions but they were quite a bit confusing.
Also: I may have incorrect gist configuration and I don't know how to double check / i.e. where to look to confirm proper configuration.

@dirk-thomas

This comment has been minimized.

Show comment
Hide comment
@dirk-thomas

dirk-thomas Jul 12, 2016

Member

@lumodon Are you using a proxy? Can you please post the error message from the console (View -> Developer -> Toggle Developer Tools).

Member

dirk-thomas commented Jul 12, 2016

@lumodon Are you using a proxy? Can you please post the error message from the console (View -> Developer -> Toggle Developer Tools).

@lumodon

This comment has been minimized.

Show comment
Hide comment
@lumodon

lumodon Jul 12, 2016

I cannot because I closed atom already. Upon trying again, JUST now, it worked without a hitch (Note that I tried multiple times before and got the error each time). Only difference I can think of is that I logged out of github and closed browser? Maybe they were conflicting? I'll run some tests and then edit this post.

I don't have a proxy. I do use zone alarm. I'm behind a router with only 2 ports forwarded to me.

EDIT: Tested with window open in browser etc. still no more errors. Perhaps just a random fluke of bad internet connection for brief periods of time. If I ever get the error again copy it right away and post it. (At bottom of error it says "Someone has already posted this error" which brought me here, so I didn't bother to post copy.)

lumodon commented Jul 12, 2016

I cannot because I closed atom already. Upon trying again, JUST now, it worked without a hitch (Note that I tried multiple times before and got the error each time). Only difference I can think of is that I logged out of github and closed browser? Maybe they were conflicting? I'll run some tests and then edit this post.

I don't have a proxy. I do use zone alarm. I'm behind a router with only 2 ports forwarded to me.

EDIT: Tested with window open in browser etc. still no more errors. Perhaps just a random fluke of bad internet connection for brief periods of time. If I ever get the error again copy it right away and post it. (At bottom of error it says "Someone has already posted this error" which brought me here, so I didn't bother to post copy.)

@zww-v5

This comment has been minimized.

Show comment
Hide comment
@zww-v5

zww-v5 Jul 20, 2016

In my case, this is because of the proxy. Without proxy the sync-settings can't connect the server. I had set the atom's proxy, but the proxy of sync-settings is not dependent on atom's proxy, it is dependent on github's proxy or environment's proxy. So i set the proxy in sync-settings.coffee just like this.
image

zww-v5 commented Jul 20, 2016

In my case, this is because of the proxy. Without proxy the sync-settings can't connect the server. I had set the atom's proxy, but the proxy of sync-settings is not dependent on atom's proxy, it is dependent on github's proxy or environment's proxy. So i set the proxy in sync-settings.coffee just like this.
image

@dirk-thomas

This comment has been minimized.

Show comment
Hide comment
@dirk-thomas

dirk-thomas Dec 1, 2016

Member

With #319 this problem should result in a user notification rather then an unhandled exception.

Member

dirk-thomas commented Dec 1, 2016

With #319 this problem should result in a user notification rather then an unhandled exception.

@dirk-thomas dirk-thomas closed this in #319 Dec 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment