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

Couldn't read/deserialize file /data/~/files/io.paperdb/~.pt for table ~ #202

Open
zuhriddinjon opened this issue Oct 26, 2022 · 3 comments

Comments

@zuhriddinjon
Copy link

minifyEnabled true
shrinkResources true

@hamza-mughal5593
Copy link

@zuhriddinjon any solutions?

@filipebrandao
Copy link
Contributor

filipebrandao commented Jan 6, 2023

@zuhriddinjon @hamza-mughal5593 since you have minifyEnabled true, that can be caused because code obfuscation changed the field names. I've experienced the same field getting different obfuscated names in subsequent builds.

If you notice how the data is stored in the table file, you'll see that the field names are written there. Thus an unexpected change in the field name will make it impossible to deserialize data.

Besides the rule indicated here https://github.com/pilgr/Paper#proguard-config , I would recommend also considering keeping enums unless your data models don't use them :
-keep enum your.app.data.model.** { *; }

Update: I've just submitted this PR #204 with all my suggested proguard rules.

@zuhriddinjon
Copy link
Author

I have found a solution. It was the old version of Paper that I used. Once updated it has been solved. Thanks for your attention

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

3 participants