Skip to content
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

UriError when syncing to local using a relative remote path #268

Closed
Tjoene opened this issue Aug 2, 2018 · 4 comments
Closed

UriError when syncing to local using a relative remote path #268

Tjoene opened this issue Aug 2, 2018 · 4 comments

Comments

@Tjoene
Copy link

Tjoene commented Aug 2, 2018

Expected Behavior

All files are synced from remote to local using the existing SFTP-configuration from extension version 1.2.7.

Actual Behavior

SFTP extension reports an error and fails to sync any remote file:

[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character

Steps to Reproduce the Problem

  1. Create an empty folder
  2. Create an SFTP-config file using the command SFTP: Config as followed:
{
    "name": "cpp-project",
    "context": "./cpp-project/",
    "host": "#hostname#",
    "username": "#username#",
    "password": "#password#",
    "remotePath": "./development/cpp-project/",
    "syncMode": "full"
}
  1. Execute the command SFTP: Sync to local

Requisites

Extension Logs

[trace] execute sync to local for c:\Users\user\Desktop\VSCode\data\remote-test\cpp-project
[error] Error: [UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character
	at c:\Users\user\Desktop\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:46:317
	at t.e (c:\Users\user\Desktop\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:46:631)
	at new t (c:\Users\user\Desktop\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:48:171)
	at t.e.with (c:\Users\user\Desktop\VSCode\resources\app\out\vs\workbench\node\extensionHostProcess.js:47:368)
	at file2trans.map (C:\Users\user\Desktop\VSCode\data\extensions\liximomo.sftp-1.3.1\out\src\core\fileTransferTask.js:220:118)
	at Array.map (native)
	at syncFiles (C:\Users\user\Desktop\VSCode\data\extensions\liximomo.sftp-1.3.1\out\src\core\fileTransferTask.js:220:47)
	at <anonymous>

Specifications

  • Version: 1.3.1
  • Platform: Windows 10
  • VSCode:
Version: 1.25.1
Commit: 1dfc5e557209371715f655691b1235b6b26a06be
Date: 2018-07-11T15:43:53.668Z
Electron: 1.7.12
Chrome: 58.0.3029.110
Node.js: 7.9.0
V8: 5.8.283.38
Architecture: x64
@liximomo
Copy link
Owner

liximomo commented Aug 2, 2018 via email

@styler2go
Copy link

styler2go commented Aug 6, 2018

Same Problem here. Config:

{
    "name": "testenv",
    "protocol": "ftp",
    "host": "xxx.de",
    "username": "xxx",
    "password": "xxx",
    "ignore": [
        ".vscode",
        ".git",
        "node_modules",
        ".DS_Store"
    ],
    "remotePath": "./xxx/",
    "uploadOnSave": false,
    "concurrency": 10,
    "watcher": {
        "files": "**/*",
        "autoUpload": true,
        "autoDelete": true
    }
}

[error] Error: [UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character

Edit: It works when i remove the "." from the remotePath and use an absolute path as described here:
#265 (comment)

@liximomo
Copy link
Owner

liximomo commented Aug 6, 2018

Please use an absolute path now. A relative path is error-prone.

@tohagan
Copy link

tohagan commented Aug 6, 2018

Now working for me with "remotePath": "/" instead of "remotePath": "./" so looks like it doesn't like the ".".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants