iOS8 & indexedDB #254

Closed
ocombe opened this Issue Sep 26, 2014 · 17 comments

Comments

Projects
None yet
8 participants
@ocombe
Contributor

ocombe commented Sep 26, 2014

It seems that Apple screwed up the iOS8 indexedDB implementation: http://www.raymondcamden.com/2014/9/25/IndexedDB-on-iOS-8--Broken-Bad
Do you know if there is anything you could do to prevent iOS8 from using indexedDB, until this problem is resolved ?

@thgreasi

This comment has been minimized.

Show comment
Hide comment
@thgreasi

thgreasi Sep 26, 2014

Member

You can probably somehow detect the browser and use setDriver, as found in the docs.

Member

thgreasi commented Sep 26, 2014

You can probably somehow detect the browser and use setDriver, as found in the docs.

@thgreasi

This comment has been minimized.

Show comment
Hide comment
@thgreasi

thgreasi Sep 26, 2014

Member

Oops half post...
... But I'm not aware of any iOS 8 browser detection script yet that's also considered production ready.

Member

thgreasi commented Sep 26, 2014

Oops half post...
... But I'm not aware of any iOS 8 browser detection script yet that's also considered production ready.

@tofumatt

This comment has been minimized.

Show comment
Hide comment
@tofumatt

tofumatt Sep 26, 2014

Member

Definitely a bummer! Feature testing is obviously preferred, I'll look through to see if there's something they do that we can test against other than just a User Agent.

  • Matt

On Sep 26, 2014, at 12:35, Olivier Combe notifications@github.com wrote:

It seems that Apple screwed up the iOS8 indexedDB implementation: http://www.raymondcamden.com/2014/9/25/IndexedDB-on-iOS-8--Broken-Bad
Do you know if there is anything you could do to prevent iOS8 from using indexedDB, until this problem is resolved ?


Reply to this email directly or view it on GitHub.

Member

tofumatt commented Sep 26, 2014

Definitely a bummer! Feature testing is obviously preferred, I'll look through to see if there's something they do that we can test against other than just a User Agent.

  • Matt

On Sep 26, 2014, at 12:35, Olivier Combe notifications@github.com wrote:

It seems that Apple screwed up the iOS8 indexedDB implementation: http://www.raymondcamden.com/2014/9/25/IndexedDB-on-iOS-8--Broken-Bad
Do you know if there is anything you could do to prevent iOS8 from using indexedDB, until this problem is resolved ?


Reply to this email directly or view it on GitHub.

@tofumatt

This comment has been minimized.

Show comment
Hide comment
@tofumatt

tofumatt Sep 26, 2014

Member

If IndexedDB is too broken to use I'll leave WebSQL as the default driver for iOS 8.

  • Matt

On Sep 26, 2014, at 12:39, Thodoris Greasidis notifications@github.com wrote:

You can probably somehow detect the browser and use setDriver, as found in the docs.


Reply to this email directly or view it on GitHub.

Member

tofumatt commented Sep 26, 2014

If IndexedDB is too broken to use I'll leave WebSQL as the default driver for iOS 8.

  • Matt

On Sep 26, 2014, at 12:39, Thodoris Greasidis notifications@github.com wrote:

You can probably somehow detect the browser and use setDriver, as found in the docs.


Reply to this email directly or view it on GitHub.

@ocombe

This comment has been minimized.

Show comment
Hide comment
@ocombe

ocombe Sep 26, 2014

Contributor

Since it's the first and only iOS with indexedDB, the user agent test should be pretty easy (just prevent all iOS from using indexedDB ?)

Contributor

ocombe commented Sep 26, 2014

Since it's the first and only iOS with indexedDB, the user agent test should be pretty easy (just prevent all iOS from using indexedDB ?)

@tofumatt

This comment has been minimized.

Show comment
Hide comment
@tofumatt

tofumatt Sep 26, 2014

Member

Right, but I'd prefer not to do that, as things like Cordova/PhoneGap might not report the right UA but have access to a WebKit with IndexedDB. We'll only use UA if there's no other way.

Member

tofumatt commented Sep 26, 2014

Right, but I'd prefer not to do that, as things like Cordova/PhoneGap might not report the right UA but have access to a WebKit with IndexedDB. We'll only use UA if there's no other way.

@ocombe

This comment has been minimized.

Show comment
Hide comment
@ocombe

ocombe Sep 26, 2014

Contributor

Oh yes, you're right, I didn't think of that :)

Contributor

ocombe commented Sep 26, 2014

Oh yes, you're right, I didn't think of that :)

@thgreasi

This comment has been minimized.

Show comment
Hide comment
@thgreasi

thgreasi Sep 26, 2014

Member

A nice thing to discover on Friday...

Member

thgreasi commented Sep 26, 2014

A nice thing to discover on Friday...

@nolanlawson

This comment has been minimized.

Show comment
Hide comment
@nolanlawson

nolanlawson Sep 30, 2014

Contributor

We wrote an isolated test you can use to detect the broken functionality in iOS 8 and Safari 7.1. It detects the issue with being unable to open two object stores at once, although not the issue of keys overwriting each other.

Unfortunately in PouchDB we just fell back to user agent sniffing, because we needed a synchronous test rather than an async one.

Contributor

nolanlawson commented Sep 30, 2014

We wrote an isolated test you can use to detect the broken functionality in iOS 8 and Safari 7.1. It detects the issue with being unable to open two object stores at once, although not the issue of keys overwriting each other.

Unfortunately in PouchDB we just fell back to user agent sniffing, because we needed a synchronous test rather than an async one.

@tofumatt

This comment has been minimized.

Show comment
Hide comment
@tofumatt

tofumatt Sep 30, 2014

Member

Oh, nice. I think we can manage an async test, though I wonder if UA sniffing is much faster...

tofumatt (Sent from mobile)

On 30 September 2014 10:41:04 GMT-04:00, Nolan Lawson notifications@github.com wrote:

We wrote an isolated
test
you can
use to detect the broken functionality in iOS 8 and Safari 7.1. It
detects the issue with being unable to open two object stores at once,
although not the issue of keys overwriting each other.

Unfortunately in PouchDB we just fell back to user agent sniffing,
because we needed a synchronous test rather than an async one.


Reply to this email directly or view it on GitHub:
#254 (comment)

Member

tofumatt commented Sep 30, 2014

Oh, nice. I think we can manage an async test, though I wonder if UA sniffing is much faster...

tofumatt (Sent from mobile)

On 30 September 2014 10:41:04 GMT-04:00, Nolan Lawson notifications@github.com wrote:

We wrote an isolated
test
you can
use to detect the broken functionality in iOS 8 and Safari 7.1. It
detects the issue with being unable to open two object stores at once,
although not the issue of keys overwriting each other.

Unfortunately in PouchDB we just fell back to user agent sniffing,
because we needed a synchronous test rather than an async one.


Reply to this email directly or view it on GitHub:
#254 (comment)

@nolanlawson

This comment has been minimized.

Show comment
Hide comment
@nolanlawson

nolanlawson Sep 30, 2014

Contributor

Yeah. FWIW we use

var isSafari = typeof openDatabase !== 'undefined' &&
    /Safari/.test(navigator.userAgent) &&
    !/Chrome/.test(navigator.userAgent)

That openDatabase test is because IE Mobile now masquerades as Safari in their user agent.

Contributor

nolanlawson commented Sep 30, 2014

Yeah. FWIW we use

var isSafari = typeof openDatabase !== 'undefined' &&
    /Safari/.test(navigator.userAgent) &&
    !/Chrome/.test(navigator.userAgent)

That openDatabase test is because IE Mobile now masquerades as Safari in their user agent.

@tofumatt tofumatt closed this in 664667c Oct 9, 2014

tofumatt added a commit that referenced this issue Oct 9, 2014

Merge pull request #271 from mozilla/fix-ios8
Don't use IndexedDB in iOS 8 (fix #254)
@vrutberg

This comment has been minimized.

Show comment
Hide comment
@vrutberg

vrutberg Oct 16, 2014

Has anyone been able to test this on iOS 8.1 yet? I am experiencing these problems as well, but haven't been able to test in iOS 8.1 so far.

Has anyone been able to test this on iOS 8.1 yet? I am experiencing these problems as well, but haven't been able to test in iOS 8.1 so far.

@tofumatt

This comment has been minimized.

Show comment
Hide comment
@tofumatt

tofumatt Oct 16, 2014

Member

I don't have a phone I can use to test 8.1 on yet, but if it gets fixed in 8.1 I'll surely adjust so it uses indexeddb on 8.1

tofumatt (Sent from mobile)

On 16 October 2014 16:56:21 GMT-04:00, Viktor Rutberg notifications@github.com wrote:

Has anyone been able to test this on iOS 8.1 yet? I am experiencing
these problems as well, but haven't been able to test in iOS 8.1 so
far.


Reply to this email directly or view it on GitHub:
#254 (comment)

Member

tofumatt commented Oct 16, 2014

I don't have a phone I can use to test 8.1 on yet, but if it gets fixed in 8.1 I'll surely adjust so it uses indexeddb on 8.1

tofumatt (Sent from mobile)

On 16 October 2014 16:56:21 GMT-04:00, Viktor Rutberg notifications@github.com wrote:

Has anyone been able to test this on iOS 8.1 yet? I am experiencing
these problems as well, but haven't been able to test in iOS 8.1 so
far.


Reply to this email directly or view it on GitHub:
#254 (comment)

@MauriceSchoenmakers

This comment has been minimized.

Show comment
Hide comment

according to http://bl.ocks.org/nolanlawson/raw/c83e9039edf2278047e9/ and my iphone, not fixed on 8.1

@nolanlawson

This comment has been minimized.

Show comment
Hide comment
@nolanlawson

nolanlawson Oct 22, 2014

Contributor

same, seems it's not fixed on 8.1

Contributor

nolanlawson commented Oct 22, 2014

same, seems it's not fixed on 8.1

nolanlawson added a commit to nolanlawson/caniuse that referenced this issue Dec 1, 2014

Safari 7.1+ IndexedDB is equally buggy as iOS 8+
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

@wle8300 wle8300 referenced this issue in scotttrinh/angular-localForage Nov 3, 2015

Closed

Problem with localforage.INDEXEDDB driver? #63

@CoIin

This comment has been minimized.

Show comment
Hide comment
@CoIin

CoIin Apr 20, 2016

Has anything change here recently? If I'm using Mac OS 10.11, or iOS 9.3.1, do I have to live with the workaround from 16 months ago?

CoIin commented Apr 20, 2016

Has anything change here recently? If I'm using Mac OS 10.11, or iOS 9.3.1, do I have to live with the workaround from 16 months ago?

@bradennapier

This comment has been minimized.

Show comment
Hide comment
@bradennapier

bradennapier Jun 5, 2016

Appears to still not work - localforage on ios = breaks entire page

Appears to still not work - localforage on ios = breaks entire page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment