isar / isar

Extremely fast, easy to use, and fully async NoSQL database for Flutter
https://isar.dev
Apache License 2.0
3.62k stars 349 forks source link

Unsupported processor architecture "linux_ia32" (Samsung TV - Tizen Emulator on Windows 10) #547

Closed srix55 closed 2 years ago

srix55 commented 2 years ago

I get the following error on trying isar with Samsung TV emulator. It looks like isar should be able to run on tizen devices. I am running my app with flutter-tizen. Let me know if you want me to try any hotfixes. Thanks.

[E] [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: Unsupported processor architecture "linux_ia32".Please open an issue on GitHub to request it.
#0      initializeIsarCore (package:isar/src/native/isar_core.dart:62:9)
#1      openIsar (package:isar/src/native/open.dart:52:3)
#2      _IsarNative.open (package:isar/src/native/isar_native.dart:99:12)
#3      Isar.open (package:isar/src/isar.dart:82:23)
#4      PlayerDb.getIsar (package:player_repos/src/database/player_db.dart:48:25)
#5      GetZoomLevelRepoImpl.getZoomLevel (package:player_repos/src/player_repos/tuxkit/zoomlevel/get_zoom_level/get_zoom_level_repo_impl.dart:12:32)
#6      GetZoomLevelUsecaseImpl.getZoomLevel (package:theming/src/usecases/zoomlevel/get_zoom_level/get_zoom_level_usecase_impl.dart:8:65)
#7      ThemeController.getZoomLevel (package:tuxkit/src/theme/theme_controller.dart:20:62)
#8      ThemeCubit._initZoomLevel (package:tuxkit/src/theme/theme_cubit.dart:59:42)
#9      ThemeCubit._init (package:tuxkit/src/theme/theme_cubit.dart:34:11)
#10     new ThemeCubit (package:tuxkit/src/theme/theme_cubit.dart:27:5)
#11     _TuxAppState.build.<anonymous closure>.<anonymous closure> (package:tuxkit/src/widgets/tux_app.dart:40:55)
#12     _CreateInheritedProviderState.value (package:provider/src/inherited_provider.dart:736:36)
#13     _InheritedProviderScopeElement.value (package:provider/src/inherited_provider.dart:590:33)
#14     _InheritedProviderScopeElement.build (package:provider/src/inherited_provider.dart:544:7)
#15     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4806:15)
#16     Element.rebuild (package:flutter/src/widgets/framework.dart:4529:5)
#17     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4787:5)
#18     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4781:5)
#19     _InheritedProviderScopeElement.mount (package:provider/src/inherited_provider.dart:411:11)
#20     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3817:16)
#21     Element.updateChild (package:flutter/src/widgets/framework.dart:3551:18)
#22     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4832:16)
#23     Element.rebuild (package:flutter/src/widgets/framework.dart:4529:5)
#24     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4787:5)
#25     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4781:5)
#26     SingleChildWidgetElementMixin.mount (package:nested/nested.dart:222:11)
#27     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3817:16)
#28     Element.updateChild (package:flutter/src/widgets/framework.dart:3551:18)
#29     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4832:16)
#30     Element.rebuild (package:flutter/src/widgets/framework.dart:4529:5)
#31     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4787:5)
#32     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4781:5)
#33     SingleChildWidgetElementMixin.mount (package:nested/nested.dart:222:11)
#34     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3817:16)
#35     Element.updateChild (package:flutter/src/widgets/framework.dart:3551:18)
#36     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4832:16)
#37     Element.rebuild (package:flutter/src/widgets/framework.dart:4529:5)
#38     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4787:5)
#39     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4781:5)
#40     _NestedHookElement.mount (package:nested/nested.dart:187:11)
#41     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3817:16)
#42     Element.updateChild (package:flutter/src/widgets/framework.dart:3551:18)
#43     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4832:16)
#44     Element.rebuild (package:flutter/src/widgets/framework.dart:4529:5)
#45     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4787:5)
#46     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4781:5)
#47     SingleChildWidgetElementMixin.mount (package:nested/nested.dart:222:11)
#48     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3817:16)
#49     Element.updateChild (package:flutter/src/widgets/framework.dart:3545:20)
#50     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4832:16)
#51     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4977:11)
#52     Element.rebuild (package:flutter/src/widgets/framework.dart:4529:5)
#53     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2659:19)
#54     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:891:21)
#55     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:370:5)
#56     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15)
#57     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1083:9)
#58     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:997:5)
#59     _rootRun (dart:async/zone.dart:1426:13)
#60     _CustomZone.run (dart:async/zone.dart:1328:19)
#61     _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
#62     _invoke (dart:ui/hooks.dart:151:10)
#63     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5)
#64     _drawFrame (dart:ui/hooks.dart:115:31)

Version

simc commented 2 years ago

Sorry, I don't think it is possible to ship both, x86 and arm64 linux binaries in a Flutter library. You would need to compile Isar core yourself for x86 linux.

srix55 commented 2 years ago

Isar works great with Tizen :1st_place_medal: One more platform for isar. Here's the steps in brief.

  1. Compiling isar-core to build the target architecture binary (i686-unknown-linux-gnu for tizen 6.5 emulator)
  2. A few changes in isar to include linux_ia32
  3. Including isar_flutter_libs_tizen by @swift-kim with the corresponding isar version's compiled binary in its lib folder. Note that including it along with isar_flutter_libs doesn't result in any conflicts.
  4. Tested on chrome, linux & tizen-emulator by including both flutter_libs and flutter_libs_tizen. Works great.
srix55 commented 2 years ago

@leisim Is it possible to leave the loading of libisar.so to the user for architectures not supported by flutter_isar_libs? That way, the user can include the binaries, without having to build isar for a few additional switch cases. So, if user wants to run on tizen, he includes isar_flutter_libs_tizen.

The currently built isar-core binary supports these three more cases.

      case Abi.linuxArm:
      case Abi.linuxArm64:
      case Abi.linuxIA32:
          return 'libisar.so';

It would be great to add isar as one of the supported packages for Samsung TVs & wearables.