Skip to content
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

PouchDB 7.0 #6946

Closed
daleharvey opened this issue Dec 17, 2017 · 26 comments

Comments

Projects
None yet
@daleharvey
Copy link
Member

commented Dec 17, 2017

Opening a new issues as #6356 has become pretty stale, we have a few upcoming breaking changes I would like to make, so lets get them into a single release to make things easier for all.

If there are things you would like to copy over from the old issue or other breaking changes then this is a good time to mention them

TODOs

  • Deprecate WebSQL - #6943
  • Remove Promise polyfill - #6945
  • Switch to fetch api - #6944
  • allDocs broken on iOS - #7210
  • iOS broken - #7057
  • Chrome broken - #7098
  • iPhone tests broken - #7187
  • Edge / ie isnt passing in travis - #7047

@daleharvey daleharvey referenced this issue Dec 17, 2017

Closed

Checklist for PouchDB 7.0.0 #6356

0 of 10 tasks complete
@marcoturi

This comment has been minimized.

Copy link

commented Feb 4, 2018

Hi, and thank you for this library @nolanlawson and @daleharvey. I'm using PouchDB in ionic applications. I have a question about the deprecation of WebSQL. At the moment indexDB is not supported in iOS envirorments: if you set the adapter to idb and use chrome to simulate an iOS device, pouchDB will not work (no adapter found). There are already issue opened:
#6741
#7057
#6701

And stackoverflow questions without solutions, for example here.

What is the correct upgrade path that you suggest for iOS?

@daleharvey

This comment has been minimized.

Copy link
Member Author

commented Feb 4, 2018

Indexeddb is supported in ios environments (https://caniuse.com/#search=indexeddb) and is passing our test suite in full on every commit to pouchdb (https://travis-ci.org/pouchdb/pouchdb/builds/336891564)

I havent had time to look into what exactly the bug @ #7057 is, but I would suggest helping debug / fix that issue

@marcoturi

This comment has been minimized.

Copy link

commented Feb 4, 2018

@daleharvey In chrome simulation mode doesn't work. Didn't tried on a real ionic app on telephone yet. Steps to reproduce:

  • Open http://jsbin.com/pocoqajofu/edit?js,console on Chrome 63-64.
  • Be sure to have 'idb' as adapter, an press run -> You will see info from the console log.
  • Now put the browser in simulation mode, and pick an iOS device. Press run -> Nothing happen.
@daleharvey

This comment has been minimized.

Copy link
Member Author

commented Feb 4, 2018

Going to be looking into this later, but sounds a lot like the valid function may be broken for some versions of iphone @ https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/index.js#L802. If you could post about this in the actual bug (#7057) that would be great, cheers

@humpedli

This comment has been minimized.

Copy link

commented Feb 6, 2018

@daleharvey No, IndexedDB is not working in WKWebView on iOS.

daleharvey added a commit that referenced this issue Feb 23, 2018

daleharvey added a commit that referenced this issue Feb 26, 2018

@stale

This comment has been minimized.

Copy link

commented Apr 7, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 7, 2018

@gr2m gr2m added pinned and removed wontfix labels Apr 8, 2018

@daleharvey

This comment has been minimized.

Copy link
Member Author

commented Apr 10, 2018

Got asked about this on twitter so updated with the issues I currently believe to be blocking the release, my main concern is to ensure that we are working well on ios with indexeddb since this release will be without websql

@dstaley

This comment has been minimized.

Copy link

commented Apr 12, 2018

Okay, so after a good round of testing from master, I think the majority of the iOS test failures are false negatives. I've tested in both normal Safari and Private Browsing mode on iOS 10.3 (Simulator), iOS 11.3 (Simulator), and iOS 11.4 (iPod touch) and all of the test failures fall into one of the following:

  1. Failures in the sync.js-http-http test case (which isn't even tested on saucelabs)
  2. Failures in the PouchDB 2 and 3 migrations
  3. Failures on 10.3 due to the fact that fetch's Response.blob() doesn't correctly set the type property. This is not an issue in iOS 11.

That being said, I think #7210 isn't part of PouchDB, and most likely is the fault of pouchdb-angular. I can't reproduce #7057, and I have three iOS devices passing all tests (with slight modifications to account for the lack of the type property on 10.3), so I'm fairly sure #7187 is just due to saucelabs being flaky.

iOS 10.3

image

iOS 11.3

image

iOS 11.4

image

iOS 11.4 Private Browsing

image

@dstaley

This comment has been minimized.

Copy link

commented Apr 12, 2018

Also, Safari 10 on macOS lacks the type property on fetch's Response.blob(). Does PouchDB need this property to be present? If so, we'll probably need to polyfill it.

@jpike88

This comment has been minimized.

Copy link

commented May 22, 2018

There's a pretty serious bug which renders PouchDB incompatible with a few different libraries using Safari 10+...

#7086

I think it's a good idea to back apply this fix or any other fixes which can satisfy current stability, so packages like pouchdb-browser are kept solid.

@daleharvey

This comment has been minimized.

Copy link
Member Author

commented May 22, 2018

Also, Safari 10 on macOS lacks the type property on fetch's Response.blob(). Does
PouchDB need this property to be present? If so, we'll probably need to polyfill it.

It will fail the tests if not, but I think we should probably remove the assertions in the tests (and stop polyfilling it in node)

@jpike88 1. please dont spam the bug list, we heard you the first time, 2. I have very little spare time and backporting fixes and doing minor releases takes up a lot of it that I would rather spend on getting this new release out, so no, you are free to backport the fix yourself, or help get a new release out

@jpike88

This comment was marked as off-topic.

Copy link

commented May 22, 2018

Some fixes should be back ported if they're breaking for an entire class of browsers. It's a safe assumption to make that fetch polyfills will be present, and diagnosing the bug is a royal pain because Safari just appears like it's locking up with a corrupted/failed database. I'd recommend ensuring current versions are stable before pursuing new versions with breaking changes. I don't have the time to help, I don't even have the time to fork and figure out how to build this.

For those looking for a solution while waiting, this workaround fixes things in the meantime (run this before anything else):


var isSafari = typeof openDatabase !== 'undefined' &&
    /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) &&
    !/Chrome/.test(navigator.userAgent) &&
    !/BlackBerry/.test(navigator.platform);

var setUserAgent = function (window, userAgent) {
    if (window.navigator.userAgent != userAgent) {
        var userAgentProp = { get: function () { return userAgent; } };
        try {
            Object.defineProperty(window.navigator, 'userAgent', userAgentProp);
        } catch (e) {
            window.navigator = Object.create(navigator, {
                userAgent: userAgentProp
            });
        }
    }
}

if( isSafari && typeof Gamepad !== 'undefined' ) {
     // mangle useragent to skip PouchDB isSafari check
     setUserAgent(window, window.navigator.userAgent.replace('Safari', 'Safar'))
}

@daleharvey

This comment was marked as off-topic.

Copy link
Member Author

commented May 23, 2018

@jpike88 in this project we dont demand work of others, especially in reply to "I dont have the time" and double that when you also mention not having the time in comments. I would love to have the time to do all the backports and releases, but I dont, if you (or anyone else) has the time, you contribute but nobody gets to demand contributions from others ok.

@daleharvey

This comment has been minimized.

Copy link
Member Author

commented May 23, 2018

And we were down to one, we dont have passing tests in any version of ie at the moment, they were passing locally, anyone able to help out with #7047 and we will be ready for a big release :)

@jpike88

This comment was marked as off-topic.

Copy link

commented May 23, 2018

I wasted over four hours yesterday stumbling on a fixed issue, an issue that could (and arguably should) have been rolled out 3 months ago when it was merged. I make a recommendation, give my opinion (in addition to providing a pasted workaround for others to save them the pain I experienced), and somehow that's me making demands? I found my workaround, I'm happy, and I had some feedback to give, like everyone's entitled to do. Don't take things so personally.

@garrensmith

This comment has been minimized.

Copy link
Member

commented May 26, 2018

I realise I need to add some docs around the new deterministic revs before we release. I'll try and get that done this week.

@daleharvey

This comment has been minimized.

Copy link
Member Author

commented May 28, 2018

Cheers @garrensmith that would be helpful, I have ie's up and running so if everyone (particularly on ios) could do any testing and see if you can find any serious issues it would be really useful at this point so we dont get any surprises at release time, we have our CI and my cursory testing / bug finding suggests that indexeddb in safari is good enough to use

@daleharvey

This comment has been minimized.

Copy link
Member Author

commented May 28, 2018

Just to clarify, mentioning ^ because barring any new serious bugs we are good to release and will plan to do so this week

@gine

This comment has been minimized.

Copy link

commented Jun 12, 2018

I'm waiting for next release since 15 days. When you plan to do it?

@bbenezech

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2018

I so much want to see the project move past the iOS drama (and websql 😄)
Cheers @daleharvey, thank you for the tedious but necessary grunt work.

@H--o-l

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2018

Same here, I'm looking forward to test the release, all my support and love !

@daleharvey

This comment has been minimized.

Copy link
Member Author

commented Jun 12, 2018

Currently traveling and at work week so unlikely to get to it for 2 weeks, if someone else could write the release notes + blog.post I could push it sooner

@kolzar

This comment has been minimized.

Copy link

commented Jun 18, 2018

Ok, what/where can i do it for you?

daleharvey added a commit that referenced this issue Jun 21, 2018

daleharvey added a commit that referenced this issue Jun 21, 2018

daleharvey added a commit that referenced this issue Jun 21, 2018

@daleharvey

This comment has been minimized.

Copy link
Member Author

commented Jun 21, 2018

And we are released, thanks all https://pouchdb.com/2018/06/21/pouchdb-7.0.0.html

@daleharvey daleharvey closed this Jun 21, 2018

@gr2m

This comment has been minimized.

Copy link
Contributor

commented Jun 21, 2018

The biggest of congratulations Dale & team 👏

@danielo515

This comment has been minimized.

Copy link

commented Jul 22, 2018

Hello,

Thanks for updates. You should remove the references to webSQL from the guide, they could create confusion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.