Trouble getting the example app to run on CentOS

498 views
Skip to first unread message

davids...@gmail.com

unread,
May 9, 2018, 7:06:34 PM5/9/18
to Desktop Embedding for Flutter
Hi, all

I'm trying to use Dart & Flutter to write some apps that we want to deploy across the 5 major OSs (Linux, Windows, macOS, iOS, and Android). The most important of them is probably Linux, so I've been trying to get https://github.com/google/flutter-desktop-embedding installed and running in a CentOS guest VM (running on a macOS host, if anyone thinks that might matter). As far as I can tell, I got it built and installed ok, but whenever I try to run './example/flutter_embedder_example', a blank window pops up, the terminal says:
    [ERROR:flutter/shell/common/engine.cc(130)] Engine run configuration was invalid.
    [ERROR:flutter/shell/platform/embedder/embedder_engine.cc(65)] Could not launch the engine with configuration.
    flutter: Observatory listening on http://127.0.0.1:36745
...and then nothing else happens (until I close the blank window, of course).

I just asked on the main flutter group what a valid engine configuration consists of, but does anyone here have any thoughts on what the problem might be? FWIW, the output of 'flutter --version' is:
Flutter 0.3.2 • channel beta • https://github.com/flutter/flutter.git
Engine • revision 09d05a3891
Tools • Dart 2.0.0-dev.48.0.flutter-fe606f890b

Thanks,
-Dave Sweeris

Chinmay Garde

unread,
May 9, 2018, 7:31:01 PM5/9/18
to Desktop Embedding for Flutter
That error indicates that the Flutter engine cannot find the various snapshots it needs to launch the root isolate. I took a look at the example embedder and it seems to be looking for the assets in a directory relative to the current working directory. Try launching the embedder from the "example" directory directly. If I am reading that code correctly, you should be in a directly that has "../example_flutter/build/flutter_assets" available to it.

I'll try to make the messages a lot clearer in the engine and allow that example to launch custom Flutter applications rather than just the example specified.

Cheers,
Chinmay

davids...@gmail.com

unread,
May 10, 2018, 12:28:00 PM5/10/18
to Desktop Embedding for Flutter
That results in more dramatic error... The window appears, then goes away, and the terminal says this:
[FATAL:flutter/fml/icu_util.cc(95)] Check failed: context->IsValid(). Must be able to initialize the ICU context. Tried: ../../flutter/bin/cache/artifacts/engine/linux-x64/icudtl.dat
Aborted (core dumped)

I think I might've done something wrong, though, because 'example_flutter/build/' doesn't contain anything called 'flutter_assets' on my system. It only contains 'app.dill' and 'snapshot_blob.bin'. The only place I can find '../build/flutter_assets' anywhere is in my project directory for the app I'm writing. Do I need to move my development directory into '../SDKs/flutter-desktop-embedding/'?

Thanks
- Dave Sweeris

Stuart Morgan

unread,
May 10, 2018, 12:46:09 PM5/10/18
to davids...@gmail.com, Desktop Embedding for Flutter
On Thu, May 10, 2018 at 9:28 AM <davids...@gmail.com> wrote:
I think I might've done something wrong, though, because 'example_flutter/build/' doesn't contain anything called 'flutter_assets' on my system. It only contains 'app.dill' and 'snapshot_blob.bin'. The only place I can find '../build/flutter_assets' anywhere is in my project directory for the app I'm writing. Do I need to move my development directory into '../SDKs/flutter-desktop-embedding/'?

The makefile for the example should be running 'flutter build bundle' in the example_flutter directory, which should make flutter_assets.

Could you try deleting example_flutter/build and then re-running make, and seeing if there are any error messages for that step?

-Stuart

Stuart Morgan

unread,
May 10, 2018, 12:53:12 PM5/10/18
to Chinmay Garde, Desktop Embedding for Flutter
On Wed, May 9, 2018 at 4:31 PM 'Chinmay Garde' via Desktop Embedding for Flutter <flutter-deskto...@googlegroups.com> wrote:
[...] and allow that example to launch custom Flutter applications rather than just the example specified.

The embedder examples are deliberately intended to be hard-coded to run that specific Flutter example, to show what a self-contained app would look like (macOS is further along there, since it actually packages the assets); having them run arbitrary other things is a non-goal. Over time they will become even more specific to the example (e.g., registering a specific set of plugins that the example needs, once the plugins aren't all just part of the framework).

I've been considering adding generic shells that can run Flutter code at arbitrary paths, but those would be separate from the examples.

-Stuart

davids...@gmail.com

unread,
May 12, 2018, 11:50:05 AM5/12/18
to Desktop Embedding for Flutter
I wish I could. The VM got corrupted when I tried to move it to a different drive so I started over. Ubuntu 18.04 instead of CentOS this time since that’s what most of the docs seem to think I’ll be using, and booting off it’s own drive instead instead of running in a VM.

Anyway, I just didn’t want you to think I was ignoring you or your suggestion.
Reply all
Reply to author
Forward
0 new messages