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

allDocs return empty rows. #120

Open
ManishAhire opened this issue Apr 4, 2019 · 3 comments
Open

allDocs return empty rows. #120

ManishAhire opened this issue Apr 4, 2019 · 3 comments

Comments

@ManishAhire
Copy link

ManishAhire commented Apr 4, 2019

I stored data from API. Then if my application goes offline then I fetch data my pouch db, but its return empty rows.

My Code

localDB.allDocs({ include_docs: true }).then(data => {
     console.log("All Docs :- ", data);
});

o/p :-

{ total_rows: 30, offset: 0, rows: [] }

Here the total_rows is 30 but its return empty rows.

Its working fine in iOS but not in Android.
Please help.

@duytq94
Copy link

duytq94 commented May 7, 2019

Hi @ManishAhire
I just found this things:
When I use console.log, I have the same issue to you
image_2019_05_07T08_16_06_170Z
But when I open debugger, it has data
image_2019_05_07T08_16_31_473Z
I don't know why this happen, but just keep researching.
Hope someone can help us. Thanks.

These things just happen on Anroid (iOS is fine).

@ManishAhire
Copy link
Author

Thank you @duytq94 , but when we parsed it, it gives empty rows. Don’t know why this happened.

@duytq94
Copy link

duytq94 commented May 8, 2019

@ManishAhire
I just found this and tested: https://dev.to/craftzdog/hacking-pouchdb-to-use-on-react-native-1gjh
It works.

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

No branches or pull requests

2 participants