microsoft / Office-Online-Test-Tools-and-Documentation

Office Online test tools and documentation
https://docs.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/
MIT License
232 stars 162 forks source link

Word sometimes shows stale data in edit mode and latest data in view mode #472

Open shreyCreator opened 3 weeks ago

shreyCreator commented 3 weeks ago

Hey, I am getting a issue sometimes when edit mode of word(via WOPI) shows data of previous version but when i switch to view mode then it shows correct data. But it happens only 1-2 out of 10 times. Steps when it happens sometimes

RobRol commented 3 weeks ago

Hi @shreyCreator,

I should start by saying that I'm not on the product team who owns this scenario. However, I'd like to better understand the third bullet. How do you do the following:

"checked in a completely new document having different file name
 (version becomes 0.3) but fileId is same as of 0.1 and 0.2 version"

I can imagine a world where a rename would change the filename, but keep the file's id. However a rename doesn't change the contents of the document. Checking in a new file, confuses me. What happened to version 0.2 of the file?

If you are overwriting the document, I'd like to better understand how you are doing so? The Wopi lock is intended to prevent any file changes to the document from clients who aren't WOPI aware. This is why the WOPI PutFile operation requires that the lock string match the active lock. It is intended to prevent these type of scenarios.

If you are trying to support coauthoring with, say, a desktop version of Microsoft Word when that is not supported by the standard CSPP program. Fortunately, the CSPP Plus program can support coauthoring between Office Web, Office Mobile, and Office Desktop.

shreyCreator commented 3 weeks ago

Hey @RobRol , I got the issue. we were allowing the user to override the document(basically upload a new document) even though it's locked hence we got the above error. We have fixed the above issue by now allowing user to upload a new file when a active session is going on using locks

But there is one more case where we are facing the same issue. Let me quickly explain the scenerio -