hive icon indicating copy to clipboard operation
hive copied to clipboard

Unhandled Exception: RangeError: Not enough bytes available.

Open anandsubbu007 opened this issue 4 years ago • 50 comments

Restarted application in 6,661ms.
W/DynamiteModule(20626): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(20626): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(20626): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
W/ConnectivityManager.CallbackHandler(20626): callback not found for CALLBACK_AVAILABLE message
E/flutter (20626): [ERROR:flutter/lib/ui/ui_dart_state.cc(171)] Unhandled Exception: RangeError: Not enough bytes available.
[38;5;248mE/flutter (20626): #0      BinaryReaderImpl._requireBytes[39;49m
[38;5;248mE/flutter (20626): #1      BinaryReaderImpl.readByte[39;49m
[38;5;248mE/flutter (20626): #2      StaticModelAdapter.read[39;49m
[38;5;248mE/flutter (20626): #3      BinaryReaderImpl.read[39;49m
[38;5;248mE/flutter (20626): #4      BinaryReaderImpl.readFrame[39;49m
[38;5;248mE/flutter (20626): #5      FrameHelper.framesFromBytes[39;49m
[38;5;248mE/flutter (20626): #6      FrameIoHelper.framesFromFile[39;49m
E/flutter (20626): <asynchronous suspension>
[38;5;248mE/flutter (20626): #7      StorageBackendVm.initialize[39;49m
E/flutter (20626): <asynchronous suspension>
[38;5;248mE/flutter (20626): #8      BoxBaseImpl.initialize[39;49m
[38;5;248mE/flutter (20626): #9      HiveImpl._openBox[39;49m
E/flutter (20626): <asynchronous suspension>
[38;5;248mE/flutter (20626): #10     HiveImpl.openBox[39;49m
[38;5;248mE/flutter (20626): #11     main[39;49m
E/flutter (20626): <asynchronous suspension>
[38;5;244mE/flutter (20626): #12     _runMainZoned.<anonymous closure>.<anonymous closure>  (dart:ui/hooks.dart:231:25)[39;49m
[38;5;244mE/flutter (20626): #13     _rootRun  (dart:async/zone.dart:1190:13)[39;49m
[38;5;244mE/flutter (20626): #14     _CustomZone.run  (dart:async/zone.dart:1093:19)[39;49m
[38;5;244mE/flutter (20626): #15     _runZoned  (dart:async/zone.dart:1630:10)[39;49m
[38;5;244mE/flutter (20626): #16     runZonedGuarded  (dart:async/zone.dart:1618:12)[39;49m
[38;5;244mE/flutter (20626): #17     _runMainZoned.<anonymous closure>  (dart:ui/hooks.dart:223:5)[39;49m
[38;5;244mE/flutter (20626): #18     _startIsolate.<anonymous closure>  (dart:isolate-patch/isolate_patch.dart:301:19)[39;49m
[38;5;244mE/flutter (20626): #19     _RawReceivePortImpl._handleMessage  (dart:isolate-patch/isolate_patch.dart:168:12)[39;49m
E/flutter (20626):
E/flutter (20626): [ERROR:flutter/lib/ui/ui_dart_state.cc(171)] Unhandled Exception: RangeError: Not enough bytes available.
[38;5;248mE/flutter (20626): #0      BinaryReaderImpl._requireBytes[39;49m
[38;5;248mE/flutter (20626): #1      BinaryReaderImpl.readByte[39;49m
[38;5;248mE/flutter (20626): #2      StaticModelAdapter.read[39;49m
[38;5;248mE/flutter (20626): #3      BinaryReaderImpl.read[39;49m
[38;5;248mE/flutter (20626): #4      BinaryReaderImpl.readFrame[39;49m
[38;5;248mE/flutter (20626): #5      FrameHelper.framesFromBytes[39;49m
[38;5;248mE/flutter (20626): #6      FrameIoHelper.framesFromFile[39;49m
E/flutter (20626): <asynchronous suspension>
[38;5;248mE/flutter (20626): #7      StorageBackendVm.initialize[39;49m
E/flutter (20626): <asynchronous suspension>
[38;5;248mE/flutter (20626): #8      BoxBaseImpl.initialize[39;49m
[38;5;248mE/flutter (20626): #9      HiveImpl._openBox[39;49m
E/flutter (20626): <asynchronous suspension>
[38;5;248mE/flutter (20626): #10     HiveImpl.openBox[39;49m
[38;5;248mE/flutter (20626): #11     main[39;49m
E/flutter (20626): <asynchronous suspension>
[38;5;244mE/flutter (20626): #12     _runMainZoned.<anonymous closure>.<anonymous closure>  (dart:ui/hooks.dart:231:25)[39;49m
[38;5;244mE/flutter (20626): #13     _rootRun  (dart:async/zone.dart:1190:13)[39;49m
[38;5;244mE/flutter (20626): #14     _CustomZone.run  (dart:async/zone.dart:1093:19)[39;49m
[38;5;244mE/flutter (20626): #15     _runZoned  (dart:async/zone.dart:1630:10)[39;49m
[38;5;244mE/flutter (20626): #16     runZonedGuarded  (dart:async/zone.dart:1618:12)[39;49m
[38;5;244mE/flutter (20626): #17     _runMainZoned.<anonymous closure>  (dart:ui/hooks.dart:223:5)[39;49m
[38;5;244mE/flutter (20626): #18     _startIsolate.<anonymous closure>  (dart:isolate-patch/isolate_patch.dart:301:19)[39;49m
[38;5;244mE/flutter (20626): #19     _RawReceivePortImpl._handleMessage  (dart:isolate-patch/isolate_patch.dart:168:12)[39;49m
E/flutter (20626):

anandsubbu007 avatar Sep 06 '20 14:09 anandsubbu007

Could you reproduce the issue?

themisir avatar Sep 06 '20 15:09 themisir

this issue is solved when i delete local data.

anandsubbu007 avatar Sep 07 '20 02:09 anandsubbu007

Again Facing this issue in flutter web. Can't able to resolve it.

Restarted application in 648ms.
Prest :::::: 123871653
Error: RangeError: Not enough bytes available.
    at Object.throw_ [as throw] (http://localhost:64762/dart_sdk.js:4332:11)
    at binary_reader_impl.BinaryReaderImpl.new.[_requireBytes] (http://localhost:64762/packages/hive/src/box/lazy_box_impl.dart.lib.js:1243:19)
    at binary_reader_impl.BinaryReaderImpl.new.readByte (http://localhost:64762/packages/hive/src/box/lazy_box_impl.dart.lib.js:1252:26)
    at http://localhost:64762/packages/website/Models/User_model.dart.lib.js:437:28
    at User_model.UserDataAdapter.new.read (http://localhost:64762/packages/website/Models/User_model.dart.lib.js:439:9)
    at binary_reader_impl.BinaryReaderImpl.new.read (http://localhost:64762/packages/hive/src/box/lazy_box_impl.dart.lib.js:1501:35)
    at storage_backend_js.StorageBackendJs.new.decodeValue (http://localhost:64762/packages/hive/src/box/lazy_box_impl.dart.lib.js:1628:27)
    at MappedListIterable.new.elementAt (http://localhost:64762/dart_sdk.js:21547:25)
    at ListIterator.new.moveNext (http://localhost:64762/dart_sdk.js:21341:55)
    at JsIterator.next (http://localhost:64762/dart_sdk.js:5999:21)
    at storage_backend_js.StorageBackendJs.new.initialize (http://localhost:64762/packages/hive/src/box/lazy_box_impl.dart.lib.js:1685:20)
    at initialize.next (<anonymous>)
    at http://localhost:64762/dart_sdk.js:37592:33
    at _RootZone.runUnary (http://localhost:64762/dart_sdk.js:37446:58)
    at _FutureListener.thenAwait.handleValue (http://localhost:64762/dart_sdk.js:32430:29)
    at handleValueCallback (http://localhost:64762/dart_sdk.js:32977:49)
    at Function._propagateToListeners (http://localhost:64762/dart_sdk.js:33015:17)
    at _Future.new.[_completeWithValue] (http://localhost:64762/dart_sdk.js:32858:23)
    at async._AsyncCallbackEntry.new.callback (http://localhost:64762/dart_sdk.js:32880:35)
    at Object._microtaskLoop (http://localhost:64762/dart_sdk.js:37707:13)
    at _startMicrotaskLoop (http://localhost:64762/dart_sdk.js:37713:13)
    at http://localhost:64762/dart_sdk.js:33232:9
Error: RangeError: Not enough bytes available.
    at Object.throw_ [as throw] (http://localhost:64762/dart_sdk.js:4332:11)
    at binary_reader_impl.BinaryReaderImpl.new.[_requireBytes] (http://localhost:64762/packages/hive/src/box/lazy_box_impl.dart.lib.js:1243:19)
    at binary_reader_impl.BinaryReaderImpl.new.readByte (http://localhost:64762/packages/hive/src/box/lazy_box_impl.dart.lib.js:1252:26)
    at http://localhost:64762/packages/website/Models/User_model.dart.lib.js:437:28
    at User_model.UserDataAdapter.new.read (http://localhost:64762/packages/website/Models/User_model.dart.lib.js:439:9)
    at binary_reader_impl.BinaryReaderImpl.new.read (http://localhost:64762/packages/hive/src/box/lazy_box_impl.dart.lib.js:1501:35)
    at storage_backend_js.StorageBackendJs.new.decodeValue (http://localhost:64762/packages/hive/src/box/lazy_box_impl.dart.lib.js:1628:27)
    at MappedListIterable.new.elementAt (http://localhost:64762/dart_sdk.js:21547:25)
    at ListIterator.new.moveNext (http://localhost:64762/dart_sdk.js:21341:55)
    at JsIterator.next (http://localhost:64762/dart_sdk.js:5999:21)
    at storage_backend_js.StorageBackendJs.new.initialize (http://localhost:64762/packages/hive/src/box/lazy_box_impl.dart.lib.js:1685:20)
    at initialize.next (<anonymous>)
    at http://localhost:64762/dart_sdk.js:37592:33
    at _RootZone.runUnary (http://localhost:64762/dart_sdk.js:37446:58)
    at _FutureListener.thenAwait.handleValue (http://localhost:64762/dart_sdk.js:32430:29)
    at handleValueCallback (http://localhost:64762/dart_sdk.js:32977:49)
    at Function._propagateToListeners (http://localhost:64762/dart_sdk.js:33015:17)
    at _Future.new.[_completeWithValue] (http://localhost:64762/dart_sdk.js:32858:23)
    at async._AsyncCallbackEntry.new.callback (http://localhost:64762/dart_sdk.js:32880:35)
    at Object._microtaskLoop (http://localhost:64762/dart_sdk.js:37707:13)
    at _startMicrotaskLoop (http://localhost:64762/dart_sdk.js:37713:13)
    at http://localhost:64762/dart_sdk.js:33232:9

anandsubbu007 avatar Sep 07 '20 11:09 anandsubbu007

Did the issue happened after changing model structure or randomly?

themisir avatar Sep 07 '20 12:09 themisir

nope, it is working fine when i start debugging. after i restart 2-3 time. this error happens

anandsubbu007 avatar Sep 07 '20 14:09 anandsubbu007

First application start is ok, but second and all the next causes crash

artem-bakuta avatar Oct 13 '20 20:10 artem-bakuta

First application start is ok, but second and all the next causes crash

Could you share code with us to identify cause?

themisir avatar Oct 13 '20 21:10 themisir

when i clear all cache & storage and run builder again this issue is resolved

anandsubbu007 avatar Oct 14 '20 03:10 anandsubbu007

I call await StorageHive().init(); before main app class, for the first time is everything ok, but while opening app the second. etc times always error will be. I have to wipe emulator, to reinstall app on real device but problem still exists. Versions of hive and generator are the last from repo's.

Method invokation Place where error occurs Link to Image error

artem-bakuta avatar Oct 14 '20 06:10 artem-bakuta

[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: RangeError: Not enough bytes available.

any find the problem #flutterhive

muhammednazil avatar Dec 23 '20 05:12 muhammednazil

For several days I suffered with the same problem and could not understand why it appears. Changed package versions and much more.

Everything turned out to be trite. I save the array of enams to the database. I specified the type for enam (@HiveType), but did not specify the indices for the values (@HiveField), and this led to the fact that everything was successfully written to the database, but not read upon restarting!

This fixed my problem.

Dimoshka avatar Jan 03 '21 07:01 Dimoshka

I figured it (atleast in my case).

This was my code:

  SessionTokenInfo read(BinaryReader reader) {
    print("read ${reader.readString()}");
    return SessionTokenInfo.fromJson(jsonDecode(reader.readString()));
  }

I was reading from the same BinaryReader twice. I assume there's a finite buffer that gets cleared as you read. Calling read twice (apparently) was the problem.

I hope this helps someone else.

cosmotek avatar Jan 13 '21 22:01 cosmotek

I figured it (atleast in my case).

This was my code:

  SessionTokenInfo read(BinaryReader reader) {
    print("read ${reader.readString()}");
    return SessionTokenInfo.fromJson(jsonDecode(reader.readString()));
  }

I was reading from the same BinaryReader twice. I assume there's a finite buffer that gets cleared as you read. Calling read twice (apparently) was the problem.

I hope this helps someone else.

reader.readString() moves cursor to end of the read data. So in your case second readString() will throw an error because there might be nothing available to read (Even if there's data, the returned data will not be same as you've printed).

Instead of reading twice you can store value in variable then use it twice.

  SessionTokenInfo read(BinaryReader reader) {
    final str = reader.readString();
    print('read $str');
    return SessionTokenInfo.fromJson(jsonDecode(str));
  }

themisir avatar Jan 14 '21 06:01 themisir

i occur the same problem,i did know what went wrong?

HumesFork avatar Feb 05 '21 09:02 HumesFork

@HumesFork please proof-read your comment. The previous comment explain the issue clearly.

@leisim Maybe improve the error message? Seems a decent number of devs all find it unclear.

cosmotek avatar Feb 05 '21 15:02 cosmotek

@cosmotek that's not so easy because there are a lot of reasons why this error may happen. Do you have a suggestion?

simc avatar Feb 05 '21 16:02 simc

facing this issue using firestore. when i store firestore data locally and then restart my app. i get the following error -

[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: RangeError: Not enough bytes available. #0 BinaryReaderImpl._requireBytes (package:hive/src/binary/binary_reader_impl.dart:49:7) #1 BinaryReaderImpl.readByte (package:hive/src/binary/binary_reader_impl.dart:65:5) #2 UserFSDataAdapter.read (package:fluent_life_flutter/db/model/user_model.g.dart:17:52) #3 BinaryReaderImpl.read (package:hive/src/binary/binary_reader_impl.dart:325:33) #4 BinaryReaderImpl.readFrame (package:hive/src/binary/binary_reader_impl.dart:273:26) #5 FrameHelper.framesFromBytes (package:hive/src/binary/frame_helper.dart:17:26) #6 FrameIoHelper.framesFromFile (package:hive/src/io/frame_io_helper.dart:41:12) #7 StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:82:30) #8 BoxBaseImpl.initialize (package:hive/src/box/box_base_impl.dart:90:20) #9 HiveImpl._openBox (package:hive/src/hive_impl.dart:106:22) #10 HiveImpl.openBox (package:hive/src/hive_impl.dart:135:18) #11 HiveProvider.openBox (package:fluent_life_flutter/db/hive_provider.dart:26:16) #12 main (package:fluent_life_flutter/main.dart:15:22) #13 _runMainZoned.. (dart:ui/hooks.dart:231:25) #14 _rootRun (dart:async/zone.dart:1190:13) #15 _CustomZone.run (dart:async/zone.dart:1093:19) #16 _runZoned (dart:async/zone.dart:1630:10) #17 runZonedGuarded (dart:async/zone.dart:1618:12) #18 _runMainZoned. (dart:ui/hooks.dart:223:5) #19 _startIsolate. (dart:isolate-patch/isolate_patch.dart:301:19) #20 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12) [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: RangeError: Not enough bytes available. #0 BinaryReaderImpl._requireBytes (package:hive/src/binary/binary_reader_impl.dart:49:7) #1 BinaryReaderImpl.readByte (package:hive/src/binary/binary_reader_impl.dart:65:5) #2 UserFSDataAdapter.read (package:fluent_life_flutter/db/model/user_model.g.dart:17:52) #3 BinaryReaderImpl.read (package:hive/src/binary/binary_reader_impl.dart:325:33) #4 BinaryReaderImpl.readFrame (package:hive/src/binary/binary_reader_impl.dart:273:26) #5 FrameHelper.framesFromBytes (package:hive/src/binary/frame_helper.dart:17:26) #6 FrameIoHelper.framesFromFile (package:hive/src/io/frame_io_helper.dart:41:12) #7 StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:82:30) #8 BoxBaseImpl.initialize (package:hive/src/box/box_base_impl.dart:90:20) #9 HiveImpl._openBox (package:hive/src/hive_impl.dart:106:22) #10 HiveImpl.openBox (package:hive/src/hive_impl.dart:135:18) #11 HiveProvider.openBox (package:fluent_life_flutter/db/hive_provider.dart:26:16) #12 main (package:fluent_life_flutter/main.dart:15:22) #13 _runMainZoned.. (dart:ui/hooks.dart:231:25) #14 _rootRun (dart:async/zone.dart:1190:13) #15 _CustomZone.run (dart:async/zone.dart:1093:19) #16 _runZoned (dart:async/zone.dart:1630:10) #17 runZonedGuarded (dart:async/zone.dart:1618:12) #18 _runMainZoned. (dart:ui/hooks.dart:223:5) #19 _startIsolate. (dart:isolate-patch/isolate_patch.dart:301:19) #20 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

syedfaisaljaved avatar Mar 19 '21 07:03 syedfaisaljaved

I had this exact same issue, in my case I created an adapter for the flutter math Point class which I used inside one of my business logic classes.

The adapter I first created was like this:

class PointAdapter extends TypeAdapter<Point> {
  @override
  final typeId = HiveUtils.POINT_TYPE_ID;

  @override
  Point read(BinaryReader reader) => Point(reader.read(0), reader.read(1));

  @override
  void write(BinaryWriter writer, Point obj) {
    writer
      ..writeByte(2)
      ..writeByte(0)
      ..write(obj.x)
      ..writeByte(1)
      ..write(obj.y);
  }
}

But the Point class is a flutter framework class and doesn't have @HiveField set for 'x' and 'y'... so the first time the app runs everything gets stored fine but after a hot restart the reader throws the RangeError exception.

Then I updated the adapter to this:

class PointAdapter extends TypeAdapter<Point> {
  @override
  final typeId = HiveUtils.POINT_TYPE_ID;

  @override
  Point read(BinaryReader reader) => Point(reader.readInt(), reader.readInt());

  @override
  void write(BinaryWriter writer, Point obj) {
    writer
      ..writeInt(obj.x)
      ..writeInt(obj.y);
  }
}

and everything works fine now.

luis901101 avatar Mar 29 '21 23:03 luis901101

I had the same issue. But the name of my hive box was about 30 characters long. I don't remember what's the length exactly.

I had changed the name to make it shorter and it helped

vdor avatar Mar 30 '21 11:03 vdor

This probably isn't the problem for everybody, but I was running into this error when I was writing null values in my adapter. I think it was throwing off the pointer.

What I THINK was happening was I was saving an index of an item with writeInt(), but sometimes my objects didn't have the index set yet, so it was writing null. Then when I was reading them back with readInt(), it was reading my int value with wild results e.g. "-9038923489". Then the next read would result in this error because there were no terminating bytes for the String data it was trying to read.

I fixed this by changing my readInt() to just read() and my writeInt() to just write(). Not quite as clean, it'd be nice if there was some null handling built into those specific data type functions, but I can also do it on my end.

ddevoss avatar Apr 15 '21 14:04 ddevoss

Well, that seems to be an important feature since when I change the structure of the hive class my users have to reinstall the app....

MoacirSchmidt avatar Apr 22 '21 16:04 MoacirSchmidt

Well, that seems to be an important bug since when I change the structure of the hive class my users would have to reinstall the app....

Not necessarily, you could change the @HiveField(...) index of each changed field in your class (by changing the field index you are ensuring a different type of an existing field to be properly stored)... also if you have had drastically changed your class or classes structure you could just change your box name and app will load a completely new box next time it starts.

luis901101 avatar Apr 22 '21 16:04 luis901101

Well, that seems to be an important bug since when I change the structure of the hive class my users have to reinstall the app....

It's a known feature (not a bug) of serialization in software engineering. You have to be careful when modifying serializers (aka: adapters in hive). It's not a bug because it's how object serializers works. Try modifying some bytes of an executable files in your operation system and try running it. It will be probably crashed because OS couldn't understand executable binary.

If you need dynamic schemes, I would suggest storing your data in json files or checking updating a class part of hive documentation.

themisir avatar Apr 22 '21 19:04 themisir

I edited my comment to use better words. You made an excellent work and I really appreciate that. Thank you very much

MoacirSchmidt avatar Apr 22 '21 21:04 MoacirSchmidt

I edited my comment to use better words. You made an excellent work and I really appreciate that. Thank you very much

I think you didn't get what I meant. You have to follow those rules to update classes safely - without requiring re-installation. If you don't follow them then the updated adapter would not deserialize previously written data and throw RangeError.

  • Don't change the field numbers for any existing fields.
  • If you add new fields, any objects written by the "old" adapter can still be read by the new adapter. These fields are just ignored. Similarly, objects written by your new code can be read by your old code: the new field is ignored when parsing.
  • Fields can be renamed and even changed from public to private or vice versa as long as the field number stays the same.
  • Fields can be removed, as long as the field number is not used again in your updated class.
  • Changing the type of a field is not supported. You should create a new one instead.

In short, just increase HiveField id when changing field type or adding a new fields and never use removed field's IDs.

themisir avatar Apr 23 '21 08:04 themisir

I've tried all solutions on this feed, none of those worked.

But I've found a solution in my case, maybe this will help others.

I've migrated my project to null safety, and before that Hive was working properly and this error never appears. It's only after migrating my project + all the packages to null safety that the error appears.

I've to duplicate my project and try to find the error by elimination. Here is what was causing the problem:

I have one object extending HiveObject, let's call it "Village". Village has an instance of a class as a attribute, called "Person"

Person is an abstract class (BTW no need to put HiveType and HiveField for abstract classes, but you need to put them for classes that extend this abstract class).

One of the classes extending Person is intentionally empty. Let's call it "SubPerson":

@HiveType(typeId: 8)
class SubPerson extends Person {}

Well before migrating my project to null safety, build runner was generating adapters and the reader for SubPerson was like this:

  @override
  SubPerson read(BinaryReader reader) {
    final numOfFields = reader.readByte();
    final fields = <int, dynamic>{
      for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
    };
    return SubPerson();
  }

After migrating, build runner generated the same adapter but like this:

  @override
  SubPerson read(BinaryReader reader) {
    return SubPerson();
  }

The error was caused by this method. I've manually changed the read method to the old one, and everything works now.

@TheMisir you should take a look at this

RobinLbt avatar May 13 '21 10:05 RobinLbt

@leisim isn't Hive itself skipping to the next Frame if bytes have not read?

themisir avatar May 13 '21 10:05 themisir

I removed read and write stubs for empty classes after this issue https://github.com/hivedb/hive/issues/638. I might have to look at Hive internals to check what's going on.

themisir avatar May 13 '21 10:05 themisir

@RobinLbt what about the void write(BinaryWriter writer, SubPerson obj) method after migration? I mean... if the write method doesn't write anything to the BinaryWriter then the migrated read should be fine as you posted… the problem would be if the writer writes something and the reader reads nothing... that way when the next object in your class tries to read it will not read the right byte...

luis901101 avatar May 13 '21 14:05 luis901101

@RobinLbt what about the void write(BinaryWriter writer, SubPerson obj) method after migration? I mean... if the write method doesn't write anything to the BinaryWriter then the migrated read should be fine as you posted… the problem would be if the writer writes something and the reader reads nothing... that way when the next object in your class tries to read it will not read the right byte...

Ah you're right. This issue will happen when you're using the model inside another model. Hadn't think that way.

themisir avatar May 13 '21 16:05 themisir