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

Problem in Safari Mobile with destroy DB #3

Open
D4v1X opened this issue Feb 10, 2016 · 8 comments
Open

Problem in Safari Mobile with destroy DB #3

D4v1X opened this issue Feb 10, 2016 · 8 comments

Comments

@D4v1X
Copy link

D4v1X commented Feb 10, 2016

Scene:

-iPad air 2 & iPhone 6 Plus
-AngularJS: 1.4.8.
-Safari Mobile: last version
-pouchdb: 5.1.0

User case:

I inserted some objects in the database, and then I executed the destroy function and I am creating the empty database again, but when I search documents in the database I can recover the old data.

Why not is empty?
there is a problem?
Am I doing something wrong?

NOTE: without fruitdown and chrome in PC works fine.

1.Step:

var DB_NAME = 'Client';
var databaseConnection = new PouchDB(DB_NAME, {adapter: 'fruitdown'});
//insert 9 Objects
return databaseConnection.allDocs ({include_docs: true}).then (function (docsFromDatabase) {});
//return 9 Objets

2.Step:

function purge() {
    return new PouchDB(DB_NAME).destroy().then(function () {
        databaseConnection = new PouchDB(DB_NAME, {adapter: 'fruitdown'});
        return databaseConnection;
    });
}

3.Step:

return databaseConnection.allDocs ({include_docs: true}).then (function (docsFromDatabase) {});
//return 9 Objects why?
@D4v1X D4v1X changed the title Problem with destroy DB Problem in Safari Mobile with destroy DB Feb 10, 2016
@nolanlawson
Copy link
Owner

You might have discovered a bug in Safari. It's hard to say, though - this plugin passes the full PouchDB test suite on iOS 8.4, which pretty aggressively uses db.destroy(). (It does it before and after every test, and there are ~1500 tests.)

If you could provide a reproducible test case to run, then that would be helpful. :)

@ronycohen
Copy link

Hello,

I encounter a similar issue but not with FruitDown, with WebSQL

  1. The destroy on Safari is working => No Db available in the Safari Inspector.

  2. There I launch a window.location.reload(true) in order to clean everything.

  3. When Recreating the Same DB with same Name => The datas from the previous destroyed DB are available.

This use Case does probably not exist in your test set.

@nolanlawson
Copy link
Owner

@ronyrun Can you reproduce this with pure WebSQL commands? If so, please file an issue on the WebKit bug tracker.

@ronycohen
Copy link

done

@nolanlawson
Copy link
Owner

@ronyrun Can you post a link to the issue you filed on WebKit? Curious to know more.

@ronycohen
Copy link

@nolanlawson
Copy link
Owner

It says "You are not authorized to access bug #156501," but that's okay, no worries.

@nolanlawson
Copy link
Owner

This issue still needs a reproducible test case.

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

No branches or pull requests

3 participants