Topic "Element "cwd" not found in the log file"

Author Message
mkozak
[View user's profile]

Joined: 2015-07-13
Posts: 2
Location: United States
Trying to upload a file I get this error message on session.Open(sessionOptions);

I've attached the log files.


SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = "virt01",
UserName = "root",
Password = "mypassword",
PortNumber = 22,
SshHostKeyFingerprint = "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
};


// Connect
session.DebugLogPath = Environment.GetEnvironmentVariable("USERPROFILE") + "\\AppData\\Local\\Commander\\DebugLogPath.txt";
session.SessionLogPath = Environment.GetEnvironmentVariable("USERPROFILE") + "\\AppData\\Local\\Commander\\SessionLogPath.txt";
session.DisableVersionCheck = true;
session.Open(sessionOptions);
SessionLogPath.txt (6.61 KB) Private file

Description: (none)

DebugLogPath.txt (28.03 KB) Private file

Description: (none)

Advertisements
AjitKhodke
[View user's profile]

Joined: 2015-07-14
Posts: 1
Location: India
Can you post a callstack of the extension?
_________________
ESDS
mkozak
[View user's profile]

Joined: 2015-07-13
Posts: 2
Location: United States
Error: {0}WinSCP.SessionLocalException: Element "cwd" not found in the log file
at WinSCP.CustomLogReader.WaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.CustomLogReader.WaitForNonEmptyElementAndCreateLogReader(String localName, LogReadFlags flags)
at WinSCP.Session.Open(SessionOptions sessionOptions)
at F5_Add.Add.WinSCP(String source, String dest) in c:\Users\mkozak\Documents\Visual Studio 2013\Projects\F5 Add\F5 Add\Add.cs:line 1806
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Can you post the logs using the latest version of WinSCP?
vpuchko
[View user's profile]

Joined: 2015-12-16
Posts: 2
Location: adf
Hey,

I've got the same exception when trying to synchronize directories. I was using Syncplify.me Server! server and the following code to sync dirs:
Code:

                var sessionOptions = new SessionOptions
                {
                    Protocol = Protocol.Sftp,
                    HostName = _settingsService.GetValue((SFTPSettings s) => s.InboundHost, string.Empty),
                    UserName = _settingsService.GetValue((SFTPSettings s) => s.InboundUsername, string.Empty),
                    Password = _settingsService.GetValue((SFTPSettings s) => s.InboundPassword, string.Empty),
                    SshHostKeyFingerprint = _settingsService.GetValue((SFTPSettings s) => s.InboundSshHostKeyFingerprint, string.Empty)
                };
                SynchronizationResult result;
                using (var session = new Session {ExecutablePath = _winScpPath, DisableVersionCheck = true})
                {                 
                    session.Open(sessionOptions);

                    result = session.SynchronizeDirectories(SynchronizationMode.Local, localFolderPath,
                        folderPath, removeFiles: true);

                    result.Check();
                }


I used standard SFTP server settings and added all required permissions to the user.
winscp_session.log (7.67 KB) [Download]

Description: session log

winscp_debug.log (34.22 KB) [Download]

Description: debug log

vpuchko
[View user's profile]

Joined: 2015-12-16
Posts: 2
Location: adf
Found the issue, the issue was that winscp .net library version didn't match winscp.exe version, reinstalled from scratch and it worked.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License