Describe the bug
Default aggregation pages in prosjektportalen will fail to load when certain preconditions are met. This fault is reproduceable in any tenant and presumably any browser.
To Reproduce
Preconditions:
About 90 projects availiable and searchable in the tenant. The actual value vill vary based on the amount of data returned by the search query
PP. 1.3.1 (tested version, the error exists in 1.4.0 as well)
Go to the pp365 portfolio hub
Perform the following in the same tab
Click on 'Porteføljeoversikt', let the page load
Click on 'Prosjektoversikt', let the page load
Click on 'Porteføljeinnsikt', let the page load
Expected behavior
Each page loads without error
Observed behavior
Page loading crashes after the 2nd or 3rd page. When reviewing the console the following error is printed
portfolio-aggregation-web-part_b138a2a3ceedaeddaf99.js:1 Message: Failed to execute 'setItem' on 'Storage': Setting the value of 'PnPjs.SearchWithCaching(1230701932)' exceeded the quota. Data: {"stack":"Error: Failed to execute 'setItem' on 'Storage': Setting the value of 'PnPjs.SearchWithCaching(1230701932)' exceeded the quota.\n at e.put (https://tenantname.sharepoint.com/sites/AppCatalog/ClientSideAssets/00483367-68e2-4977-9cc3-6cf0de623daa/portfolio-aggregation-web-part_b138a2a3ceedaeddaf99.js:1:97574)\n at e.cacheData (https://tenantname.sharepoint.com/sites/AppCatalog/ClientSideAssets/00483367-68e2-4977-9cc3-6cf0de623daa/portfolio-aggregation-web-part_b138a2a3ceedaeddaf99.js:1:371563)\n at https://tenantname.sharepoint.com/sites/AppCatalog/ClientSideAssets/00483367-68e2-4977-9cc3-6cf0de623daa/portfolio-aggregation-web-part_b138a2a3ceedaeddaf99.js:1:371450"}
About your setup
Edge Chromium Version 99.0.1150.46 (Official build) (arm64)
Installed version 1.3.1
Additional context
The error is caused by local storage exceeding the availiable quota. On our end this is happening here
We are not supplying any ICachingOptions to sp.searchWithCaching which we could look into, e.g. supplying page name or as key. This is worth investigating, turning off caching or adding error handling which flushes local storage are other options. We are currently on v. 1.x of pnpjs, which is a rather old version, searchWithCaching has been removed in 3.x in favour of separate caching settings.
A workaround is to open each page in a separate tab, i assume this is because the default caching behaviour in our version of pnpjs is to use session caching.
Describe the bug Default aggregation pages in prosjektportalen will fail to load when certain preconditions are met. This fault is reproduceable in any tenant and presumably any browser.
To Reproduce
Preconditions:
Expected behavior Each page loads without error
Observed behavior Page loading crashes after the 2nd or 3rd page. When reviewing the console the following error is printed
About your setup
Additional context The error is caused by local storage exceeding the availiable quota. On our end this is happening here
https://github.com/Puzzlepart/prosjektportalen365/blob/3366f13fc105e3f1cb73617129fa35017637f5ae/SharePointFramework/PortfolioWebParts/src/data/index.ts#L503
We are not supplying any ICachingOptions to sp.searchWithCaching which we could look into, e.g. supplying page name or as key. This is worth investigating, turning off caching or adding error handling which flushes local storage are other options. We are currently on v. 1.x of pnpjs, which is a rather old version, searchWithCaching has been removed in 3.x in favour of separate caching settings.
A workaround is to open each page in a separate tab, i assume this is because the default caching behaviour in our version of pnpjs is to use session caching.
cc: @pzljanb @tarjeieo @olemp