2 Replies Latest reply on Sep 8, 2017 3:14 AM by supandey RSS
    hhansen Newbie

    File transfer fails

    Hello, people!

     

    I hope someone can give me some pointers on this:  The platform is Windows 10 with our own .NET application.  I've inherited the FileTransferVirtualThing class.  The problem is when trying to transfer a file.  I can move between and browse the directories I've added to the VirtualDirectories dictionary no problem.  When I initialize a file transfer from the mashup it fails.   The file size does not seem to be an issue.  The logging produces this:

     

    2017-09-05 08:07:24.458Z [L: Error] [T: 60] [U: haha] [O: com.thingworx.communications.client.TwApiWrapper] [Error] twFileManager_GetRealPath: Invalid parameters

    2017-09-05 08:07:24.458Z [L: Error] [T: 60] [U: haha] [O: com.thingworx.communications.client.TwApiWrapper] [Error] twFileManager_GetRealPath: Invalid parameters

    2017-09-05 08:07:24.459Z [L: Critical] [T: 60] [U: haha] [O: com.thingworx.communications.client.TwApiWrapper] [Critical] FILE TRANSFER STARTED.  File: (null), Mode: read

    2017-09-05 08:07:24.459Z [L: Error] [T: 60] [U: haha] [O: com.thingworx.communications.client.TwApiWrapper] [Error] twFileManager_GetRealPath: Invalid parameters

    2017-09-05 08:07:24.460Z [L: Error] [T: 60] [U: haha] [O: com.thingworx.communications.client.TwApiWrapper] [Error] twFileManager_GetOpenFile: Missing tid and Error getting real path for *HAHA007:

    2017-09-05 08:07:24.460Z [L: Error] [T: 60] [U: haha] [O: com.thingworx.communications.client.TwApiWrapper] [Error] twFileManager_GetRealPath: Invalid parameters

    2017-09-05 08:07:24.461Z [L: Error] [T: 60] [U: haha] [O: com.thingworx.communications.client.TwApiWrapper] [Error] twFileManager_OpenFile: Error getting real path to file NULL

    2017-09-05 08:07:24.462Z [L: Error] [T: 60] [U: haha] [O: com.thingworx.communications.client.TwApiWrapper] [Error] twStartFileTransfer: Error opening

    2017-09-05 08:07:24.882Z [L: Error] [T: 60] [U: haha] [O: com.thingworx.communications.client.TwApiWrapper] [Error] twFinishFileTransfer: File: /MyFiles/crash_0540_2017-08-21_07-46-29-907_65c0.dmp not found in open files list

     

    Regards,

    Harald Hansen

      • Re: File transfer fails
        hhansen Newbie

        I still have no solution for this. I'm a bit baffled though as to how I can browse the remote directories, but as soon as I start downloading the error message is that I have wrong parameters for GetRealPath().  The SDK documentation is no help, really.  Any suggestions are appreciated!

        • Re: File transfer fails
          supandey Collaborator

          Hi Harald, not sure but does the user have read/write (looks like read is already there since you can list) permission on the folder where the file exists? If you are getting this issue from the Mashup only, you could consider checking the StackTrace. This can be enabled from the ThingWorx Composer > System > Subsystems > Logging Subsystem > Configuration > Enable the Stack Trace (effect is immediate), once you try to access the file via the mashup the stack trace from the service getting executed in the background should log some detail to the ErrorLog of ThingWorx.