pouchdb-community/pouchdb-quick-search

Won't persist data when run in IE 11

Opened this issue · 4 comments

PouchDB Version 5.4.4

When developing and testing on my desktop computer with IE 11 on Windows 10 (sorry, I'm a Visual Studio guy and I find it convenient build and test in IE (it's a work thing) ), the PouchDB database fails to persist data whenever the app shuts down. Upon a restart of the app the data is gone. Also, PouchDB will frequently throw an error message saying the database has been corrupted. When that happens it is not possible to use the database anymore and you must destroy the database and create a new one to recover from it.

Hi, I actually work on the Edge/IE team at Microsoft now, so you don't have to apologize for testing in IE. 😉

For heavy uses of IndexedDB, I've certainly heard of race conditions or of IE10/11 dropping data or clamping up at weird times, but TBH it's never been tracked down because we never got a reproducible test case. I.e. nobody ever gave us a web page and was like "Load this page 3 times and you'll see the crash." If you can do such a thing, that would be amazing! ✨

OTOH it would also be helpful to know:

  • Is this only IE11? Does it occur in Edge as well?
  • What exactly is the error message? Do you have a screenshot or can you copy-paste the error?

Thanks in advance!

Oops, Just realized I entered this into the search plugin, meant it to be an issue for PouchDB itself. Oh well, it still got to the right person.. That's cool you are working on the Edge/IE team. I used to work on the Bing Maps team in Boulder.

Sorry, I have not observed the error message today. I'll keep my eye out and capture it when it happens again. However, I ran tests on Edge and found it does NOT have the issue. However, I did find an Edge issue with the canvas object. Again the wrong place for that, but perhaps the right person. Ha, Ha... Here's the code that fails in Edge:

var ctx = mycanvas.getContext("2d");

        ctx.drawImage(img, 0, 0, width, height);
        var thumbNail = mycanvas.toDataURL("image/jpg");
        app.log("thumbNail size: " + thumbNail.length);
        try {
            document.removeChild(mycanvas);
        } catch (err) {
            try { mycanvas.removeNode(); } catch (err) { } //Microsoft edge can't handle either of these..
        }

Just got the error in IE 11: "Database has a global failure UnknownError"

Can you file the canvas issue separately? This is a good place to file it: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/

As for the IE 11 Pouch issue, if it's fixed in Edge then unfortunately it might never get fixed in IE11; we're focusing all our efforts on Edge right now and IE11 isn't planned to be maintained...