-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add idb error handling for Internal error opening backing store #9252
Conversation
src/utils/idbUtils.ts
Outdated
@@ -150,6 +169,10 @@ export function isMaybeTemporaryIDBError(error: unknown): boolean { | |||
return isIDBConnectionError(error) || isIDBLargeValueError(error); | |||
} | |||
|
|||
export function isPermanentIDBError(error: unknown): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first glance, this check seems inconsistent with isMaybeTemporaryIDBError given that isIDBConnectionError checks for a very similar message: https://github.com/pixiebrix/pixiebrix-extension/pull/9252/files#diff-ac059c8d1b896fde28f537e24bb46cd62088057e599d99dde3d9152d17fa3f8eR28
Do we know what's going on with the different capitalization/etc. in those messages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have enough context on the "Error Opening IndexedDB". Doing a quick search I can't find anything regarding this specific error and looking at the git history, it points to an old rollbar log link.
Maybe you could tell me more about this connection error message?
75bb247#diff-ac059c8d1b896fde28f537e24bb46cd62088057e599d99dde3d9152d17fa3f8eR5-R7
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9252 +/- ##
==========================================
+ Coverage 74.24% 75.10% +0.86%
==========================================
Files 1332 1370 +38
Lines 40817 42300 +1483
Branches 7634 7890 +256
==========================================
+ Hits 30306 31771 +1465
- Misses 10511 10529 +18 ☔ View full report in Codecov by Sentry. |
Playwright test resultsDetails Open report ↗︎ Flaky testschrome › tests/pageEditor/addStarterBrick.spec.ts › Add starter brick to mod Skipped testschrome › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor |
src/utils/idbUtils.ts
Outdated
@@ -138,6 +142,21 @@ export function isIDBLargeValueError(error: unknown): boolean { | |||
return message.includes("Failed to read large IndexedDB value"); | |||
} | |||
|
|||
/** | |||
* Corrupt chrome profile. Not sure how this happens, but it seems to happen to users | |||
* on citrix machines. This error seems to be unrecoverable and the only solution is to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not just citrix. We've seen this on other devices as well. It's even happened to me on my Mac, though not in a long time
src/utils/idbUtils.ts
Outdated
@@ -150,6 +169,10 @@ export function isMaybeTemporaryIDBError(error: unknown): boolean { | |||
return isIDBConnectionError(error) || isIDBLargeValueError(error); | |||
} | |||
|
|||
function isPermanentIDBError(error: unknown): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're probably better off leaving these as separate checks at the callsite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could name it something like shouldDeleteDatabaseOnAllRetriesFailed
No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack. Do not edit this comment manually. |
* Add idb error handling for Internal error opening backing store * knip * pr feedback * update comments
What does this PR do?
Discussion
Checklist
Leave all that are relevant and check off as completed
For more information on our expectations for the PR process, see the
code review principles doc