objectbox / objectbox-dart

Flutter database for super-fast Dart object persistence
https://docs.objectbox.io/getting-started
Apache License 2.0
927 stars 115 forks source link

Unit Testing Object Box for Flutter App in macOS is failing #536

Closed raphire08 closed 1 year ago

raphire08 commented 1 year ago

While running get query for unit testing this error is coming at query.find()

RangeError (byteOffset): Invalid value: Valid value range is empty: 0

Basic info (please complete the following information):

Additionally, you can choose to provide more details, e.g. the output of:

Steps to reproduce

  1. Save any model in objct box
  2. Trying to read it
  3. query.find() give error

Logs, stack traces

package:objectbox/src/native/bindings/data_visitor.dart 58:24        ObjectCollectorError.throwIfError
package:objectbox/src/native/query/query.dart 827:18                 Query.find
greenrobot-team commented 1 year ago

Thanks for reporting!

Possibly the objectbox-c library on your system is out-of-date? Try to run the install.sh script again as noted in the "To run unit tests on your machine" info box.

Can you also reproduce this using the latest version (2.0.0 as of 2023-03-21)?

raphire08 commented 1 year ago

Yeah I thought so. I ran the script again on mac

bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-dart/main/install.sh)

Still it would give error. Is there a way to find out which version is currently installed in system. I migrated from 2.0.0 back to 1.6.2 and then it stopped working. I will update again once I migrate back to 2.0.0.

raphire08 commented 1 year ago

This is working fine in 2.0.0. Don't know why it gave error on older build. Closing this. Thanks