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

MdbxError (17): File exists #1592

Open
2 of 3 tasks
snipd-min opened this issue Apr 8, 2024 · 2 comments
Open
2 of 3 tasks

MdbxError (17): File exists #1592

snipd-min opened this issue Apr 8, 2024 · 2 comments

Comments

@snipd-min
Copy link

Steps to Reproduce

We couldn't really reproduce this error at the moment. We observed it on crashlytics reports and couldn't trace the origin of the error. Once it happens, the only workaround for now on our app is to reinstall it as the DB seems to be "corrupted". I have tried to look for the origin of this error on libmdbx (https://github.dev/isar/libmdbx/) but couldn't quite find the 17 error. It would be great if someone with more knowledge about this error or mdbx could shed some light on this.

There is an discussion here #1484 but there were no activity since a while so I thought perhaps I could re-open it as an issue here. Please let me know if this is the wrong approach then I can close this.

Code sample

Again we don't have a way to reproduce it.

Details

  • Platform: iPhone and Android
  • Flutter version: 3.16.5
  • Isar version: ^3.1.0+1

  • I searched for similar issues already
  • I filled the details section with the exact device model and version
  • I am able to provide a reproducible example
@snipd-mikel
Copy link

It seems that we started seeing this issue when we configured the db to compactOnLaunch. It seems that if the .compact file created here:

env.copy(&compact_file)?;
already exists when trying to compact the file, the error is thrown.

We for now fixed the issue by ensuring that that file doesn't exists before opening the DB. It would be great to do that on the isar side. I'm not familiar with rust, so I won't be able to code the solution.

@rwrz
Copy link

rwrz commented Oct 10, 2024

Hey guys. I'm also seeing this a lot on my Crashlytics reports.

IsarError: DbError (17): File exists #0 _IsarImpl.openAsync (package:isar/src/impl/isar_impl.dart:187

About the workaround, I was thinking of removing the compactOnLaunch right now.
Did you guys have any updates about this?

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