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

Data Export not working on Sync-2 #2760

Closed
esurface opened this issue Jun 17, 2021 · 4 comments
Closed

Data Export not working on Sync-2 #2760

esurface opened this issue Jun 17, 2021 · 4 comments
Assignees
Labels
Milestone

Comments

@esurface
Copy link
Contributor

Current version: v3.17
Upgraded from:
Issue on tablet and/or server: tablets running either Android 7, 8 or 9

Exporting data from the tablet has the variable list but no information in the sql table and database.

org.test.zip

@esurface esurface added the bug label Jun 17, 2021
@chrisekelley chrisekelley added this to the v3.19.0 milestone Jun 17, 2021
@chrisekelley
Copy link
Member

chrisekelley commented Jun 17, 2021

Is this on an APK that is using the non-encrypted flag in app-config.json? We need to update the db dump code to look for that; right now it is assuming if isCordova, then dump from sqlite db.

Background from our chat:

[9:00 AM] Kelley, Chris
If the APK is running with turnOffAppLevelEncryption:true, then it is running indexedDB instead of sqlite. The app that does the db dump does not know about turnOffAppLevelEncryption:true - it only tests for isCordova - if it is running on an APK. The assumption back then is only apk's did the file-based db dumps.
​[9:01 AM] Kelley, Chris
So, it would be trying to copy over a file-based db, which would not exist in this case, or be sized 0.
​[9:02 AM] Kelley, Chris
indexedDB-based PWA's - and now APK's using turnOffAppLevelEncryption:true - would use a different method for dumping the db data.

@chrisekelley
Copy link
Member

Check for turnOffAppLevelEncryption set to true in app-config.json

@esurface
Copy link
Contributor Author

Confirmed - the site is using turnOffAppLevelEncryption:true

@rjcorwin
Copy link
Contributor

rjcorwin commented Jul 8, 2021

This was fixed in v3.18.1. However, there are two problems with the backup feature. First is the backups may not be very useful because it's a list of documents as opposed to a changes feed so we can only find in the backup doc ids that don't exist in the target db as opposed to updates to documents. Second problem is if the database is large enough, it crashes the tablet when writing to disk so it needs to be batched. New ticket for v3.20.0 #2778

@rjcorwin rjcorwin closed this as completed Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants