objectdb icon indicating copy to clipboard operation
objectdb copied to clipboard

db.remove() issue

Open mghase opened this issue 4 years ago • 8 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Dart Version [e.g. 22]

Additional context Add any other context about the problem here.

E/flutter (16175): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: FormatException: Unterminated string (at character 43) E/flutter (16175): {"q":{"id":458287},"c":{"id":293251,"ad-{} E/flutter (16175): ^

mghase avatar Oct 14 '21 10:10 mghase

I have the same problem.

chihung93 avatar Oct 16 '21 12:10 chihung93

Flutter 2.5.2 same error, after that my db could not insert, have to delete and recreate db file.

E/flutter (11443): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: FormatException: Unexpected character (at character 58)
E/flutter (11443): {"id":"2936","path":"/d-{"i

winterdl avatar Nov 02 '21 21:11 winterdl

Move to Hive -> it only one way to resolve this issues

chihung93 avatar Nov 03 '21 16:11 chihung93

I switched to sembast, but I prefer objectdb, hope you could fix the issue with db.remove

winterdl avatar Nov 06 '21 07:11 winterdl

I'm sorry for the late response. There was a similar issue (#67) recently but unfortunately I wasn't able to trigger this exception.. Quite busy at the moment. But if someone can give some further details (few lines of code), I'd like to fix it.

marioreggiori avatar Nov 09 '21 18:11 marioreggiori

dart pub get dart run

Running test01..
1
DONE
Running test02..
{
  "title": {
    "$t": "Maria: or, The Wrongs of Woman"
  },
  ....
}
1
Unhandled exception:
FormatException: Missing expected digit (at character 56)
{"title":{"$t":"Maria: or, The Wrongs of Woman"},"id":-{}
                                                       ^

I dont know with test01, I deleted the database file and create new to ensure it will be new file, the test running okay, but with the test02, it will raise exception when calling remove.

objectdbtest.zip

winterdl avatar Nov 13 '21 07:11 winterdl

Any progress here, I love this package and I dont want to change it

Djcharles26 avatar Mar 11 '22 15:03 Djcharles26

Exactly the same issue. First encountered when trying to do some good UT coverage. When executing sequential tests it just dies. When deleting the file in between them, all is okay. To make it even more weird, I minimized the DB operations, did 1-2 things in a test, then I ran the tests, all green. Second run, some started failing with a similar file-level corruption.

I also like this package a lot, but I cannot use it in this current condition - unfortunately time is pressing in my case, so I'm afraid I'll need to move on, like it or not. :(

Hankyaku avatar Aug 30 '22 13:08 Hankyaku