Sharefile Web opens alternating versions

  • 1
  • Question
  • Updated 7 months ago
I have created a word-document in my Personal Folder in Citrix Files and edited it in order to create multiple versions. Then I log into ShareFile web at https://lovisalovisatest.sharefile.com and open the document. To my surprise I see that it is not the latest version that is opened. As I open the same document multiple times I experience that alternating versions are opened each time I open it.

The exact same thing happens when I open the document from the mobile app. It says "Getting latest version of file...", but when the document appears it is not the latest version. If I open it again then some other version appears, either a previous version or a later version - it appears to be random.

Also, we are using the API from a Java application, and there too we get alternating fileIds(versions) where we previous always got the latest when calling apiClient.items().get(streamUrl).execute()

Having used both the ShareFile API and web cilent the last year we haven't experienced this up until recently - last week or so. Is there a bug introduced in a recent version, or might there be some settings we can change?
Photo of Øystein Molnes

Øystein Molnes

  • 19 Posts
  • 0 Reply Likes

Posted 9 months ago

  • 1
Photo of Andy Berryman

Andy Berryman, Software Engineer

  • 27 Posts
  • 7 Reply Likes
I'm sorry to hear this and it definitely should NOT be happening as you say.  Unless you are requesting a specific older version by ItemID directly then you should always get the latest version of the File.  Above you mentioned that in your Java code you are making a call to ... apiClient.items().get(streamUrl).execute() ... which indicates that you are using the StreamID to get the File.  Is that correct?

Thanks
-Andy
Photo of Øystein Molnes

Øystein Molnes

  • 19 Posts
  • 0 Reply Likes
Thanks for replying.

Yes, that's correct - we use streamID to get the file, which previously always returned the last version, but not anymore. The same thing also occurs when I add a file using Citrix Files and then try to open it from the web application, as mentioned above - a different version is opened almost everytime.
Photo of Andy Berryman

Andy Berryman, Software Engineer

  • 27 Posts
  • 7 Reply Likes
To help me take the next step ... Please send me a file that contains your AccountID and StreamID ... Just upload a text file here ... https://citrix.sharefile.com/r-r7010cc2eb2c4b169

Thanks
-Andy

Photo of Øystein Molnes

Øystein Molnes

  • 19 Posts
  • 0 Reply Likes
I have uploaded the file, but today suddenly everything seems to be fine. We now seem to always get the latest version of the document whether it's opened in the web client or fetched using the API from our Java code using streamID.

The behavior has definitely changed since yesterday, as we then tested on multiple machines and experienced alternating versions being opened, both when using the web client and the API from Java our java code.

Might there have been a bug fix since yesterday? Is there perhaps some other explanation?
Photo of Andy Berryman

Andy Berryman, Software Engineer

  • 27 Posts
  • 7 Reply Likes
There was no change made yesterday.  I spent a good amount of time trying to reproduce the scenario you mention and was not able to.  There were also already automated Unit and Functional tests which were verifying this very case.  So I'm really not sure what happened.  You definitely sounds sure enough of what you are seeing that I believe something was going on.  In the end I'm glad that things are working for you today.  Please reach out again if the issue pops back up.
Photo of Øystein Molnes

Øystein Molnes

  • 19 Posts
  • 0 Reply Likes
Unfortunately this issue seems to have popped back up several times during the last month. Here is an excerpt from our logs showing how alternating versions are received using the Java API. All log entries are from today 2019-05-08. I guess they will be easier to read if copied into a text editor.

07:51:09 upload streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi672118-1b4d-d7fa-84d9-30b9f26d34f7, versionCreationDate=2019-05-08 07:51:08 (uploads 1. version)
07:51:16 download streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi672118-1b4d-d7fa-84d9-30b9f26d34f7, versionCreationDate=2019-05-08 07:51:08 (downloads 1. version)
07:53:19 upload streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi32cb28-06dd-8953-8822-83085ac51c25, versionCreationDate=2019-05-08 07:53:18 (uploads 2. version)
07:53:49 download streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi32cb28-06dd-8953-8822-83085ac51c25, versionCreationDate=2019-05-08 07:53:18 (downloads 2. version)
07:54:04 upload streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi2d9f57-81eb-d5f2-1966-38fa205fd310, versionCreationDate=2019-05-08 07:54:03 (uploads 3. version)
07:54:40 download streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi32cb28-06dd-8953-8822-83085ac51c25, versionCreationDate=2019-05-08 07:53:18 (downloads 2. version)
07:58:55 download streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi672118-1b4d-d7fa-84d9-30b9f26d34f7, versionCreationDate=2019-05-08 07:51:08 (downloads 1. version)
07:59:01 download streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi2d9f57-81eb-d5f2-1966-38fa205fd310, versionCreationDate=2019-05-08 07:54:03 (downloads 3. version)
07:59:06 download streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi2d9f57-81eb-d5f2-1966-38fa205fd310, versionCreationDate=2019-05-08 07:54:03 (downloads 3. version)
07:59:11 download streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi2d9f57-81eb-d5f2-1966-38fa205fd310, versionCreationDate=2019-05-08 07:54:03 (downloads 3. version)
07:59:20 download streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi32cb28-06dd-8953-8822-83085ac51c25, versionCreationDate=2019-05-08 07:53:18 (downloads 2. version)
07:59:26 download streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi2d9f57-81eb-d5f2-1966-38fa205fd310, versionCreationDate=2019-05-08 07:54:03 (downloads 3. version)
07:59:31 download streamID=st512611-ab62-45fe-bb35-c211a7c121df, fileID=fi672118-1b4d-d7fa-84d9-30b9f26d34f7, versionCreationDate=2019-05-08 07:51:08 (downloads 1. version)

Same thing happens when opening the file from the web client - alternating versions are opened. Could you look into this to try and see what is going on?
(Edited)
Photo of Øystein Molnes

Øystein Molnes

  • 19 Posts
  • 0 Reply Likes
Using Java sharefile-api 3.1.5 (https://github.com/citrix/ShareFile-Java), this is our download-code:

String streamId = "st512611-ab62-45fe-bb35-c211a7c121df";
URI streamUrl = apiClient.getDefaultUrl(streamId);
SFFile file = (SFFile) apiClient.items().get(streamUrl).execute();  

(Edited)