hive icon indicating copy to clipboard operation
hive copied to clipboard

i have probleme in run code

Open benmoussa-ayoub opened this issue 2 years ago • 6 comments

Question Error compiling to JavaScript: XMLHttpRequest error.

Code sample


void main() async {
  //Hive.init('somePath') -> not needed in browser

  var box = await Hive.openBox('testBox');

  box.put('name', 'David');
  
  print('Name: ${box.get('name')}');
}

Version

  • Platform: Android
  • Flutter version: 2.8
  • Hive version: hive: ^2.1.0

benmoussa-ayoub avatar Apr 21 '22 10:04 benmoussa-ayoub

Was this observed on Android or Web?

silverhairs avatar May 12 '22 14:05 silverhairs

flutter Android

benmoussa-ayoub avatar May 12 '22 14:05 benmoussa-ayoub

flutter Android

This is curious, AFAIK hive does not make any HTTP request, and I recently faced this error with the http package and this is what helped me.

silverhairs avatar May 12 '22 15:05 silverhairs

is not http error ; thank bro

benmoussa-ayoub avatar May 12 '22 15:05 benmoussa-ayoub

is not http error ; thank bro

Isn't the error XMLHttpRequest error. ?

silverhairs avatar May 13 '22 07:05 silverhairs

yes is XMLHttpRequest error

benmoussa-ayoub avatar May 13 '22 09:05 benmoussa-ayoub