Page 1 of 1

Get Latest API command failing

Posted: Tue Oct 03, 2017 3:02 pm
by HenryEI
While preforming a Get Latest command using the Vault API, some of my users are having errors where the first version of the block is retrieved as opposed to the current/latest version. This is causing errors with my program. I am not sure why this is only happening to some users.

This is what I am using, please let me know if it is correct.

Code: Select all

GetOperations.ProcessCommandGet(
    new string[] { vaultFile },
    new GetOptions()
    {
        Merge = MergeType.OverwriteWorkingCopy,
        MakeWritable = MakeWritableType.MakeAllFilesWritable
    });
Is there some settings in Vault that individual users may have set which is causing this?

Re: Get Latest API command failing

Posted: Tue Oct 03, 2017 3:17 pm
by jclausius
Something is not adding up here. Have you debugged the call into ProcessCommandGet() ? If you set MergeType.OverwriteWorkingCopy, it sets an internal variable which should force the client to request the latest file.

Can you compile and debug against the VaultClientIntegration source files to see if that is indeed the case?

Re: Get Latest API command failing

Posted: Tue Oct 03, 2017 3:38 pm
by HenryEI
One of the main difficulties with debugging this, is that I cannot duplicate the error on my computer where I can debug it. I can only observe it on the computers of the users who are having these issues and investigate it without any debugging tools. And the users who are having these problems are unable to lend me their computers since they are extremely busy.

Re: Get Latest API command failing

Posted: Tue Oct 03, 2017 6:12 pm
by jclausius
That will be tough. What if you took and compiled in ProcessCommandGet, but you put in some WriteLines to output some data to a file, and then have the users run that?

Re: Get Latest API command failing

Posted: Mon Oct 09, 2017 10:38 am
by HenryEI
Sorry for the delayed response. I was able to get ahold of a user's computer, and it turned out to be a problem with their settings in Vault itself. In Options>Local Files>Modified working copy, the option had to be set to overwrite, as shown in the attached picture.

Re: Get Latest API command failing

Posted: Tue Oct 10, 2017 8:08 am
by jclausius
Thanks for posting back. I'm glad you were able to get to the bottom of the issue.