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

Error on get data objectbox:1.6.1/objectbox-android:3.2.1 #460

Closed
ProyekRiad opened this issue Aug 23, 2022 · 2 comments
Closed

Error on get data objectbox:1.6.1/objectbox-android:3.2.1 #460

ProyekRiad opened this issue Aug 23, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@ProyekRiad
Copy link

Basic info

  • Objectbox 1.6.1
  • Flutter version 3.0.5
  • Dart SDK version 2.17.6
  • Null-safety enabled
  • Reproducibility: always
  • OS: Windows 11
  • Device Honor 9 lite

Steps to reproduce

Just get data from database, e.g. store.box<Contact>().query().build().find()
I think this error caused by objectbox-android:3.2.1 or objectbox-android-objectbrowser:3.2.1, because if i use version 3.2.0 no error occurs

Expected behavior

returning data without error

Code

Example code
store.box<Contact>().query().build().find()

Logs

E/flutter (21663): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: RangeError (byteOffset): Invalid value: Valid value range is empty: 0
E/flutter (21663): #0 ObjectCollectorError.throwIfError (package:objectbox/src/native/bindings/data_visitor.dart:58:24)
E/flutter (21663): #1 Query.find (package:objectbox/src/native/query/query.dart:827:18)
E/flutter (21663): #2 HomeSummaryController.fetchData. (package:mobile/modules/home/home.controller.summary.dart:53:31)
E/flutter (21663): #3 _rootRunUnary (dart:async/zone.dart:1434:47)
E/flutter (21663): #4 _CustomZone.runUnary (dart:async/zone.dart:1335:19)
E/flutter (21663): #5 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
E/flutter (21663): #6 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
E/flutter (21663): #7 _DelayedData.perform (dart:async/stream_impl.dart:591:14)
E/flutter (21663): #8 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
E/flutter (21663): #9 _PendingEvents.schedule. (dart:async/stream_impl.dart:663:7)
E/flutter (21663): #10 _rootRun (dart:async/zone.dart:1418:47)
E/flutter (21663): #11 _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter (21663): #12 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
E/flutter (21663): #13 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1276:23)
E/flutter (21663): #14 _rootRun (dart:async/zone.dart:1426:13)
E/flutter (21663): #15 _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter (21663): #16 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
E/flutter (21663): #17 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1276:23)
E/flutter (21663): #18 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter (21663): #19 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
E/flutter (21663):

@ProyekRiad ProyekRiad added the bug Something isn't working label Aug 23, 2022
@jpablomartinez
Copy link

Same error here, using object_box version 1.6.1.
The query works when i use findIds, and when i search for records that dont exits, but when i added a value that exits the query function returns that error ("RangeError (byteOffset): Invalid value: Valid value range is empty: 0")

@greenrobot-team greenrobot-team added this to the 1.6.2 milestone Aug 24, 2022
@greenrobot-team
Copy link
Member

greenrobot-team commented Aug 24, 2022

Thanks for reporting! I can confirm. Due to skipping a step during the release process I did not catch this error when testing the release. I made some changes so this won't happen again.

This should be fixed with the just released 1.6.2 (which reverts the objectbox-android version for the time being).

If you are using Admin, make sure to also downgrade the objectbox-android-objectbrowser dependency to 3.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants