login about faq

It was used to work before. But, suddenly, GetFileSize64 method in SFTP returning "18446744073709551615" instead of "-1"(which is the value it used return before).

This is the session log i got :

Session Log = TRAN* Established TCP/IP connection with SSH server

TRAN> SSH-2.0-PuTTY_Local:_May_11_2009_17:22:38

TRAN< SSH-2.0-CrushFTPSSHD

TRAN> KEXINIT

TRAN< KEXINIT

TRAN* Key Algorithms: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256

TRAN* Host Key Algorithms: ssh-dss,ssh-rsa

TRAN* Out Encryption: aes128-cbc,aes128-ctr,3des-cbc,blowfish-cbc,arcfour128,arcfour

TRAN* In Encryption: aes128-cbc,aes128-ctr,3des-cbc,blowfish-cbc,arcfour128,arcfour

TRAN* Out MAC: hmac-md5,hmac-sha1,hmac-md5-96,hmac-sha1-96,hmac-sha256,hmac-sha2-256,hmac-sha256@ssh.com

TRAN* In MAC: hmac-md5,hmac-sha1,hmac-md5-96,hmac-sha1-96,hmac-sha256,hmac-sha2-256,hmac-sha256@ssh.com

TRAN* Out Compress: none,zlib

TRAN* In Compress: none,zlib

TRAN> KEX_DH_GEX_REQUEST

TRAN< KEX_DH_GEX_GROUP/KEXDH_REPLY

TRAN> KEXDH_INIT

TRAN< KEX_DH_GEX_REPLY

TRAN* DSS signature verified

TRAN> NEWKEYS

TRAN< NEWKEYS

TRAN* SSH Key Exchange Success.

TRAN> IGNORE

TRAN> SERVICE_REQUEST

TRAN< SERVICE_ACCEPT

TRAN> USERAUTH_REQUEST (none)

TRAN< USERAUTH_FAILURE

TRAN> USERAUTH_REQUEST (password)

TRAN< USERAUTH_SUCCESS

TRAN> CHANNEL_OPEN

TRAN< CHANNEL_OPEN_CONFIRMATION

TRAN> CHANNEL_REQUEST: subsystem

TRAN< CHANNEL_WINDOW_ADJUST

TRAN< CHANNEL_SUCCESS

SFTP> Sending SSH_FXP_INIT

TRAN> CHANNEL_DATA

TRAN* NumBytes: 9

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_VERSION

SFTP> Sending SSH_FXP_LSTAT

TRAN> CHANNEL_DATA

TRAN* NumBytes: 45

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

SFTP> Sending SSH_FXP_OPEN

TRAN> CHANNEL_DATA

TRAN* NumBytes: 61

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_HANDLE

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 2121

SFTP> Sending SSH_FXP_WRITE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 973

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

SFTP> Sending SSH_FXP_CLOSE

TRAN> CHANNEL_DATA

TRAN* NumBytes: 61

TRAN< CHANNEL_DATA

SFTP< Received SSH_FXP_STATUS

Thanks, Sai Jithendra

asked Jun 13 '14 at 05:22

Sai%20Jithendra's gravatar image

Sai Jithendra
21125


I verified that internally it is returning -1, and I also verified the Objective-C generated wrappers (which is internal Chilkat source code). The Objective-C API is essentially a very thin wrapping around the C++ API. For example, the wrapper for GetFileSize64 looks like this (again, this is not published source code) --

// method: GetFileSize64
- (NSNumber *)GetFileSize64: (NSString *)filePathOrHandle 
    bFollowLinks: (BOOL)bFollowLinks 
    bIsHandle: (BOOL)bIsHandle
{
    const char *arg1 = [filePathOrHandle UTF8String];
    bool arg2 = (bFollowLinks ? true : false);
    bool arg3 = (bIsHandle ? true : false);
    __int64 v = ((CkSFtp *)m_obj)->GetFileSize64(arg1,arg2,arg3);
    return [NSNumber numberWithLongLong: v];
}
Check to see if there is anything in your application's source code that might be treating the integer as an unsigned integer..

link

answered Jun 14 '14 at 08:41

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

edited Jun 14 '14 at 08:42

Thanks for your help. I am converting to unsignedLongLongValue. Now I fixed it and made it as longLongValue.

(Jun 14 '14 at 08:49) Sai Jithendra

Sai, for this problem, I would need to see the contents of the LastErrorText. Unfortunately, the SessionLog doesn't have information that would help.

link

answered Jun 13 '14 at 11:18

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Thanks for quick response. Here is the LastErrorText you asked for. Its saying, it is not a valid path. If the file doesn't exist, it cannot be a valid path right? So, in that case it should return something less than "-1". right?

Make me correct if I am wrong in anything above.

Jun 14 11:24:40 JINNI SecureCellPro[4745] <notice>: Remote File Size = 18446744073709551615 Jun 14 11:24:40 JINNI SecureCellPro[4745] <notice>: Last Error Text = ChilkatLog: GetFileSize: DllDate: Jun 10 2014 ChilkatVersion: 9.5.0.40 UnlockPrefix: GOMYCESSH Architecture: Little Endian; 32-bit Language: IOS Objective-C VerboseLogging: 0 SshVersion: SSH-2.0-CrushFTPSSHD SftpVersion: 3 filename: A6952FCD36A556F9E77F31987E5B7973 followLinks: 0 isHandle: 0 fetchAttributes: filename: A6952FCD36A556F9E77F31987E5B7973 Using FXP_LSTAT Sent message to fetch attributes. StatusResponseFromServer: Request: FXP_LSTAT InformationReceivedFromServer: StatusCode: 2 StatusMessage: A6952FCD36A556F9E77F31987E5B7973 is not a valid file path --InformationReceivedFromServer --StatusResponseFromServer --fetchAttributes Failed. --GetFileSize --ChilkatLog

link

answered Jun 14 '14 at 01:47

Sai%20Jithendra's gravatar image

Sai Jithendra
21125

edited Jun 14 '14 at 01:56

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×200

Asked: Jun 13 '14 at 05:22

Seen: 964 times

Last updated: Jun 14 '14 at 08:49

powered by OSQA