Giter Site home page Giter Site logo

Comments (5)

dfahlander avatar dfahlander commented on September 7, 2024

Hi! Looked at it briefly what it could be but I'll try to dive deeper into
it later this week. Could not get the error on my Chrome browser (latest
official chrome browser on win8.1). Tried to run the test simultanously in
two tabs, reloading them in the same time but only got a sporadic timeout
error, which could be due to that the two windows are trying to recreate
the same DB and has to wait for each other.

By the error message it seems like the bug was happening while upgrading
from between different data versions. Could it be that it happens when you
increment the version number?

I'll try looking into it later this week.

Cheers,
David

2014-08-18 20:28 GMT+02:00 iconexperience [email protected]:

I'm currently testing some of my code which uses the Dexie.js library in a
Jasmine testing environment. When reloading the test page I randomly get
the error "Uncaught Error: Dexie specification of currently installed DB
version is missing" with the underlying DOM error "Version change
transaction was aborted in upgradeneeded event handler.". The error
randomly appears on page reload, but most of the time on every second
reload.

I had a very hard time to reproduce the error but came up with a fiddle
which at least in my Chrome browser sometimes produces the same error
message on page reload:

http://jsfiddle.net/dasboe/vL66vxqw/

In the fiddel I run this code before each test:

db = new Dexie('test');

db.version(1).stores({
store1: 'id',
store2: 'id'
});

db.delete().then(function() {
return db.open();
}).then(done);

I'm pretty sure this is part of the problem but I can't tell if there is
something I#M doing wrong or it's a problem on Dexies side.


Reply to this email directly or view it on GitHub
#16.

from dexie.js.

iconexperience avatar iconexperience commented on September 7, 2024

No the version number is definitely not changing. One thing I just noticed: The JSFiddle test just past on my System (Latest Chrome on OS-X 10.9.4) with multiple reloads, but once I opened the Developer Toolbar in Chrome the error occurred on the next reload.

Another problem: In Firefox the test does not work at all.

from dexie.js.

iconexperience avatar iconexperience commented on September 7, 2024

Forgot to mention the error is not reported by Jasmine because the raise exception checkbox does not work with the JSFiddle/Jasmine setup. Instead the error is visible in the console. Jasmine will report a timeout error for the test because the 'done' callback is not called. Possibly the timeout error you got might have been just the error I'm reporting. Jasmine throughs a timeout error if the done callback is not called within 10 seconds.

from dexie.js.

dfahlander avatar dfahlander commented on September 7, 2024

The error could be due to that each iteration leaves an old DB instance open. On next iteration, the old instance will get notified with a versionchanged event and close itself. I tested to begin each iteration with closing any existing db and got it to work better in Chrome.

In Firefox, of some reason, window.indexedDB and window.mozIndexedDB is null in the window.onload event making it not work at all. Don't know if it's another script that sets it to null or what else that could be the reason. Havent dived deeper into that.

from dexie.js.

dfahlander avatar dfahlander commented on September 7, 2024

Updated test that closes DB before each iteration: http://jsfiddle.net/vL66vxqw/7/

from dexie.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.