SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 998 forks source link

Changes to list item(s) saved, but sometimes not applied to live version of list - Unsafe headers #9255

Open DmitriyVdE opened 10 months ago

DmitriyVdE commented 10 months ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

πŸ’₯ SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

Additional environment details

Describe the bug / error

We're currently seeing weird behavior on all lists of one of our sites and have only encountered it there since this is the only site where various colleagues make changes directly within the SharePoint list UI. So I'm not sure if this occurs anywhere else.

The problem is the following: Sometimes, when a users modifies a list item in a list it is displayed to them like you'd expect with the changes they made. But when looking at the list with an unaffected user, or an application, the change is not actually applied to the list.

The change (Orange field formatting):

2023-10-05_09-25-43-530_chrome

You'd think this is something client side, and after clearing all site data and hard reloading, this seems to be the case and the actual live version of the list is loaded and displayed.

The live version loads again:

2023-10-05_09-26-31-801_chrome

BUT, all subsequent reloads fetch the changes again that the user made (See first screenshot) as if they are actually applied to the list item(s). So I can confirm they are saved somewhere server-side, but not actually on the list.

When looking in the console, the following errors (Refused to get unsafe header "{INSERT HEADER KEY HERE}") are displayed when the unapplied data is loaded and displayed:

2023-10-05_09-29-29-097_chrome

There's also a failed POST request to localhost for a 'SyncNow' action.

2023-10-05_09-30-14-224_chrome

This issue randomly happens to some users for some random period, sometimes a few hours, sometimes days, after which the changes actually get applied to the list and any other changes are also applied to the live version of the list.

We tried disabling 'Offline Client Availability' within the advanced list settings, and thought this fixed it, but when this occurred again with another user on a different list, disabling this had no effect.

We have tested getting list data through an application using an app registration with delegated permissions, and logging in with the affected user with interactive login, and here they actually get the live version of the list, so this is a SharePoint Online-only issue.

I've also logged in in different browsers (incognito and normal) so this doesn't seem to be a fix-it-by-logging-in-again issue.

Steps to reproduce

  1. Create or use an existing list
  2. Make changes
  3. Clear all site data and reload once
  4. See if old data is loaded again (actual live data)
  5. Reload again and see if changes are applied again

Expected behavior

When a user makes changes to a list item, the change actually get's applied to the list.

ghost commented 10 months ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.