-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Error with Safari 8.0 (OS X 10.10 Yosemite) #2533
Comments
@frdmn We have not tested with Safari 8, because none of the PouchDB devs have access to it yet. :( So your feedback is super valuable. There are two things I'd recommend you to do:
As for unblocking yourself in your own code, if you absolutely need Safari 8 compatibility, then use WebSQL by default and fall back to IndexedDB instead of the other way around: var pouch = new PouchDB('foo', {adapter: 'websql'});
if (!pouch.adapter) { // websql not supported
pouch = new PouchDB('foo', {adapter: 'idb'});
} |
@nolanlawson Thanks for the reply!
I don't really depend on Safari 8 compatibility, so it's not that important to fallback to IndexedDB. |
You didn't give a link... :( |
The test stuck, and I dont have any link to give :/ |
Ah okay, I see that now, you didn't even pass a single test. Yeah, this seems like a pretty basic bug in IndexedDB if you can't even open a database. The line failing is this one. When you report to Apple, feel free to link to this GitHub issue. I think it should give them all the info they need. Thanks! |
Done that :) Let's wait and see if this gets fixed soon. |
@nolanlawson will you update http://pouchtest.com with the new 3.0? Thanks =) |
Done. wait about 20 minutes for the EST midnight cron to kick in. |
@nolanlawson Thank you! Although, it's still showing 2.2.4... am I doing something incorrectly? |
@jprichardson Not sure why, but the cron didn't run. Running it manually now. |
BTW these tests are not guaranteed to pass at 100%. Notably it seems the Couch is slow to respond, so a lot of the over-the-wire tests fail. |
@jprichardson Oh okay, it's up to date. It's just reporting as 2.2.4-prerelease for some reason. |
With PouchDB 3.0.3 and Safari Version 8.0 (10600.1.8) it don't work because of this issue. |
iOS 8 comes out on Friday. Can anybody see if the tests are passing yet? I'll try to borrow a phone at work if possible. |
I just tested on an iOS 8 device (8.0 12A365) and I see the same |
@nolanlawson yeah, I can confirm that (12A365) :/ |
I have experienced this too, with Pouch, other IndexedDB wrappers, and raw IndexedDB. I found Safari does not consistently fire the I am new to IDB, so not 100% sure what the correct behaviour is, or whether this is the issue, but hopefully this is helpful info. |
You mean instead of opening it with version 1 as we do here, we should open it with version 2? Or do you mean that we should open the IndexedDB, then immediately close it and open it with a new version number? |
Yes, in my experiments, opening the database with a different version fixes the problem. I have not tried opening and closing different versions. It is far from a good, consistent solution though. Even after clearing all browser data I need to change the version and reload to get things going. |
I tried to write a short Gist to reproduce the issue, but was unsuccessful. If somebody could help out, that would be great, for two reasons:
I also filed a bug on WebKit. |
@juice49 Sounds like you've been able to write an isolated test that reproduces this issue. Any chance you could share it? 😺 |
@nolanlawson Sorry I haven't yet replied, should be able to add my test case today or tomorrow. |
@juice49 Thanks! The WebKit devs specifically asked for that, so it would probably help a lot. Linking this issue to yathit/ydn-db#20, which is another bug that may hit us after this one gets fixed. |
In case anyone's curious about why this is happening, it turns out WebKit's implementation of IndexedDB is no longer the same as Blink's. They removed the LevelDB dependency and used SQLite instead. |
I have this problem when I try to use multiple stores in a transaction. When I use only one store, everything seems to be fine. The following example will produce DOMException 8 if you click the 'two' button in ios8.
:-( |
@elmerbulthuis Awesome. Thanks to you, I have isolated the error and can pass it on to the WebKit devs. Plus, we can implement a workaround in PouchDB to detect the error and fall back to WebSQL. :) Just go to this site: http://bl.ocks.org/nolanlawson/c83e9039edf2278047e9 |
Fixed by 2a2e722. Now we just need to release 3.0.6. |
@nolanlawson awesome! 👍 |
In PouchDB we found Safari 7.1 and 8 to have the same issues cited in the article about iOS 8. For more details: * pouchdb/pouchdb#2533 * yathit/ydn-db#20 * localForage/localForage#254
I'm using PouchDB 2.2.3 on Safari 8.0 (Latest beta of OS X 10.10) and I get the following error:
Using this code:
Works fine with Firefox 28 and Chrom 36 as well as Safari 7 on OS X 10.7
The text was updated successfully, but these errors were encountered: