lukasbach / monaco-editor-auto-typings

Automatically load declaration files while typing in monaco editor instances
https://lukasbach.github.io/monaco-editor-auto-typings/
MIT License
181 stars 39 forks source link

QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'PACKAGE' exceeded the quota. #17

Closed dolanmiu closed 2 years ago

dolanmiu commented 2 years ago

Sometimes it exceeds the quota, any way around this issue?

core.mjs:6461 ERROR Error: Uncaught (in promise): QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of '__autotyper_cache_googleapis@105.0.0/build/src/apis/paymentsresellersubscription/v1.d.ts' exceeded the quota.
Error: Failed to execute 'setItem' on 'Storage': Setting the value of '__autotyper_cache_googleapis@105.0.0/build/src/apis/paymentsresellersubscription/v1.d.ts' exceeded the quota.
    at LocalStorageCache.<anonymous> (LocalStorageCache.js:54:1)
    at step (LocalStorageCache.js:33:1)
    at Object.next (LocalStorageCache.js:14:46)
    at LocalStorageCache.js:8:1
    at new ZoneAwarePromise (zone.js:1427:1)
    at push.15145.__awaiter (LocalStorageCache.js:4:1)
    at push.15145.LocalStorageCache.storeFile (LocalStorageCache.js:52:1)
    at ImportResolver.<anonymous> (ImportResolver.js:544:1)
    at step (ImportResolver.js:67:1)
    at Object.next (ImportResolver.js:48:46)
    at resolvePromise (zone.js:1211:1)
    at new ZoneAwarePromise (zone.js:1430:1)
    at push.15145.__awaiter (LocalStorageCache.js:4:1)
    at push.15145.LocalStorageCache.storeFile (LocalStorageCache.js:52:1)
    at ImportResolver.<anonymous> (ImportResolver.js:544:1)
    at step (ImportResolver.js:67:1)
    at Object.next (ImportResolver.js:48:46)
    at fulfilled (ImportResolver.js:39:43)
    at _ZoneDelegate.invoke (zone.js:372:1)
    at Object.onInvoke (core.mjs:25457:1)

image

lukasbach commented 2 years ago

I added a workaround in case localstorage accesses fail, should not happen anymore in 0.4.3.