Git Product home page Git Product logo

workspace-automation's Introduction

Flutter Workspace Automation

Workspace Automation that supports embedded Flutter development

We developed a Python script, flutter_workspace.py to automate embedded flutter setup. This script reads a configuration folder of JSON files, or a single JSON configuration file and sets up a Flutter Workspace.

create_aot.py

create AOT is used to create libapp.so for use on a device.

Example use:

./create_aot --path <path that holds a pubspec.yaml>

Expects to be run from an active FLUTTER_WORKSPACE. Meaning you need to source you environment first.

create_recipes.py

creates a Yocto recipe for every pubspec.yaml found in a path folder. It will recursively iterate all subfolders.

Example use:

./create_recipes.py --path app/packages/ --license LICENSE --license_type BSD3-Clause --author "Google" --out ./tmp

Environmental variables used by script:

  • GEN_SNAPSHOT - (Required) Set GEN_SNAPSHOT to location of executable gen_snapshot

  • PUB_CACHE - Set using source ./setup_env.sh

  • FLUTTER_WORKSPACE - Set using source ./setup_env.sh

  • FLUTTER_BUILD_ARGS - Defaults to 'bundle'

  • LOCAL_ENGINE_HOST - Defaults to f'{flutter_sdk}/bin/cache/artifacts/engine/common'

  • APP_GEN_SNAPSHOT_FLAGS

  • APP_GEN_SNAPSHOT_AOT_FILENAME - Defaults to 'libapp.so.{runtime_mode}'

  • FLUTTER_PREBUILD_CMD

roll_meta_flutter.py

Updates all Flutter App recipes in meta-flutter using json as data source. The default data source is configs/flutter-apps.json

Example use

./roll_meta_flutter.py --path `pwd`/tmp

Default pubspec.yaml filter tokens

_android/pubspec.yaml
_ios/pubspec.yaml
_linux/pubspec.yaml
_macos/pubspec.yaml
_platform_interface/pubspec.yaml
_web/pubspec.yaml
_windows/pubspec.yaml

Default recipe filename filter tokens

-apple_
-avfoundation_
-darwin_
-linux_
-web_

Note: Exclude filters are added to json as "exclude" string array. The value to populate exclude filter is the FLUTTER_APPLICATION_PATH value. An empty string is valid.

flutter_workspace.py

flutter_workspace.py does the following tasks automatically for you

  • Establishes a workspace of known state
  • Sync repos into app folder
  • .vscode debug launcher file
  • Flutter SDK
  • Flutter runtime=debug engine
  • Loads platform types
    • QEMU, Docker, Remote, Host, Generic
    • Each type uses a specific configuration
  • Create setup_env.sh
  • Tested on Linux and Mac
    • Ubuntu 20 (x86_64)
    • Ubuntu 22 (x86_64)
    • Fedora 37 (x86_64)
    • Mac M1/M2 (arm64)

Flutter Workspace

A Flutter workspace contains

  • Flutter SDK
    • flutter
  • Development Repositories (app)
    • app
  • Host Runtime images
    • .config/flutter_workspace/
  • flutter-auto binary
    • app/ivi-homescreen/build
  • QEMU image
    • .config/flutter_workspace//)
  • Versioned x86_64 libflutter_engine.so and icudtl.dat
    • ./config/flutter_workspace/flutter-engine
  • Custom-device configurations
    • ./config/flutter_workspace/
  • Public Cache
    • .config/flutter_workspace/pub_cache

JSON Configuration

flutter_workspace_config.json contains the following components

  • globals
    • cookie_file
    • netrc
    • github_api
  • repos
    • git
  • platform definition

Installation

git clone https://github.com/meta-flutter/workspace_automation.git
./flutter_workspace.py

Options

--clean

Wipes workspace before creating

--config=

Pass configuration folder path.

--flutter-version=x.x.x

Override config/_globals.json key "flutter_version"

--fetch-engine

Fetch libflutter_engine.so and update bundle cache

--version-files=

Pass folder for storing dart and engine json files.

--plex="..."

Platform Load Exceptions. Pass platform-id values. Space is delimiter

--stdin-file

Use for debugging

Run flutter app with desktop-auto

  • Login via GDM Wayland Session
  • Open Terminal and type
  • source ${FLUTTER_WORKSPACE}/setup_env.sh
  • Navigate to your favorite app
  • flutter run -d desktop-auto

Run flutter app with QEMU

  • Open Terminal and type
  • source ${FLUTTER_WORKSPACE}/setup_env.sh
  • Type qemu_run
  • Wait until QEMU image reaches login prompt
  • Run ssh –p 2222 root@localhost who to add remote host to ~/.ssh/known_hosts
  • Navigate to your favorite app
  • flutter run -run-qemu-master

Create hello_world flutter example

  • Login to Ubuntu desktop via Wayland Session
  • Open Terminal and type
  • source ${FLUTTER_WORKSPACE}/setup_env.sh
  • cd ${FLUTTER_WORKSPACE}/app
  • flutter create hello_world -t app
  • cd hello_world
  • flutter run -d desktop-auto

Visual Studio Code

Launching on Ubuntu

    cd <your flutter workspace>
    source ./setup_env.sh
    code .

Debugging with VS Code

flutter_workspace.py creates a .vscode/launch.json file if one is not present. It uses the repo json key pubspec_path. If this key is present in the repo json, then it will add entry to .vscode/launch.json.

workspace-automation's People

Contributors

jwinarske avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

workspace-automation's Issues

flutter_workspace.py fails when looking for the freetype2-dev dependency

apt install calls at line 46 and 58 in config/flutter-engine.json should probably replace "freetype2-dev" with "libfreetype-dev" or "libfreetype6-dev". I am not sure which one should be used or if they are the same library with different names for legacy reasons.
Replacing "freetype2-dev" with "libfreetype-dev" worked for me.

apt search libfreetype
Sorting... Done
Full Text Search... Done
libcoin80c/focal 4.0.0+ds-1build1 amd64
  high-level 3D graphics kit implementing the Open Inventor API

libfreetype-dev/focal-updates,focal-security,now 2.10.1-2ubuntu0.3 amd64 [installed]
  FreeType 2 font engine, development files

libfreetype6/focal-updates,focal-security,now 2.10.1-2ubuntu0.3 amd64 [installed,automatic]
  FreeType 2 font engine, shared library files

libfreetype6-dev/focal-updates,focal-security,now 2.10.1-2ubuntu0.3 amd64 [installed]
  FreeType 2 font engine, development files (transitional package)

libgd-perl/focal,now 2.71-2build1 amd64 [installed,automatic]
  Perl module wrapper for libgd

Failing to Download Engine artifact

@jwinarske - Sorry don't mean to hassle you,

due to unforeseen circumstances I had to trash/rebuild my fedora env, and now running flutter_workspace.py "no matter what options" I pass it's failing to download the engine Artifacts.
I've never had this issue before so don't know if it's yours or mine if yours could it be the Engine Version:
if mine can you advise?

wa-vm > ./flutter_workspace.py --flutter-version=3.16.5 --fetch-engine


** Setting up Flutter Workspace in: /home/parallels/Documents/GitHub/workspace-automation **


.../...


** Fetching Engine Artifacts **


Engine Version: 3f3e560236539b7e2702f5ac790b2a4691b32d49
Working Directory: /home/parallels/Documents/GitHub/workspace-automation/.config/flutter_workspace/flutter-engine


** Downloading Engine artifact **


** Downloading linux-x64-embedder.zip via https://storage.googleapis.com/flutter_infra_release/flutter/3f3e560236539b7e2702f5ac790b2a4691b32d49/linux-x64/linux-x64-embedder


** Download Status: 404 **



** Failed to download linux-x64-embedder.zip **



** Engine artifact not available **


wa-vm > flutter doctor -v
[!] Flutter (Channel [user-branch], 3.16.5, on Fedora Linux 38 (Workstation Edition) 6.6.9-100.fc38.x86_64, locale en_US.UTF-8)
! Flutter version 3.16.5 on channel [user-branch] at /home/parallels/Documents/GitHub/workspace-automation/flutter
Currently on an unknown channel. Run flutter channel to switch to an official channel.
If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
! Upstream repository unknown source is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
• Framework revision 78666c8dc5 (3 weeks ago), 2023-12-19 16:14:14 -0800
• Engine revision 3f3e560236
• Dart version 3.2.3
• DevTools version 2.28.4
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Linux toolchain - develop for Linux desktop
• clang version 16.0.6 (Fedora 16.0.6-3.fc38)
• cmake version 3.27.7
• ninja version 1.11.1
• pkg-config version 1.8.0

[!] Flutter IDE Support (No supported IDEs installed)
• IntelliJ - https://www.jetbrains.com/idea/
• Android Studio - https://developer.android.com/studio/
• VS Code - https://code.visualstudio.com/

[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • Fedora Linux 38 (Workstation Edition) 6.6.9-100.fc38.x86_64
• Toyota homescreen (mobile) • desktop-homescreen • linux-x64 • homescreen x86_64

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

! Doctor found issues in 2 categories.

E: Unable to locate package vulkan-utils

@jwinarske

I previously informed you i had to install following vulkan packages to get it workspace-automation building
"vulkan. - sudo apt install libvulkan-dev vulkan-tools vulkan-validationlayers vulkan-utils"

However directly after pulling your May 31st commit i started receiving E: Unable to locate package vulkan-utils, so not sure if one of your changes caused this or (perhaps more likely) I had been over zealous requesting vulkan-utils and its not required.

You inserted following
line 55 configs/desktop-auto.json
"sudo apt install -y build-essential libvulkan-dev vulkan-tools vulkan-validationlayers vulkan-utils libtool",

Soon as i removed vulkan-utils it started working again, so you may want to do make the change
"sudo apt install -y build-essential libvulkan-dev vulkan-tools vulkan-validationlayers libtool",

E: Unable to locate package vulkan-utils
Traceback (most recent call last):
File "/home/parallels/Documents/GitHub/workspace-automation/./flutter_workspace.py", line 2465, in
main()
File "/home/parallels/Documents/GitHub/workspace-automation/./flutter_workspace.py", line 300, in main
setup_platforms(platforms, github_token, cookie_file, args.plex)
File "/home/parallels/Documents/GitHub/workspace-automation/./flutter_workspace.py", line 1866, in setup_platforms
setup_platform(platform_, git_token, cookie_file, plex)
File "/home/parallels/Documents/GitHub/workspace-automation/./flutter_workspace.py", line 1845, in setup_platform
handle_pre_requisites(runtime.get('pre-requisites'), cwd)
File "/home/parallels/Documents/GitHub/workspace-automation/./flutter_workspace.py", line 1289, in handle_pre_requisites
handle_commands(distro.get('cmds'), cwd)
File "/home/parallels/Documents/GitHub/workspace-automation/./flutter_workspace.py", line 1534, in handle_commands
subprocess.check_call(cmd_arr, cwd=cwd)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', 'apt', 'install', '-y', 'build-essential', 'libvulkan-dev', 'vulkan-tools', 'vulkan-validationlayers', 'vulkan-utils', 'libtool']' returned non-zero exit status 100.

regards

Minimum working example on macOS and Ubuntu

Hey @jwinarske! Thanks so much for your amazing efforts.

I'm really struggling to get this script to work at all on macOS M2 (and Ubuntu for that matter).
There seem to be issues with recognising cocoapods, which are also visible in the action failures.

On Ubuntu, many more issues (see #26, and #25) are popping up. I'm wondering if you guys are using this script still, because we're really having a lot of trouble to get anything working.

If there is a configuration that is known to work, we'd be really grateful if you could help us out by sharing what we might be doing wrong.

Thanks again!

workspace-automation failing on Ubuntu 22.04.2 LTS

Hello,
Today i tried workspace-automation for the 1st time ( previously used meta-flutter/meta-flutter/tree/kirkstone/tools )
and it's failing for me using flutter_workspace.py --clean on Ubuntu 22.04.2 LTS

As per following and attached (partial) flutter_workspace.log I encountered a couple of git cloning and make errors
and a bunch of compilation warnings.

Git cloning

2 errors Git cloning of (PBR) Compositor Surface 3rd parties TinyGLTF and KTX-Software

  1. Cloning into '/home/parallels/Documents/GitHub/workspace-automation/app/comp_surf_pbr/third_party/tinygltf'...
    git-lfs filter-process: 1: git-lfs: not found
    fatal: the remote end hung up unexpectedly

  2. fatal: Unable to checkout '48b455cc997a446c42442e077e7f324a59c79544' in submodule path 'third_party/KTX-Software'

Making IVI Home screen and target flutter-auto

CMake Error at third_party/KTX-Software/CMakeLists.txt:864 (add_subdirectory):
add_subdirectory given source "tests" which is not an existing directory.

true - this directory does not exist

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.22/Modules/FindVulkan.cmake:129 (find_package_handle_standard_args)
CMakeLists.txt:59 (find_package)

Not really sure what this means , 3rd party vulkan directory does exits within
workspace-automation/app/comp_surf_pbr/third_party/vulkan does exist and it just contains a bunch of .h headers files.

All other functionality within flutter_workspace including download and setup of flutter, engine artefacts, platform
agl-qemu-octopus seemed to work fine.
I'm not sure if the build failed because of git clone errors or if something else is wrong/missing so appreciate your feedback

regards

flutter_workspace.log
CMakeOutput.log

error 0: agl_shell has already been bound

I was trying to run flutter workspace automation to test a basic Flutter app I was developing for Automotive Grade Linux. I am facing a weird issue with no proper error information. My exact steps to reproduce the problem:

Installed the Flutter workspace automation.
Initialized the environment "source ./setup_env.sh".
Then type "run-agl-qemu-octopus".
Also ensured all ssh settings are correct and working.

I copied my application folder to "app/" dir inside the flutter workspace main directory. Then by navigating to my application folder, I typed the following command:
flutter run

Gives me the following error:

Connected devices:
Linux (desktop)                        • linux            • linux-x64 • Ubuntu
22.04.3 LTS 6.2.0-32-generic
AGL master-15.0.3 QEMU Image (mobile)  • agl-qemu-master  • linux-x64 •
qemu-master 15.0.3
AGL octopus-15.0.3 QEMU Image (mobile) • agl-qemu-octopus • linux-x64 •
qemu-octopus 15.0.3
[1]: Linux (linux)
[2]: AGL master-15.0.3 QEMU Image (agl-qemu-master)
[3]: AGL octopus-15.0.3 QEMU Image (agl-qemu-octopus)
Please choose one (or "q" to quit): 3
Launching lib/main.dart on AGL octopus-15.0.3 QEMU Image in debug mode...
[INFO:configuration.cc(248)] **********
[INFO:configuration.cc(249)] * Global *
[INFO:configuration.cc(250)] **********
[INFO:configuration.cc(251)] Application Id: .......... flutter-auto
[INFO:configuration.cc(253)] JSON Configuration: ...... /tmp/agl_flutter_voiceassistant/default_config.json
[INFO:configuration.cc(255)] Cursor Theme: ............ 
[INFO:configuration.cc(256)] Disable Cursor: .......... false
[INFO:configuration.cc(258)] Debug Backend: ........... false
[INFO:configuration.cc(260)] ********
[INFO:configuration.cc(261)] * View *
[INFO:configuration.cc(262)] ********
[INFO:configuration.cc(269)] Bundle Path: .............. /tmp/agl_flutter_voiceassistant
[INFO:configuration.cc(270)] Window Type: .............. BG
[INFO:configuration.cc(271)] Size: ..................... 1920 x 1080
[INFO:configuration.cc(273)] Fullscreen: ............... false
[INFO:configuration.cc(275)] Accessibility Features: ... 0
agl_shell@12: error 0: agl_shell has already been bound
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(553)] **** EGL Error
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(554)] 	error: 12289
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(555)] 	command: eglGetConfigs
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(594)] 	error: 12289
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(597)] 	messageType: 13242
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(598)] 	threadLabel: (nil)
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(599)] 	objectLabel: (nil)
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(600)] 	message: eglGetConfigs
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(553)] **** EGL Error
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(554)] 	error: 12289
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(555)] 	command: eglChooseConfig
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(594)] 	error: 12289
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(597)] 	messageType: 13242
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(598)] 	threadLabel: (nil)
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(599)] 	objectLabel: (nil)
[ERROR:/usr/src/debug/flutter-auto-runtimerelease/git-r0/git/shell/backend/egl.cc(600)] 	message: eglChooseConfig
Connection to localhost closed.

In the AGL terminal, I get the following output:

[   41.344111] show_signal_msg: 41 callbacks suppressed
[   41.344116] flutter-auto[494]: segfault at 0 ip 000055a2376c9294 sp 00007ffead734760 error 4 in flutter-auto[55a2376a6000+2e000]
[   41.345849] Code: ff 4c 8d 44 24 2c 4c 89 e2 89 e9 e8 36 a2 00 00 83 7c 24 2c 00 7e 3a 31 db 4c 8d 74 24 24 48 8b 2c 24 0f 1f 40 00 48 8b 7d 20 <49> 8b 34 dc ba 20 30 00 00 4c 89 f1 e8 1b a2 00 00 8b 45 18 3b 44

--flutter-version=3.10.x fails FileNotFoundError

@jwinarske

Not sure if this issue is your's, Google or something else but every patch release of flutter 3.10.x I've tried fails with FileNotFoundError, whilst patch release of 3.3.x and 3.7.x i tried all downloaded respective linux-x64-embedder.zip just fine and completes the build successfully.

/flutter_workspace.py --clean --flutter-version=3.10.3 fails
Engine Version: 2a3401c9bbb5a9a9aec74d4f735d18a9dd3ebf2d
Working Directory: /home/parallels/Documents/GitHub/workspace-automation/.config/flutter_workspace/flutter-engine
*********************************
** Downloading Engine artifact **
*********************************
** Downloading linux-x64-embedder.zip via https://storage.googleapis.com/flutter_infra_release/flutter/2a3401c9bbb5a9a9aec74d4f735d18a9dd3ebf2d/linux-x64/linux-x64-embedder
**************************
** Download Status: 404 **
**************************
***********************************************
** Failed to download linux-x64-embedder.zip **
***********************************************
Traceback (most recent call last):
File "/home/parallels/Documents/GitHub/workspace-automation/./flutter_workspace.py", line 2465, in
main()
File "/home/parallels/Documents/GitHub/workspace-automation/./flutter_workspace.py", line 282, in main
get_flutter_engine_runtime(clean_workspace)
File "/home/parallels/Documents/GitHub/workspace-automation/./flutter_workspace.py", line 1246, in get_flutter_engine_runtime
with zipfile.ZipFile(archive_file, "r") as zip_ref:
File "/usr/lib/python3.10/zipfile.py", line 1249, in init
self.fp = io.open(file, filemode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/parallels/Documents/GitHub/workspace-automation/.config/flutter_workspace/flutter-engine/2a3401c9bbb5a9a9aec74d4f735d18a9dd3ebf2d/linux-x64-embedder.zip'

Flutter Engine Artifact Download Fails (maybe with incorrect file name?)

Hi @jwinarske,

I'm encountering an issue with the Flutter engine artifact download in the workspace automation script. This seems to be a continuation of the problem described in issue #24, but with some new details.

Current Behavior:
When running the flutter_workspace.py script, the engine artifact download fails with the following error:

...
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel [user-branch], 3.24.0, on Ubuntu 24.04 LTS 6.8.0-40-generic, locale en_US.UTF-8)
    ! Flutter version 3.24.0 on channel [user-branch] at /home/<user>/Documents/dev/workspace-automation/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
[✓] Linux toolchain - develop for Linux desktop
[✓] VS Code (version 1.92.2)
[✓] Connected device (1 available)
[✓] Network resources

! Doctor found issues in 1 category.
Engine Version: b8800d88be4866db1b15f8b954ab2573bba9960f
Working Directory: /home/<user>/Documents/dev/workspace-automation/.config/flutter_workspace/flutter-engine
*********************************
** Downloading Engine artifact **
*********************************
** Downloading linux-x64-embedder.zip via https://storage.googleapis.com/flutter_infra_release/flutter/b8800d88be4866db1b15f8b954ab2573bba9960f/linux-x64/linux-x64-embedder
************************
** Download Status: 0 **
************************
***********************************************
** Failed to download linux-x64-embedder.zip **
***********************************************
...

Expected Behavior:
The script should successfully download the Flutter engine artifact and continue with the setup process.

Possible Cause:
The URL being used to download the artifact may be incorrect. It appears that the .zip extension is missing from the URL.

Steps to Reproduce:

  1. Clone the workspace-automation repository
  2. Run the flutter_workspace.py script
  3. Observe the error message about failing to download the engine artifact

Environment:

  • OS: Ubuntu 24.04 LTS
  • Python version: 3.12
  • Flutter version: 3.24.0

Thank you for your help in addressing this issue and for making the world of embedded Flutter more accessible!

Unable to Run flutter apps with QEMU

Hi @jwinarske - I'm Unable to Run flutter apps with QEMU

After having resolved my previous issue #5,
i'm now unable to run the flutter apps under QEMU using either master and octopus artefacts,
and i think the reason is when launching run-agl-qemu-master, run-agl-qemu-octoups it's booting the default AGL flutter graphic image thus preventing me from running other apps.

My configuration is x86_64, ubuntu desktop 22.04.2 LTS, AGL downloaded artifact agl-ivi-demo-platform-flutter-qemux86-64.wic.vmdk.xz

Unless i'm mistaken shouldn't i be booting a headless image so as i can then run the other flutter apps?
I have attached my agl-qemu-master.json for your review

please advise and regards.
agl-qemu-master-json.txt

setup_env.sh (looks fine)

parallels-ped-vm > source ./setup_env.sh
SCRIPT_PATH=/home/parallels/Documents/GitHub/workspace-automation
********************************************
* Setting FLUTTER_WORKSPACE to:
* /home/parallels/Documents/GitHub/workspace-automation
********************************************
[!] Flutter (Channel unknown, 3.3.10, on Ubuntu 22.04.2 LTS 5.19.0-42-generic, locale en_US.UTF-8)
    ! Flutter version 3.3.10 on channel unknown at /home/parallels/Documents/GitHub/workspace-automation/flutter
    ! Upstream repository unknown
    • Framework revision 135454af32 (5 months ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.6
    • cmake version 3.22.1
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[!] Flutter IDE Support (No supported IDEs installed)
    • IntelliJ - https://www.jetbrains.com/idea/
    • Android Studio - https://developer.android.com/studio/
    • VS Code - https://code.visualstudio.com/

[✓] Connected device (2 available)
    • Linux (desktop)              • linux        • linux-x64 • Ubuntu 22.04.2 LTS 5.19.0-42-generic
    • Toyota flutter-auto (mobile) • desktop-auto • linux-x64 • flutter-auto x86_64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.
List of custom devices in "/home/parallels/Documents/GitHub/workspace-automation/.config/flutter/custom_devices.json":
  id: pi-zero2w-weston, label: Raspberry Pi Zero 2W, enabled: true
  id: agl-qemu-octopus, label: AGL octopus-latest QEMU Image, enabled: true
  id: desktop-auto, label: Toyota flutter-auto, enabled: true
  id: agl-qemu-master, label: AGL master-latest QEMU Image, enabled: true
  id: stm32mp15-weston, label: STM32MP157F-DK2, enabled: true
********************************************
* Type 'run-agl-qemu-octopus' to start
********************************************
********************************************
* Type 'run-agl-qemu-master' to start
********************************************

From README.md (function qemu_run removed)

### Run flutter app with QEMU 

* Open Terminal and type
* `source ${FLUTTER_WORKSPACE}/setup_env.sh`
* Type `qemu_run`                              
* Wait until QEMU image reaches login prompt
* Run `ssh –p 2222 root@localhost who` to add remote host to ~/.ssh/known_hosts
* Navigate to your favorite app
* `flutter run -run-qemu-master`

Missing default_config.json in Platform Directory

Hi @jwinarske 👋

The agl-qemu-octopus.json and agl-qemu-master.json configuration files mention a default_config.json, but I can't seem to find it anywhere in the platform directory. Interestingly, I do see a config.toml file being created instead. This has me wondering if there's been a recent change that I might have missed.

I'll admit I'm a bit uncertain about how this script is supposed to work overall. It's possible I'm misunderstanding some key aspects of the setup process. Any clarification on the general workflow would be super helpful!

Thanks in advance for any insights you can provide!

Missing QEMU image file in AGL configuration

Hi @jwinarske

The current configuration file for the AGL QEMU (master and octopus) environment references a file that no longer exists.

  • Missing file: qemux86-64/agl-ivi-demo-platform-flutter-qemux86-64.wic.vmdk.xz
  • Referenced in:
    "artifacts": {
      "http": {
        "url": "https://download.automotivelinux.org/AGL/release/${RELEASE_NAME}/${RELEASE_VERSION}",
        "artifacts": {
          "x86_64": [
            {
              "endpoint": "/qemux86-64/deploy/images/qemux86-64/agl-ivi-demo-platform-flutter-qemux86-64.wic.vmdk.xz"
            }
          ],
          // ...
        }
      }
    }

Is it possible that the file agl-ivi-demo-flutter-qemux86-64.wic.vmdk.xz is the intended replacement for the missing file?

https://download.automotivelinux.org/AGL/snapshots/ricefish/latest/qemux86-64/deploy/images/qemux86-64/

Thanks again!

SSH Connection Refused When Launching Flutter App on AGL QEMU Image

Hello @jwinarske ! 👋

I've made some progress with the AGL QEMU setup, but I've hit another snag when trying to run the Flutter app. I'd appreciate your insights on this new issue.

When attempting to launch the Flutter app using flutter run, I encounter the following error:

Launching lib/main.dart on AGL ricefish-latest QEMU Image in debug mode...
ssh: connect to host localhost port 22: Connection refused

QEMU is running and I can interact with the AGL UI. I also added the fingerprint:

Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[localhost]:2222' (ED25519) to the list of known hosts.
agl-driver tty7         Aug 20 17:23
  • The error message mentions port 22, but the configuration shows that the connection from the host is opened via port 2222, which is forwarded to port 22 on the virtual machine.
  • I've created a ricefish config based on existing configs, applying the suggested fix from issue #26.

Questions

  1. Why is the Flutter run command attempting to connect to port 22 instead of 2222?
  2. Is there a configuration setting I might have missed that specifies the SSH port for Flutter?
  3. Could this be related to the changes made in the ricefish config?

I'm happy to suggest PRs if needed, but I don't yet feel confident enough in my understanding of the system to do so. Any guidance or explanations would be greatly appreciated.

Thanks in advance for your help with this issue!

No implementation found error. got flutter secure storage

@jwinarske

if I build workspace automation as follows then run ped -b agl - (includes secure storage) I get the follow No implementation found error.

However, if I switch to my -b ivi_localstore (doesn't include secure storage) everything works fine.
Are you able to advise what needs to be done either your end or mine to enable secure storage in desktop-homescreen working?

regards

git clone https://github.com/meta-flutter/workspace-automation -b main
./flutter_workspace.py --clean --flutter-version=3.16.4
source ./setup_env.sh
cd ped
flutter run -d desktop-homescreen

Resolving dependencies... (1.3s)
_fe_analyzer_shared 64.0.0 (65.0.0 available)
analyzer 6.2.0 (6.3.0 available)
coverage 1.6.4 (1.7.2 available)
file 6.1.4 (7.0.0 available)
fl_chart 0.64.0 (0.65.0 available)

  • flutter_secure_storage 9.0.0
  • flutter_secure_storage_linux 1.2.0
  • flutter_secure_storage_macos 3.0.1
  • flutter_secure_storage_platform_interface 1.0.2
  • flutter_secure_storage_web 1.1.2
  • flutter_secure_storage_windows 3.0.0
    intl 0.18.1 (0.19.0 available)
    matcher 0.12.16 (0.12.16+1 available)
    material_color_utilities 0.5.0 (0.8.0 available)
    meta 1.10.0 (1.11.0 available)
    path 1.8.3 (1.9.0 available)
    platform 3.1.2 (3.1.3 available)
    process 4.2.4 (5.0.1 available)
    test 1.24.9 (1.25.0 available)
    test_api 0.6.1 (0.7.0 available)
    test_core 0.5.9 (0.6.0 available)
    uuid 4.2.2 (4.3.1 available)
    vm_service 11.10.0 (14.0.0 available)
    web 0.3.0 (0.4.0 available)
    web_socket_channel 2.4.0 (2.4.1 available)
    webdriver 3.0.2 (3.0.3 available)
    Changed 6 dependencies!
    20 packages have newer versions incompatible with dependency constraints.
    Try flutter pub outdated for more information.
    Launching lib/main.dart on Toyota homescreen in debug mode...
    [21:04:17.560593] [I] main @ 5ab78a1
    [21:04:17.560661] [I] **********
    [21:04:17.560671] [I] * Global *
    [21:04:17.560678] [I] **********
    [21:04:17.560686] [I] Application Id: .......... homescreen
    [21:04:17.560694] [I] JSON Configuration: ...... .desktop-homescreen/default_config.json
    [21:04:17.560701] [I] Disable Cursor: .......... false
    [21:04:17.560709] [I] Debug Backend: ........... false
    [21:04:17.560719] [I] ********
    [21:04:17.560749] [I] * View *
    [21:04:17.560758] [I] ********
    [21:04:17.560765] [I] Bundle Path: .............. .desktop-homescreen
    [21:04:17.560776] [I] Window Type: .............. NORMAL
    [21:04:17.560785] [I] Output Index: ............. 0
    [21:04:17.560793] [I] Size: ..................... 1920 x 1080
    [21:04:17.560804] [I] Fullscreen: ............... false
    [21:04:17.560814] [I] Accessibility Features: ... 0
    [21:04:17.608955] [I] Pointer Present
    [21:04:17.609005] [I] Keyboard Present
    [21:04:17.680445] [I] (0) Runtime=debug
    [21:04:17.944034] [E] Not sending message on Platform Thread
    [21:04:17.979163] [E] Not sending message on Platform Thread
    [21:04:18.001347] [E] Not sending message on Platform Thread
    [21:04:18.032530] [I] Channel: "plugins.it_nomads.com/flutter_secure_storage"
    0x000000: 07 04 72 65 61 64 0d 02 07 03 6b 65 79 07 24 70 ..read....key.$p
    0x000010: 65 64 5f 75 69 5f 73 65 74 74 69 6e 67 73 5f 63 ed_ui_settings_c
    0x000020: 6f 6c 6c 2d 70 65 64 5f 75 69 5f 73 65 74 74 69 oll-ped_ui_setti
    0x000030: 6e 67 73 07 07 6f 70 74 69 6f 6e 73 0d 00 ngs..options..

[21:04:18.032559] [E] Not sending message on Platform Thread
[21:04:18.034360] [I] [2023-12-20 21:04:18.025565]: DEBUG: UiSettingsDao : Retrieving instance of UiSettings
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method read on channel plugins.it_nomads.com/flutter_secure_storage)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:320:7)

#1 SecureStorage.readData (package:pumped_end_device/data/local/dao2/secure_storage.dart:42:12)

#2 UiSettingsDao.getUiSettings (package:pumped_end_device/data/local/dao2/ui_settings_dao.dart:41:26)

#3 main (package:pumped_end_device/main.dart:50:28)

Syncing files to device Toyota homescreen... 113ms

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 Toyota homescreen is available at: http://127.0.0.1:43797/lOlPgAGMShU=/
The Flutter DevTools debugger and profiler on Toyota homescreen is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:43797/lOlPgAGMShU=/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.