-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
Degration of indexeddb to MemoryStore does not work anymore #2384
Labels
Comments
Can you share any errors or stack traces maybe? |
Not sure if this helps: Stack trace
It references following Code snippets: // indexeddb-local-backend.js : 87
function selectQuery(store, keyRange, resultMapper) {
const query = store.openCursor(keyRange);
return new Promise((resolve, reject) => {
const results = [];
query.onerror = () => {
reject(new Error("Query failed: " + query.error));
}; // collect results
// [...]
} This error is not caught from the // indexeddb.ts:292
private degradable<A extends Array<any>, R = void>(
func: DegradableFn<A, R>,
fallback?: string,
): DegradableFn<A, R> {
const fallbackFn = super[fallback];
return async (...args) => {
try {
return func.call(this, ...args); // THIS DOES NOT CATCH THE FAILING PROMISE
} catch (e) {
[...] |
Yup good spot, has a missing |
schmop
pushed a commit
to schmop/matrix-js-sdk
that referenced
this issue
May 19, 2022
t3chguy
pushed a commit
that referenced
this issue
May 19, 2022
Co-authored-by: Lars Richard <[email protected]>
t3chguy
pushed a commit
that referenced
this issue
May 20, 2022
Co-authored-by: Lars Richard <[email protected]> (cherry picked from commit 81d884f)
t3chguy
added a commit
that referenced
this issue
May 20, 2022
Co-authored-by: Lars Richard <[email protected]> (cherry picked from commit 81d884f) Co-authored-by: schmop <[email protected]>
su-ex
added a commit
to SchildiChat/matrix-js-sdk
that referenced
this issue
Jun 7, 2022
* Convert `getLocalAliases` to a stable API call ([\matrix-org#2402](matrix-org#2402)). * Fix request, crypto, and bs58 imports ([\matrix-org#2414](matrix-org#2414)). Fixes matrix-org#2415. * Update relations after every decryption attempt ([\matrix-org#2387](matrix-org#2387)). Fixes element-hq/element-web#22258. Contributed by @weeman1337. * Fix degraded mode for the IDBStore and test it ([\matrix-org#2400](matrix-org#2400)). Fixes matrix-org/element-web-rageshakes#13170. * Don't cancel SAS verifications if `ready` is received after `start` ([\matrix-org#2250](matrix-org#2250)). * Prevent overlapping sync accumulator persists ([\matrix-org#2392](matrix-org#2392)). Fixes vector-im/element-web#21541. * Fix behaviour of isRelation with relation m.replace for state events ([\matrix-org#2389](matrix-org#2389)). Fixes element-hq/element-web#22280. * Fixes matrix-org#2384 ([\matrix-org#2385](matrix-org#2385)). Fixes undefined/matrix-js-sdk#2384. Contributed by @schmop. * Ensure rooms are recalculated on re-invites ([\matrix-org#2374](matrix-org#2374)). Fixes element-hq/element-web#22106.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If the indexeddb throws an exception, normally the store would have degraded on a MemoryStore.
This does not longer work, because of the switch to the async-notation. The exceptions do not get caught and the degration will not be started.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
An error is thrown in the console, indexeddb will not be used anymore, and the backend store falls back to the MemoryStore.
The text was updated successfully, but these errors were encountered: