Sign in

Upload via SFTP not working

  • This topic has 2 replies, 2 voices, and was last updated 1 week, 1 day ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5194
    marcus.schommler

    My first day with Publii today, using v.0.37.3 (build 13870) beta.

    Trying to upload/sync via SFTP to a system in my local LAN (via IP address). ‘Test connection’ with credentials (either password or key file) works. But during ‘Sync your website’ the progress bar simply stops maybe 5 – 10% into the phase ‘Uploading website’.

    Tried both with an empty destination directory (freshly created) as well as after a successful manual upload of an initial set of files (using ‘Mountain Duck’/SFTP with the same set of credentials).

    deployment-errors.log is empty, deployment-process.log shows this:
    [Fri, 19 Feb 2021 16:55:18 GMT] <- files.publii.json
    [Fri, 19 Feb 2021 16:55:18 GMT] ERR (2): SyntaxError: Unexpected token in JSON at position 4096 (SyntaxError: Unexpected token in JSON at position 4096
    at JSON.parse (<anonymous>)
    at Deployment.compareFilesList (C:\Users\marcus\AppData\Local\Programs\Publii\resources\app.asar\back-end\modules\deploy\deployment.js:193:31)
    at C:\Users\marcus\AppData\Local\Programs\Publii\resources\app.asar\back-end\modules\deploy\sftp.js:140:33
    at processTicksAndRejections (internal/process/task_queues.js:93:5)) [<- files.publii.json]
    [Fri, 19 Feb 2021 16:55:18 GMT] ERR (3): SyntaxError: Unexpected token in JSON at position 4096 (SyntaxError: Unexpected token in JSON at position 4096
    at JSON.parse (<anonymous>)
    at Deployment.compareFilesList (C:\Users\marcus\AppData\Local\Programs\Publii\resources\app.asar\back-end\modules\deploy\deployment.js:193:31)
    at C:\Users\marcus\AppData\Local\Programs\Publii\resources\app.asar\back-end\modules\deploy\sftp.js:148:33
    at processTicksAndRejections (internal/process/task_queues.js:93:5)) [<- files.publii.json]

     

    #5205
    Tomasz Dziuda
    Moderator

    Hi,

    Please check you files.publii.json on your server – most probably it is partially uploaded and causes your error due invalid JSON structure.

    You can also validate your files.publii.json file using https://jsonlint.com/

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5210
    marcus.schommler

    Thanks for your answer. I had a look at the source json file in question and couldn’t find anything looking suspiciously at position 4096. So it could have been a partial/faulty transfer as might be indicated by the number being 2^12, which might be the transfer block size.

    Anyhow, due to some fiddling around with the site files myself and trying to move them to a different location I somehow managed to totally loose them and had to start anew (just an hour of work lost). With this new attempt the problem currently does not appear again so I do consider the topic closed.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Upload via SFTP not working’ is closed to new replies.