Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default aggregation pages in prosjektportalen will fail to load under certain conditions #668

Closed
okms opened this issue Mar 21, 2022 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@okms
Copy link
Contributor

okms commented Mar 21, 2022

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)

CleanShot 2022-03-21 at 14 51 52

  1. Go to the pp365 portfolio hub
  2. Perform the following in the same tab
  3. Click on 'Porteføljeoversikt', let the page load
  4. Click on 'Prosjektoversikt', let the page load
  5. 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

const response = await sp.searchWithCaching({

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

@okms okms added the bug Something isn't working label Mar 21, 2022
@olemp
Copy link
Collaborator

olemp commented Mar 21, 2022

I propose we skip the caching. 💨

@tarjeieo tarjeieo added this to the 1.5.0 milestone Mar 22, 2022
@olemp
Copy link
Collaborator

olemp commented Mar 28, 2022

@pzljanb @tarjeieo @Petterandre We might need to push this to 1.5.1 or later. We have limited time this week if we want to release this Friday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants