Skip to content

Error on Android 3.2 webview #331

@trialforce

Description

@trialforce

Hi! I'm developing a offline web app and it work very well with Android 4.4 >, but my employer need it's to work in a old 2011 tablet with Android 3.2, so I came to indexeddbshim. It has about 20 tablets with this awesome version.

I'm using dexie.js.

My code to starts with that:

window.shimIndexedDB.__useShim();

const db = new Dexie('mydatabase', {
    indexedDB: window.shimIndexedDB,
    IDBKeyRange: window.IDBKeyRange,
});

When I force the shim to work the app works well in current Chrome on Windows, but inside the Webview of Android 3.2 I get the following error:

Uncaught TypeError: Cannot read property '__db' of undefined at https://mywebserver/vendor/indexeddbshim.js:5650

When I click the next button I get the error above.

11-08 16:11:33.160 8889-8889/packagename W/Web Console: Unhandled rejection: TypeError: Cannot set property code of undefined which has only a getter
at defineProperty (native)
at defineProperty (https://mywebserver/vendor/polyfill.js:5345:12)
at Function.defineProperty (https://mywebserver/vendor/polyfill.js:2558:14)
at new DOMException (https://mywebserver/vendor/indexeddbshim.js:1506:16)
at createNonNativeDOMException (https://mywebserver/vendor/indexeddbshim.js:1602:12)
at createDOMException (https://mywebserver/vendor/indexeddbshim.js:1710:16)
at https://mywebserver/vendor/indexeddbshim.js:2799:55
at https://mywebserver/vendor/polyfill.js:182:13
at Array.forEach (https://mywebserver/vendor/polyfill.js:3200:12)
at IDBDatabase.transaction (https://mywebserver/vendor/indexeddbshim.js:2797:16) at https://mywebserver/vendor/dexie.min.js:1
11-08 16:11:33.160 8889-8889/packagename E/Web Console: Unhandled promise rejection at https://mywebserver/vendor/polyfill.js:4326

Any tips?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions