none
WOPI protocol does not send unlock call when user is idle on word document RRS feed

  • Question

  • We are implementing the host side of the wopi protocol for our application. When we start editing a powerpoint or excel document and then leave for awhile, an unlock call will be made on our behalf and save our changes. However, when editing a word document and then going idle, an unlock call will not be made on our behalf, and our changes will not be saved. Why do word documents behave this way? It seems like we shouldn't have to implement some custom code to avoid losing changes. Also will co authoring handle this gracefully?

    Thursday, May 30, 2019 3:22 PM

All replies

  • Hi morlando016,
    Thank you for your inquiry about WOPI protocol. We have created an incident for investigating this issue. One of the Open specifications team member will contact you shortly.
     
     
    Regards,
    Sreekanth Nadendla
    Microsoft Windows Open specifications
    Thursday, May 30, 2019 3:41 PM
    Moderator
  • Hi morlando016,

    Are you integrating with Office Online Server, the on-premise deployment? Or are you integrating with Office Online in the cloud (O365)? This forum is only pertinent to WOPI hosts integrating with Office Online Server on-premise deployments. If you're integrating with O365 (cloud) then you'll need to ask this question in the correct channel for the Cloud Storage Partner Program, see the other FAQ here:

    https://social.msdn.microsoft.com/Forums/en-US/8ed5b708-9edf-4839-a13f-e93e59396ff1/wopi-host-implementers-please-read?forum=os_office

    "Office 365 Integration"

    Regards,
    Abby Wang
    Microsoft Office Open Specifications

    Thursday, May 30, 2019 9:37 PM
  • We are integrating with the on prem version
    Friday, May 31, 2019 2:26 PM
  • Hi morlando016,
     
    Thanks for your confirmation.
     
    Have you had a chance to run WOPI Validator yet? If not, you can find the resource by below link. In there, you'll find a link to the github project for the WOPI Validator tool. This will provide validation of your WOPI host implementation and will likely resolve many basic issues. https://social.msdn.microsoft.com/Forums/en-US/8ed5b708-9edf-4839-a13f-e93e59396ff1/wopi-host-implementers-please-read?forum=os_office
     
    If the WOPI Validator doesn’t help the issues, could you help send me more details for me to dig into the issue? Please send an email to dochelp at microsoft.com, reference the URL for this thread and my name, including a real-time video to record the user interactions with Word Online and a corresponding fiddler trace of the conversation between your WOPI API implementation and Office Online Server during the repro, which allows me dig into the details to look for the cause.
     
    Regards,
    Abby Wang
    Microsoft Office Open Specifications

    Friday, May 31, 2019 9:09 PM
  • Yes we have run the wopi validator. We have 2 failing tests, but I dont see why they would cause this issue specifically for Word documents but not Excel or Powerpoint. The 2 failing tests are PutUnlockedFile and files.PutFileReturnsDifferentVersion. We have a fix in mind for the PutFileReturnsDifferentVersion, I am not sure if a fix for PutUnlockedFile is being worked on. PutUnlockedFile is failing on the 2nd putfile with this error "Incorrect StatusCode. Expected: 200, Actual: 409"
    Monday, June 3, 2019 4:58 PM
  • Hi morlando016,

    Thanks for your response. Please note that Word treats locking differently than both PowerPoint and Excel and has some specific cases which are tested by the validator. So even though PowerPoint and Excel may be fine with your implementation, Word still may have a problem shown by the validator issue. We still should focus on trying to fix these two failing tests first.  If you need help with fixing the failed PutUnlockedFile test or both tests, please send me a fiddler trace and the output of WOPI Validator when you run the test. Also, could you follow the details in my last post to send me a video and corresponding Fiddler trace about the original word behavior issue then I can investigate the issue. In both cases, please send an email to dochelp at microsoft.com, reference the URL for this thread and my name so that we can arrange the transfer of files.

    Regards,
    Abby Wang
    Microsoft Office Open Specifications

    Monday, June 3, 2019 10:43 PM
  • Hi morlando016,

    I would like to follow up with you about your questions. Did you find a fix for both of the failing tests? Does the save/unlock call issue for Word still happen for you? We didn’t receive any emails from you yet, so I am trying to provide some info from the protocol level for you. Hope it helps.

    In your original post, you mentioned “an unlock call will not be made on our behalf, and our changes will not be saved.”
    About the unlock call, how long did you wait to get the unlock call? If you didn’t do anything to trigger the unlock call, your WOPI REST implementation is required to expire the lock after 30 minutes.
    Link for details:
    https://wopi.readthedocs.io/projects/wopirest/en/latest/files/RefreshLock.html?highlight=expire
    “The RefreshLock operation refreshes the lock on a file by resetting its automatic expiration timer to 30 minutes. The refreshed lock must expire automatically after 30 minutes unless it is modified by a subsequent WOPI operation, such as Unlock or RefreshLock.”
    https://wopi.readthedocs.io/en/latest/faq/editing_finished.html#how-does-a-wopi-host-know-when-an-editing-session-is-finished
    and
    https://wopi.readthedocs.io/projects/wopirest/en/latest/concepts.html?highlight=expire#term-lock - Please read these entire sections on Locks.

    About saving changes, did you see “saved”, “saved to <Host Name>”, “saving” or “working” after you finished editing the word file? They represent different meanings.
    Link for details: https://wopi.readthedocs.io/en/latest/faq/edit_save.html
    “If the status bar reads Saved or Saved to <HOST NAME>, then the edits have successfully made it to the server. However, if the status bar reads Saving… or Working…, then the edits have not yet been sent to the server and may be lost if the browser is closed or if you navigate away from the Office Online application immediately.”

    Also, please let us know if you have any concerns about sending us emails. If you can send us more information about your implementation, we can get a better understanding of your issues and it will make finding a solution more promising.

    Best regards,
    Abby Wang
    Microsoft Office Open Specification

    Thursday, June 6, 2019 2:53 AM
  • Hi morlando,

    We need to collect data from you in order to provide further assistance. Since we’ve not heard from you for a week, we will assume for now that you’ve either resolved the issue or moved on to more important tasks. Once you are able to work on this again, including sending us the data required to resolve the issue, please post again and we will make arrangements to collect the data.

    Regards,
    Abby Wang
    Microsoft Office Open Specifications

    Monday, June 10, 2019 5:12 PM
  • Hi morlando016, 

    We are considering this issue resolved. If you still need assistance, please post again and we will help. 

    Best regards,
    Tom Jebo
    Sr Escalation Engineer
    Microsoft Open Specifications

    Friday, September 13, 2019 9:06 PM
    Moderator