yongkangchen / remote-sync

Upload your files to remote host after every change. Both SCP/SFTP and FTP are supported.
https://atom.io/packages/remote-sync
MIT License
237 stars 71 forks source link

Uncaught TypeError: Converting circular structure to JSON #455

Open tofsjonas opened 6 years ago

tofsjonas commented 6 years ago

[Enter steps to reproduce:]

  1. ... right click to remote-sync -> configure
  2. ... click save

Atom: 1.21.1 x64 Electron: 1.6.15 OS: Peppermint 7 Thrown From: remote-sync package 4.1.8

Stack Trace

Uncaught TypeError: Converting circular structure to JSON

At /home/jonas/.atom/packages/remote-sync/lib/model/host.coffee:41

TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at Host.module.exports.Host.saveJSON (/packages/remote-sync/lib/model/host.coffee:41:35)
    at ConfigView.module.exports.ConfigView.confirm (/packages/remote-sync/lib/view/host-view.coffee:137:11)
    at /packages/sass-autocompile/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLButtonElement.dispatch (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (/packages/atom-autocomplete-php/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -5:46.5.0 intentions:highlight (input.hidden-input)
     -5:46 core:save (input.hidden-input)
     -2:08.3.0 intentions:highlight (input.hidden-input)
     -2:08.0 core:save (input.hidden-input)
 20x -1:20.9.0 core:move-down (input.hidden-input)
 15x -1:19.4.0 core:move-up (input.hidden-input)
     -1:17.1.0 core:move-right (input.hidden-input)
  2x -1:17.1.0 intentions:highlight (input.hidden-input)
     -1:16.6.0 editor:select-to-end-of-word (input.hidden-input)
     -1:12.7.0 core:move-right (input.hidden-input)
     -1:06.9.0 intentions:highlight (input.hidden-input)
     -1:06.7.0 core:save (input.hidden-input)
     -1:05.7.0 core:move-up (input.hidden-input)
     -1:05.7.0 core:move-right (input.hidden-input)
 16x -1:05.4.0 core:move-down (input.hidden-input)
  2x -0:57.6.0 remote-sync:configure (div.header.list-item)

Non-Core Packages

atom-autocomplete-php 0.25.6 
atom-ide-ui 0.5.3 
autoclose-html 0.23.0 
browser-plus 0.0.98 
busy-signal 1.4.3 
color-picker 2.2.5 
docblockr 0.11.0 
editorconfig 2.2.2 
ide-php 0.6.9 
ide-typescript 0.6.2 
intentions 1.1.5 
language-markdown 0.25.1 
linter 2.2.0 
linter-eslint 8.4.0 
linter-jshint 3.1.6 
linter-php 1.5.1 
linter-sass-lint 1.8.3 
linter-stylelint 4.0.2 
linter-ui-default 1.6.10 
markdown-preview-plus 2.4.16 
markdown-writer 2.7.3 
open-recent 5.0.0 
project-manager 3.3.5 
remember-folds 0.3.0 
remote-sync 4.1.8 
sass-autocompile 0.13.3 
sync-settings 0.8.3 
todo-show 2.1.0 
tool-bar 1.1.0 
tool-bar-markdown-writer 0.3.0 
ThreadedThinking commented 6 years ago

bump, same

daverickdunn commented 6 years ago

Please post your .remote-sync.json. Cheers. Edit: and what changes you're trying to save... Thanks.

tofsjonas commented 6 years ago

I wanted to disable the upload on save-thingy.

It did not matter if I changed anything or not.

I edited .remote-sync.json manually instead and problem went away. If it reappears I will let you know.

Jany-M commented 6 years ago

Same here (Win7 64x, latest Atom 64x and Remote Sync). Host is an IP, connecting through SFTP, data is all correct. If I try and edit .remote-sync.json manually, then save a file, it says "All configured authentication methods failed".

yoyomaster73 commented 6 years ago

I had a project well configurated with remote-sync. I made a git clone and opened the new project in atom. I tried to configure it with remote-sync. Then I had the same issue:Atom: 1.21.1 x64 Electron: 1.6.15 OS: Ubuntu 17.10 Thrown From: remote-sync package 4.1.8

Stack Trace

Uncaught TypeError: Converting circular structure to JSON

At /home/johann/.atom/packages/remote-sync/lib/model/host.coffee:41

TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at Host.module.exports.Host.saveJSON (/packages/remote-sync/lib/model/host.coffee:41:35)
    at ConfigView.module.exports.ConfigView.confirm (/packages/remote-sync/lib/view/host-view.coffee:137:11)
    at /packages/git-control/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLButtonElement.dispatch (/packages/git-control/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (/packages/git-control/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -7:15.6.0 remote-sync:configure (span.name.icon.icon-repo)
  5x -7:07.8.0 core:copy (input.hidden-input)
     -6:03.7.0 remote-sync:configure (span.name.icon.icon-repo)
  4x -5:57.7.0 core:paste (input.hidden-input)
     -1:27.9.0 remote-sync:configure (span.name.icon.icon-repo)
  4x -1:21.6.0 core:paste (input.hidden-input)
     -0:42.5.0 core:backspace (input.hidden-input)

Non-Core Packages

auto-encoding 0.7.0 
auto-replace-in-selection 4.0.0 
busy-signal 1.4.3 
color-picker 2.2.5 
docblock-format-helper 0.3.0 
docblockr 0.13.2 
git-control 0.9.0 
git-status 0.3.4 
git-time-machine 1.5.9 
highlight-selected 0.13.1 
intentions 1.1.5 
language-php-no-dollar-highlight 0.2.0 
linter 2.2.0 
linter-php 1.5.1 
linter-ui-default 1.6.10 
merge-conflicts 1.4.5 
minimap 4.29.7 
minimap-autohider 1.5.3 
minimap-bookmarks 0.4.2 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-highlight-selected 4.6.1 
minimap-linter 2.1.3 
minimap-titles 1.13.0 
pigments 0.40.2 
project-manager 3.3.5 
rectangle-selection 0.2.0 
remote-sync 4.1.8 
split-diff 1.5.1 
Sublime-Style-Column-Selection 1.7.4 
symbols-tree-view 0.14.0 
tablr 1.8.3 
tool-bar 1.1.0 
tool-bar-atom 1.7.0 
vertical-tabs 1.0.5 

Then I just closed atom and opened it again to make it work. Maybe the problem is that atom was opened after I used several times the function "Put on stand by" my "ubuntu mate".

Jany-M commented 6 years ago

@yongkangchen any update on this?

norderik commented 6 years ago

Sample remote-sync.json

 {
  "uploadOnSave": true,
  "useAtomicWrites": true,
  "deleteLocal": true,
  "hostname": "alpha.zmailwerk.net",
  "target": "/var/www/cms/typo3conf/ext/zm_dropdown",
  "ignore": [
    ".remote-sync.json",
    ".svn/**"
  ],
  "username": "mwent",
  "watch": [],
  "useAgent": true,
  "transport": "scp"
}

It happens as well, when I try to create from scratch. Atom V 1.27.2 on Win 10 remote-sync: 4.1.8

jamaluddinrumi commented 6 years ago

try disable the plugin copy .remote-sync.json that already works and then enable the plugin again