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

App stuck on loading screen #114

Open
kalirosenkreuz opened this issue Nov 25, 2023 · 1 comment
Open

App stuck on loading screen #114

kalirosenkreuz opened this issue Nov 25, 2023 · 1 comment
Labels
bug Something isn't working desktop - linux Issues on Linux Desktop

Comments

@kalirosenkreuz
Copy link

On void linux, using latest version. Running any prebuilt binary on the intiface site gives:

(intiface_central:29352): Gdk-CRITICAL **: 22:39:42.447: gdk_window_get_state: assertion 'GDK_IS_WINDOW (window)' failed

Building and running from flutter run from the cloned repository gives slightly more info:

Building Linux application...

(intiface_central:7696): Gdk-CRITICAL **: 22:51:17.280: gdk_window_get_state: assertion 'GDK_IS_WINDOW (window)' failed
flutter: 👻 22:51:18.008056 INFO     Global Loggy - Intiface Central 2.5.1+18 Starting...
flutter: 👻 22:51:18.013399 INFO     Global Loggy - Running main builder
flutter: 👻 22:51:18.013525 INFO     Global Loggy - Initializing paths...
flutter: 👻 22:51:18.151950 INFO     Global Loggy - Starting file logger...
flutter: ⚠️ 22:51:18.159969 WARNING  Global Loggy - DSN not set, crash reporting cannot be used in this version of Intiface Central
flutter: 👻 22:51:18.211287 INFO     Global Loggy - Testing window position Offset(23.0, 23.0) against DP-2 (Size(1920.0, 1080.0) Offset(0.0, 0.0))
flutter: 👻 22:51:18.212222 INFO     Global Loggy - Window in bounds for DP-2
flutter: ⚠️ 22:51:18.218995 WARNING  Global Loggy - Intiface currently running in DEBUG MODE.
Syncing files to device Linux...                                   285ms

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:37133/pqhlYp5I8o4=/
The Flutter DevTools debugger and profiler on Linux is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:37133/pqhlYp5I8o4=/
flutter: 👻 22:51:18.277341 INFO     Global Loggy - Device configuration file version: 2.22
flutter: 👻 22:51:18.379047 INFO     Global Loggy - Initializing API static via lib/libintiface_engine_flutter_bridge.so
flutter: 🐛 22:51:18.384503 DEBUG    Global Loggy - Running HTTP Update for https://intiface-central-news.intiface.com/news.md with expected version "7a9837df5940e825b123b438674b56eb-ssl-df"
flutter: 🐛 22:51:18.679263 DEBUG    Global Loggy - No new version for https://intiface-central-news.intiface.com/news.md found
flutter: 🐛 22:51:18.679782 DEBUG    Global Loggy - Running HTTP Update for https://intiface-engine-device-config.intiface.com/ with expected version "36b487b1a7f4eccddff45086a96c2c37-ssl-df"
flutter: 🐛 22:51:18.970907 DEBUG    Global Loggy - No new version for https://intiface-engine-device-config.intiface.com/ found
flutter: 👻 22:51:18.971884 INFO     Global Loggy - Checking for application update

The application hangs indefinitely after that last line.

The window will open, but stuck on this screen forever:
image

@qdot qdot added desktop - linux Issues on Linux Desktop bug Something isn't working labels Mar 26, 2024
@orangejuice24
Copy link

I ran into the same issue on Linux. It looks like the problem only happens when you run the app with flutter run.

The root of the problem for me was in fft.dart with creating the DynamicLibrary to pass to IntifaceEngineFlutterBridgeImpl. The current code will look in the current working directory of the process. In the release bundles, the application is likely executed in the bundle directory. In this case there is a lib directory alongside it that will contain the intiface_engine_flutter_bridge library. When running with flutter run the cwd is actually the root directory of the project (or wherever you run it from presumably). In this case, the library is not located in the lib directory as expected.

I fixed this by resolving the directory that the executable is located in and prepending the dylib path with that. I wasn't sure about windows or android, so on those platforms I just prepended the current working directory to retain the existing behavior.

One other issue I ran into was in intiface_central_app.dart:buildApp. There isn't any exception handling and it doesn't seem like FutureBuilder does anything useful if the future throws an exception of returns a Future.error. Not sure what the best fix for this would be. As a debugging patch I wrapped the whole body in a try-catch and logged the exception.

Here's the change to ffi.dart: orangejuice24@79a1f5d

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

No branches or pull requests

3 participants