tmail-flutter icon indicating copy to clipboard operation
tmail-flutter copied to clipboard

Support Linux platform

Open onny opened this issue 1 year ago • 4 comments

Description

Supporting Linux platform would be great because currently we don't have any good mobile firendly Mail client on PostmarketOS

onny avatar Aug 06 '24 16:08 onny

+1 contributions are welcome!

chibenwa avatar Aug 06 '24 19:08 chibenwa

I started adding linux platform support but when starting the app I get a blank window

20240920_10h18m13s_grim

flutter doctor -v
[✓] Flutter (Channel stable, 3.22.0, on NixOS 24.05 (Uakari) 6.10.9, locale en_US.UTF-8)
    • Flutter version 3.22.0 on channel stable at /nix/store/sl7226yszswspdj1d3gz33p97kgi0ldq-flutter-wrapped-3.22.0-sdk-links
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision nixpkgs000 (), 1970-01-01 00:00:00
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 17.0.6
    • cmake version 3.29.2
    • ninja version 1.11.1
    • pkg-config version 0.29.2

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • NixOS 24.05 (Uakari) 6.10.9

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 3 categories.

onny avatar Sep 20 '24 10:09 onny

Output when running the app

Launching lib/main.dart on Linux in debug mode...
Building Linux application...                                   
✓ Built build/linux/x64/debug/bundle/tmail_flutter
flutter: 7 has been spawned
flutter: initialized
flutter: [TwakeMail] NetworkConnectionController::_listenNetworkConnectionChanged()::onStatusChange: InternetConnectionStatus.connected
flutter: [TwakeMail] EncryptionKeyCacheClient::getItem() key: false - needToReopen: false
flutter: [TwakeMail] [ERROR] AppLogger::initLogger::runZonedGuarded:onError: HiveError: You need to initialize Hive or provide a path to store the box. | stack: #0      BackendManager.open (package:hive/src/backend/vm/backend_manager.dart:21:7)
#1      HiveImpl._openBox (package:hive/src/hive_impl.dart:101:36)
#2      HiveImpl.openBox (package:hive/src/hive_impl.dart:142:18)
#3      HiveCacheClient.openBox (package:tmail_ui_user/features/caching/config/hive_cache_client.dart:21:19)
#4      HiveCacheClient.getItem.<anonymous closure> (package:tmail_ui_user/features/caching/config/hive_cache_client.dart:63:19)
#5      new Future.sync (dart:async/future.dart:306:31)
#6      HiveCacheClient.getItem (package:tmail_ui_user/features/caching/config/hive_cache_client.dart:57:19)
#7      EncryptionKeyCacheManager.getEncryptionKeyStored (package:tmail_ui_user/features/login/data/local/encryption_key_cache_manager.dart:16:38)
#8      HiveCacheConfig.initializeEncryptionKey (package:tmail_ui_user/features/caching/config/hive_cache_config.dart:82:64)
#9      main.<anonymous closure> (package:tmail_ui_user/main.dart:29:36)
<asynchronous suspension>

flutter: [TwakeMail] [ERROR] AppLogger::initLogger::runZonedGuarded:onError: HiveError: You need to initialize Hive or provide a path to store the box. | stack: #0      BackendManager.open (package:hive/src/backend/vm/backend_manager.dart:21:7)
#1      HiveImpl._openBox (package:hive/src/hive_impl.dart:101:36)
#2      HiveImpl.openBox (package:hive/src/hive_impl.dart:142:18)
#3      HiveCacheClient.openBox (package:tmail_ui_user/features/caching/config/hive_cache_client.dart:21:19)
#4      HiveCacheClient.getItem.<anonymous closure> (package:tmail_ui_user/features/caching/config/hive_cache_client.dart:63:19)
#5      new Future.sync (dart:async/future.dart:306:31)
#6      HiveCacheClient.getItem (package:tmail_ui_user/features/caching/config/hive_cache_client.dart:57:19)
#7      EncryptionKeyCacheManager.getEncryptionKeyStored (package:tmail_ui_user/features/login/data/local/encryption_key_cache_manager.dart:16:38)
#8      HiveCacheConfig.initializeEncryptionKey (package:tmail_ui_user/features/caching/config/hive_cache_config.dart:82:64)
#9      main.<anonymous closure> (package:tmail_ui_user/main.dart:29:36)
<asynchronous suspension>

flutter: [TwakeMail] [ERROR] AppLogger::initLogger::runZonedGuarded:onError: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.NetworkManager was not provided by any .service files | stack: #0      DBusClient._callMethod (package:dbus/src/dbus_client.dart:1120:13)
<asynchronous suspension>
#1      DBusClient.callMethod (package:dbus/src/dbus_client.dart:621:12)
<asynchronous suspension>
#2      DBusRemoteObjectManager.getManagedObjects (package:dbus/src/dbus_remote_object_manager.dart:80:18)
<asynchronous suspension>
#3      NetworkManagerClient.connect (package:nm/src/network_manager_client.dart:2351:19)
<asynchronous suspension>
#4      ConnectivityPlusLinuxPlugin._startListenConnectivity (package:connectivity_plus/src/connectivity_plus_linux.dart:64:5)
<asynchronous suspension>

Syncing files to device Linux...                                   264ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on Linux is available at: http://127.0.0.1:46221/8uT7I1DmCMU=/
The Flutter DevTools debugger and profiler on Linux is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:46221/8uT7I1DmCMU=/

onny avatar Sep 20 '24 10:09 onny

maybe it is related to https://pub.dev/packages/connectivity_plus

hoangdat avatar Sep 20 '24 10:09 hoangdat

Hey @onny, did you ever work further on this? Thanks.

Henry-Hiles avatar Jul 21 '25 21:07 Henry-Hiles

Nope no progress on this unfortunately :(

onny avatar Jul 22 '25 07:07 onny