SharePoint 2019 - 'Document Locked for Shared Use by [Me]'

August Vinkel 41 Reputation points
2022-09-29T05:43:26.517+00:00

Hi.

We're running SharePoint 2019 (April 2022 CU) , we are having some problems regarding the locking of documents.

More specifically, any change to the contents of a document, causes it to be 'Locked For Shared Use'. Meaning that when you attempt to change either the document content, or the properties of the listitem, you are met with the error "Document Locked for Shared Use by X" which in some cases can even be yourself. The file remains like this for up to 30 mins, which causes quite a bit of issues day to day.

Looking throughout the internet, it seems that a variation of this has been an issue throughout the years:

sharepoint-2010-is-putting-a-lock-on-newly-created-document-in-document-library-for-1-minute
file-is-locked-for-shared-use-sp2013f-terminal-server-office-2013
483099

But most 'solutions' are waiting for the next CU to fix the issue, which seemingly hasn't worked for us.

Environment Details:

  • SharePoint server 2019 (April 2022 CU, On Premise)
  • Modern UI
  • Versioning – Enabled
  • Checkin/out - Disabled
  • Opens Documents - In server default (Browser)
  • Availability of offline client - Enabled

We've tried

  • Restarting the environment
  • Updating the CU
  • Open documents in client instead of browser

I recognize Checkin/out might fix the issue, but it would hurt the user experience immensely. So its the last option.

Has anyone experienced something similar, and if so did you ever get around it, and how?

Thank you in advance

EDIT:
The cause of these locked documents seems to be the 'CellStorageService' not being called when closing word and instructing SharePoint to 'ReleaseLock'.
Why these calls aren't being made, I don't know.

EDIT2:
A solution was found!
The missing call to the 'CellStorageService' upon closing down the word document, was fixed by disabling the Cache deletion Option in word. The reason as to why still eludes me. Some of our users dont experience this issue, even when the cache deletion turned on. But for those affected by it, disabling it corrected the issue.

257121-image.png

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,674 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Shad 5 Reputation points
    2023-01-25T16:21:04.24+00:00

    File stuck in Office Document Cache can also cause this issue.

    In Office Apps such as Excel, please go to File > Options > Advance, scroll down to the end in right pane, and you will find a button "Delete Cached Files". Click the same and restart Excel and see if the issue is resolved.

    Make sure that all your Sharepoint files are closed and synced to Sharepoint before you delete cached files.

    1 person found this answer helpful.

  2. Caroline C 5 Reputation points
    2023-08-30T14:57:27.6233333+00:00

    Hi, here's a solution that worked for me: opening the file i Excel using "File / Open and Repair" and then save the file again. That way, the file was no longer locked.

    You never know, it's worth the try!

    1 person found this answer helpful.
    0 comments No comments

  3. Xuyan Ding - MSFT 7,561 Reputation points
    2022-09-29T09:49:00.657+00:00

    Hi @August Vinkel ,

    You can try the latest CU update to see if the problem is improved. I found a related description of a problem with changing the properties of a list item in the September KB 5002258.
    246022-image.png
    Reference: SharePoint 2019 update history


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  4. Sant'Anna 1 Reputation point
    2023-07-19T00:10:40.3066667+00:00

    I faced the same issue of getting locked out of a document and receiving a message that it was locked by myself.

    When attempting to check out via Teams interface, I got an error message, then I selected the option "Open in Sharepoint" and from there I was able to successfully check out without the need to retrieve any history version, nor worry abouy cached data.

    I hope this helps.

    0 comments No comments

  5. rtamarizcastillo 0 Reputation points
    2023-09-04T21:33:47.3033333+00:00

    In my specific case, through a flow I create files, assign dynamic names based on templates and run scripts inside each file to automate the filling of information through metadata of my list. I got the error when I tried to update the metadata of a library. After trying different solutions, I tried a change in the order of the flow to test the sequence and it worked. I hope this can help you in your search for solutions. Past

    Present

    0 comments No comments