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

“Unhandled rejection: OpenFailedError: AbortError Transaction aborted” in Chromium version 49 #967

Closed
xorms opened this issue Jan 9, 2020 · 4 comments

Comments

@xorms
Copy link

xorms commented Jan 9, 2020

I'm using a customized browser based on Chromium core version 49. When I try to integrate Dexie with my project, it shows an error in browser's console and doesn't work.

Unhandled rejection: OpenFailedError: AbortError Transaction aborted
    at Transaction.Dexie.props.create (http://192.168.37.1:8000/umi.js:28520:31)
    at http://192.168.37.1:8000/umi.js:28554:54
    at executePromiseTask (http://192.168.37.1:8000/umi.js:26704:9)
    at new Promise (http://192.168.37.1:8000/umi.js:26503:5)
    at http://192.168.37.1:8000/umi.js:28552:40
    at usePSD (http://192.168.37.1:8000/umi.js:27012:16)
    at newScope (http://192.168.37.1:8000/umi.js:26999:14)
    at Transaction.Dexie.props._promise (http://192.168.37.1:8000/umi.js:28551:18)
    at tempTransaction (http://192.168.37.1:8000/umi.js:27524:26)
    at http://192.168.37.1:8000/umi.js:27520:24
    at callListener (http://192.168.37.1:8000/umi.js:26803:19)
    at endMicroTickScope (http://192.168.37.1:8000/umi.js:26892:25)
    at IDBTransaction.<anonymous> (http://192.168.37.1:8000/umi.js:26978:30)

But if I use Chrome version 79, everything is fine.

here is my code indexedDBUtil.js`

import Dexie from 'dexie';
let async = Dexie.async;
let spawn = Dexie.spawn;
const db = new Dexie('cmisDatabase');
db.version(1).stores({
  dict: '++,dictCode, code,  name',
});
export { db, async, spawn };

Is the version of Chromium too old for Dexie.js?

@dfahlander
Copy link
Collaborator

No, Chrome has had stable indexeddb support since way back in time before version 49. However, if you are using browser-native async/await without transpilation within transactions, version 49 may possibly not support it like the newer versions (See #317). Not sure at which version that Chromium started to support it. However, I suppose native async/await wasn't supported in version 49 anyway?

I think you need to verify that IndexedDB works in the most simple scenario. Your snipped seem not to be complete as I cannot see any code that requests the DB. But if you can limit that to a simple db.open() or just a db.dict.get(1) to see if even that doesn't work, there might be something with your specific customisation of chromium that is not correct - such as privacy settings or so.

@xorms
Copy link
Author

xorms commented Jan 9, 2020

No, Chrome has had stable indexeddb support since way back in time before version 49. However, if you are using browser-native async/await without transpilation within transactions, version 49 may possibly not support it like the newer versions (See #317). Not sure at which version that Chromium started to support it. However, I suppose native async/await wasn't supported in version 49 anyway?

I think you need to verify that IndexedDB works in the most simple scenario. Your snipped seem not to be complete as I cannot see any code that requests the DB. But if you can limit that to a simple db.open() or just a db.dict.get(1) to see if even that doesn't work, there might be something with your specific customisation of chromium that is not correct - such as privacy settings or so.

Sorry, here is the test code.

import Dexie from 'dexie';
const db = new Dexie('cmisDatabase');
  db.version(1).stores({
    dict: '++,dictCode, code,  name',
  });
  db.open();

And this is the console log:

dexie.js:1253 Unhandled rejection: AbortError: Transaction aborted
    at IDBTransaction.<anonymous> (http://192.168.37.1:8945/umi.js:28533:49)
    at IDBTransaction.<anonymous> (http://192.168.37.1:8945/umi.js:26970:23)

@dfahlander
Copy link
Collaborator

Ok, so the only thing you do is declare the db and then call db.open(). Then there must be something wrong with the IndexedDB support in your custom chromium-based browser.

@xorms
Copy link
Author

xorms commented Jan 10, 2020

Thank you. I will report this problem to our Browser Team.

@xorms xorms closed this as completed Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants