atom-community / sync-settings

Synchronize all your settings and packages across atom instances
https://atom.io/packages/sync-settings
MIT License
1.14k stars 105 forks source link

Uncaught SyntaxError: Unexpected token r #151

Closed jbeck111 closed 8 years ago

jbeck111 commented 8 years ago

Installed sync-settings Set up git token and gist as per instructions Selected "Backup" ...and it crashed

Atom Version: 1.2.4 System: Microsoft Windows 10 Pro Thrown From: sync-settings package, v0.6.0

Stack Trace

Uncaught SyntaxError: Unexpected token r

At file:///C:/Users/jbeck/AppData/Local/atom/app-1.2.4/resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22D%3A%5C%5Cbm4%22%2C%22initialLine%22%3Anull%2C%22initialColumn%22%3Anull%7D%5D%2C%22windowInitializationScript%22%3A%22C%3A%5C%5CUsers%5C%5Cjbeck%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-1.2.4%5C%5Cresources%5C%5Capp.asar%5C%5Csrc%5C%5Cinitialize-application-window.js%22%2C%22resourcePath%22%3A%22C%3A%5C%5CUsers%5C%5Cjbeck%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-1.2.4%5C%5Cresources%5C%5Capp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22profileStartup%22%3Afalse%2C%22appVersion%22%3A%221.2.4%22%2C%22shellLoadTime%22%3A266%2C%22initialPaths%22%3A%5B%22D%3A%5C%5Cbm4%22%5D%7D:1

SyntaxError: Unexpected token r
    at Object.parse (native)
    at file:///C:/Users/jbeck/.atom/packages/sync-settings/lib/sync-settings.coffee:134:24
    at Object.proto.sendError (C:\Users\jbeck\.atom\packages\sync-settings\node_modules\github\api\v3.0.0\index.js:32:13)
    at C:\Users\jbeck\.atom\packages\sync-settings\node_modules\github\api\v3.0.0\gists.js:180:29
    at callCallback (C:\Users\jbeck\.atom\packages\sync-settings\node_modules\github\index.js:743:17)
    at ClientRequest.<anonymous> (C:\Users\jbeck\.atom\packages\sync-settings\node_modules\github\index.js:809:17)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:169:7)
    at Socket.socketErrorListener (_http_client.js:259:9)
    at emitOne (events.js:77:13)

Commands

     -0:02.7.0 sync-settings:backup (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "ignoredNames": [
      ".git",
      ".hg",
      ".svn",
      ".DS_Store",
      "._*",
      "Thumbs.db",
      "build",
      "dist",
      "doc",
      "jspm_packages",
      "node_modules",
      "prod",
      "test",
      "typings",
      "*.exe",
      ".editorconfig",
      ".eslintrc",
      ".jsbeautifyrc",
      ".jshintrc",
      ".npmignore",
      "aureliafile.js",
      "bm_build.bat",
      "aurelia.protractor.js",
      "gulpfile.js",
      "karma.conf.js",
      "protractor.conf.js",
      "CONTRIBUTING.md",
      "favicon.ico",
      "LICENSE",
      "README.md"
    ],
    "themes": [
      "one-light-ui",
      "solarized-light-syntax"
    ]
  },
  "sync-settings": {
      (deleted this section before submitting)
  }
}

Installed Packages

# User
.bin, vundefined
atom-typescript, v7.14.1
linter, v1.11.3
linter-csslint, v1.1.0
linter-tslint, v0.5.0
meteor-api, v2.20.0
project-manager, v2.6.5
sync-settings, v0.6.0

# Dev
No dev packages
dirk-thomas commented 8 years ago

I can't reproduce this. Can anybody? Is the same problem still happening for you? Have you tried using newer versions of Atom?

sid24ss commented 8 years ago

Happens to me too. EDIT: This was on Atom 1.3.1; I updated to 1.4.0 and it still happens. I am on linux, using a proxy server.

SyntaxError: Unexpected token r
    at Object.parse (native)
    at /home/vagrant/.atom/packages/sync-settings/lib/sync-settings.coffee:134:24
    at Object.proto.sendError (/home/vagrant/.atom/packages/sync-settings/node_modules/github/api/v3.0.0/index.js:32:13)
    at /home/vagrant/.atom/packages/sync-settings/node_modules/github/api/v3.0.0/gists.js:180:29
    at callCallback (/home/vagrant/.atom/packages/sync-settings/node_modules/github/index.js:743:17)
    at ClientRequest.<anonymous> (/home/vagrant/.atom/packages/sync-settings/node_modules/github/index.js:809:17)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:169:7)
    at Socket.socketErrorListener (_http_client.js:259:9)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at emitErrorNT (net.js:1250:8)
    at doNTCallback2 (node.js:441:9)
    at process._tickCallback (node.js:355:17)
jerone commented 8 years ago

Closing as this issue has been stale for 2 months. Please respond if this still happens.

boblu commented 8 years ago

I still have this problem. Also behind an authenticated proxy server. Please kindly help.

Atom Version: 1.4.0 System: Unknown Windows Version Thrown From: sync-settings package, v0.7.2

Stack Trace

Uncaught SyntaxError: Unexpected token g

At file:///C:/Users/xxxxxxxx/AppData/Local/atom/app-1.4.0/resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22C%3A%5C%5CUsers%5C%5Caa130008%5C%5Cworkspace%5C%5CMPM-GSCM%22%2C%22initialLine%22%3Anull%2C%22initialColumn%22%3Anull%7D%5D%2C%22windowInitializationScript%22%3A%22C%3A%5C%5CUsers%5C%5Caa130008%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-1.4.0%5C%5Cresources%5C%5Capp.asar%5C%5Csrc%5C%5Cinitialize-application-window.js%22%2C%22resourcePath%22%3A%22C%3A%5C%5CUsers%5C%5Caa130008%5C%5CAppData%5C%5CLocal%5C%5Catom%5C%5Capp-1.4.0%5C%5Cresources%5C%5Capp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22profileStartup%22%3Afalse%2C%22appVersion%22%3A%221.4.0%22%2C%22atomHome%22%3A%22C%3A%5C%5CUsers%5C%5Caa130008%5C%5C.atom%22%2C%22shellLoadTime%22%3A395%2C%22initialPaths%22%3A%5B%22C%3A%5C%5CUsers%5C%5Caa130008%5C%5Cworkspace%5C%5CMPM-GSCM%22%5D%7D:1

SyntaxError: Unexpected token g
    at Object.parse (native)
    at file:///C:/Users/xxxxxxxx/.atom/packages/sync-settings/lib/sync-settings.coffee:178:24
    at [object Object].config.sendError (C:\Users\xxxxxxxx\.atom\packages\sync-settings\node_modules\github4\index.js:729:13)
    at C:\Users\xxxxxxxx\.atom\packages\sync-settings\node_modules\github4\index.js:736:29
    at callCallback (C:\Users\xxxxxxxx\.atom\packages\sync-settings\node_modules\github4\index.js:613:17)
    at ClientRequest.<anonymous> (C:\Users\xxxxxxxx\.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:259:9)
    at emitOne (events.js:77:13)
    at TLSSocket.emit (events.js:169:7)
    at connectErrorNT (net.js:993:8)
    at doNTCallback2 (node.js:441:9)
    at process._tickCallback (node.js:355:17)

Commands

     -1:25.9.0 command-palette:toggle (div.panels-item)
  3x -1:18.7.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -1:16.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:16.4.0 sync-settings:view-backup (div.panels-item)
     -1:08.1.0 command-palette:toggle (div.panels-item)
  2x -1:05.9.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -1:05.4.0 core:move-up (atom-text-editor.editor.mini.is-focused)
     -1:05.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:05.2.0 sync-settings:backup (div.panels-item)
     -0:20.7.0 command-palette:toggle (atom-pane.pane.active)
  2x -0:18.9.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:18.3.0 core:move-up (atom-text-editor.editor.mini.is-focused)
     -0:18.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:18.1.0 sync-settings:backup (atom-pane.pane.active)

Config

{
  "core": {
    "autoHideMenuBar": true,
    "fileEncoding": "shiftjis",
    "projectHome": "C:\\Users\\xxxxxxxx\\workspace",
    "themes": [
      "one-dark-ui",
      "atom-dark-syntax"
    ]
  },
  "sync-settings": {
 (deleted this section before submitting)
  }
}

Installed Packages

# User
git-log, v0.4.1
highlight-selected, v0.11.2
minimap, v4.20.0
minimap-find-and-replace, v4.5.0
minimap-git-diff, v4.2.0
minimap-highlight-selected, v4.4.0
minimap-split-diff, v0.3.0
project-manager, v2.7.5
sync-settings, v0.7.2
tree-view-open-files, v0.3.0

# Dev
No dev packages
jerone commented 8 years ago

Unknown Windows Version

Are you behind a proxy?

boblu commented 8 years ago

Yes, I'm behind a proxy which needs authentication. And I'm on windows7 64bit. I have set proxy configato and it works well when install packages inti atom.

boblu commented 8 years ago

I find sync-settings works well with a normal internet connection. Maybe it is a proxy problem.

jerone commented 8 years ago

We previously had problems with people using proxies. Those issues should have been fixed when https://github.com/atom-community/sync-settings/pull/167 was merged. Confirmed on https://github.com/atom-community/sync-settings/issues/142.

Now is the question, why it doesn't work for you and does work for others...?

rafaelcneves commented 8 years ago

It already been solved?

jerone commented 8 years ago

Issues with proxies has been solved.

dirk-thomas commented 8 years ago

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