flutter icon indicating copy to clipboard operation
flutter copied to clipboard

Target android_aot_release_android-arm64 failed: ProcessException: Failed to find [...]/bin/cache/artifacts/engine/android-arm64-release/linux-arm64/gen_snapshot" in the search path

Open AngeloAvv opened this issue 5 months ago • 4 comments

It might be similar to #156175.

By looking under [...]/bin/cache/artifacts/engine/android-arm64-release, I can spot a folder named linux-x64, but looking at the error, it should be linux-arm64 instead. This could be the reason Flutter is not finding the right gen_snapshot file.

Steps to reproduce

  1. Download and install Dart and Flutter on Debian 12 running on an arm64 instance
  2. Run flutter build appbundle --release

Expected results

Should compile and create an aab artifact flawlessly

Actual results

Target android_aot_release_android-arm failed: ProcessException: Failed to find "/root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-arm-release/linux-arm64/gen_snapshot" in the search path.
  Command: /root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-arm-release/linux-arm64/gen_snapshot 
Target android_aot_release_android-arm64 failed: ProcessException: Failed to find "/root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-arm64-release/linux-arm64/gen_snapshot" in the search path.
  Command: /root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-arm64-release/linux-arm64/gen_snapshot 
Target android_aot_release_android-x64 failed: ProcessException: Failed to find "/root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-x64-release/linux-arm64/gen_snapshot" in the search path.
  Command: /root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-x64-release/linux-arm64/gen_snapshot 
FAILURE: Build failed with an exception.

Logs

Logs
$ fvm flutter build appbundle --release --build-number $CI_PIPELINE_IID
Downloading Linux arm64 Dart SDK from Flutter engine cf56914b326edb0ccb123ffdc60f00060bd513fa...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  205M  100  205M    0     0  31.4M      0  0:00:06  0:00:06 --:--:-- 37.0M
Building flutter tool...
Resolving dependencies...
Downloading packages...
+ _fe_analyzer_shared 76.0.0 (82.0.0 available)
+ _macros 0.3.3 from sdk dart
+ analyzer 6.11.0 (7.4.5 available)
+ archive 3.6.1 (4.0.7 available)
+ args 2.6.0 (2.7.0 available)
+ async 2.12.0 (2.13.0 available)
+ boolean_selector 2.1.2
+ browser_launcher 1.1.3
+ built_collection 5.1.1
+ built_value 8.9.3 (8.9.5 available)
+ checked_yaml 2.0.3
+ clock 1.1.2
+ collection 1.19.1
+ completion 1.0.1
+ convert 3.1.2
+ coverage 1.11.1 (1.13.1 available)
+ crypto 3.0.6
+ csslib 1.0.2
+ dap 1.4.0
+ dds 5.0.0
+ dds_service_extensions 2.0.1
+ devtools_shared 11.2.0 (11.2.1 available)
+ dtd 2.4.0 (2.5.1 available)
+ dwds 24.3.2 (24.3.10 available)
+ extension_discovery 2.1.0
+ fake_async 1.3.2 (1.3.3 available)
+ ffi 2.1.3 (2.1.4 available)
+ file 7.0.1
+ file_testing 3.0.2
+ fixnum 1.1.1
+ flutter_template_images 5.0.0
+ frontend_server_client 4.0.0
+ glob 2.1.2 (2.1.3 available)
+ graphs 2.3.2
+ html 0.15.5 (0.15.6 available)
+ http 1.2.2 (1.4.0 available)
+ http_multi_server 3.2.2
+ http_parser 4.1.2
+ intl 0.19.0 (0.20.2 available)
+ io 1.0.5
+ js 0.7.1 (discontinued)
+ json_annotation 4.9.0
+ json_rpc_2 3.0.3 (4.0.0 available)
+ logging 1.3.0
+ macros 0.1.3-main.0
+ matcher 0.12.17
+ meta 1.16.0 (1.17.0 available)
+ mime 2.0.0
+ multicast_dns 0.3.2+7 (0.3.3 available)
+ mustache_template 2.0.0
+ native_assets_builder 0.10.2 (discontinued replaced by hooks_runner)
+ native_assets_cli 0.10.0 (discontinued replaced by hooks)
+ native_stack_traces 0.6.0
+ node_preamble 2.0.2
+ package_config 2.1.1 (2.2.0 available)
+ path 1.9.1
+ petitparser 6.1.0
+ platform 3.1.6
+ pool 1.5.1
+ process 5.0.3
+ pub_semver 2.1.5 (2.2.0 available)
+ pubspec_parse 1.5.0
+ shelf 1.4.2
+ shelf_packages_handler 3.0.2
+ shelf_proxy 1.0.4
+ shelf_static 1.1.3
+ shelf_web_socket 2.0.1 (3.0.0 available)
+ source_map_stack_trace 2.1.2
+ source_maps 0.10.13
+ source_span 1.10.1
+ sprintf 7.0.0
+ sse 4.1.7
+ stack_trace 1.12.1
+ standard_message_codec 0.0.1+4
+ stream_channel 2.1.4
+ string_scanner 1.4.1
+ sync_http 0.3.1
+ term_glyph 1.2.2
+ test 1.25.14 (1.26.0 available)
+ test_api 0.7.4 (0.7.5 available)
+ test_core 0.6.8 (0.6.9 available)
+ typed_data 1.4.0
+ unified_analytics 7.0.1 (8.0.1 available)
+ usage 4.1.1 (discontinued)
+ uuid 4.5.1
+ vm_service 14.3.1 (15.0.0 available)
+ vm_service_interface 2.0.1
+ vm_snapshot_analysis 0.7.6
+ watcher 1.1.1
+ web 1.1.0 (1.1.1 available)
+ web_socket 0.1.6 (1.0.1 available)
+ web_socket_channel 3.0.1 (3.0.3 available)
+ webdriver 3.0.4 (3.1.0 available)
+ webkit_inspection_protocol 1.2.1
+ xml 6.5.0
+ yaml 3.1.3
+ yaml_edit 2.2.2
Changed 97 dependencies!
4 packages are discontinued.
34 packages have newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.
  ╔════════════════════════════════════════════════════════════════════════════╗
  ║                 Welcome to Flutter! - https://flutter.dev                  ║
  ║                                                                            ║
  ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
  ║ statistics and basic crash reports. This data is used to help improve      ║
  ║ Flutter tools over time.                                                   ║
  ║                                                                            ║
  ║ Flutter tool analytics are not sent on the very first run. To disable      ║
  ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
  ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
  ║ event will be sent, and then no further information will be sent by the    ║
  ║ Flutter tool.                                                              ║
  ║                                                                            ║
  ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
  ║ The Google Privacy Policy describes how data is handled in this service.   ║
  ║                                                                            ║
  ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
  ║ crash reports to Google.                                                   ║
  ║                                                                            ║
  ║ Read about data we send with crash reports:                                ║
  ║ https://flutter.dev/to/crash-reporting                                     ║
  ║                                                                            ║
  ║ See Google's privacy policy:                                               ║
  ║ https://policies.google.com/privacy                                        ║
  ║                                                                            ║
  ║ To disable animations in this tool, use                                    ║
  ║ 'flutter config --no-cli-animations'.                                      ║
  ╚════════════════════════════════════════════════════════════════════════════╝
Downloading Material fonts...                                      432ms
Downloading Gradle Wrapper...                                       18ms
Downloading package sky_engine...                                  126ms
Downloading package flutter_gpu...                                  17ms
Downloading flutter_patched_sdk tools...                           290ms
Downloading flutter_patched_sdk_product tools...                   242ms
Downloading linux-arm64 tools...                                 2,479ms
Downloading linux-arm64/font-subset tools...                        97ms
Downloading android-arm-profile/linux-x64 tools...                 160ms
Downloading android-arm-release/linux-x64 tools...                 112ms
Downloading android-arm64-profile/linux-x64 tools...               [132](https://host/flutter/appname/-/jobs/124926#L132)ms
Downloading android-arm64-release/linux-x64 tools...               117ms
Downloading android-x64-profile/linux-x64 tools...                 129ms
Downloading android-x64-release/linux-x64 tools...                 123ms
Synthetic package output (package:flutter_gen) is deprecated: https://flutter.dev/to/flutter-gen-deprecation. In a future release, synthetic-package will default to `false` and will later be removed entirely.
Running Gradle task 'bundleRelease'...                          
Checking the license for package NDK (Side by side) 26.1.10909125 in /opt/android/sdk/licenses
License for package NDK (Side by side) 26.1.10909125 accepted.
Preparing "Install NDK (Side by side) 26.1.10909125 v.26.1.10909125".
"Install NDK (Side by side) 26.1.10909125 v.26.1.10909125" ready.
Installing NDK (Side by side) 26.1.10909125 in /opt/android/sdk/ndk/26.1.10909125
"Install NDK (Side by side) 26.1.10909125 v.26.1.10909125" complete.
"Install NDK (Side by side) 26.1.10909125 v.26.1.10909125" finished.
Your project is configured with Android NDK 26.1.10909125, but the following plugin(s) depend on a different Android NDK version:
- audio_waveforms requires Android NDK 27.0.12077973
- cloud_firestore requires Android NDK 27.0.12077973
- cloud_functions requires Android NDK 27.0.12077973
- firebase_analytics requires Android NDK 27.0.12077973
- firebase_auth requires Android NDK 27.0.12077973
- firebase_core requires Android NDK 27.0.12077973
- firebase_crashlytics requires Android NDK 27.0.12077973
- firebase_messaging requires Android NDK 27.0.12077973
- firebase_remote_config requires Android NDK 27.0.12077973
- flutter_launch_arguments requires Android NDK 27.0.12077973
- flutter_local_notifications requires Android NDK 27.0.12077973
- package_info_plus requires Android NDK 27.0.12077973
- path_provider_android requires Android NDK 27.0.12077973
- shared_preferences_android requires Android NDK 27.0.12077973
- store_redirect requires Android NDK 27.0.12077973
Fix this issue by using the highest Android NDK version (they are backward compatible).
Add the following to /builds/flutter/appname/android/app/build.gradle:
    android {
        ndkVersion = "27.0.12077973"
        ...
    }
Checking the license for package Android SDK Platform 34 in /opt/android/sdk/licenses
License for package Android SDK Platform 34 accepted.
Preparing "Install Android SDK Platform 34 (revision 3)".
"Install Android SDK Platform 34 (revision 3)" ready.
Installing Android SDK Platform 34 in /opt/android/sdk/platforms/android-34
"Install Android SDK Platform 34 (revision 3)" complete.
"Install Android SDK Platform 34 (revision 3)" finished.
[=========                              ] 25%                                   
[=========                              ] 25% Fetch remote repository...        
[=======================================] 100% Fetch remote repository...       
Expected to find fonts for (MaterialIcons, packages/cupertino_icons/CupertinoIcons, packages/font_awesome_flutter/FontAwesomeSolid, packages/font_awesome_flutter/FontAwesomeRegular, AppNameIcons), but found (MaterialIcons, AppNameIcons, packages/font_awesome_flutter/FontAwesomeRegular, packages/font_awesome_flutter/FontAwesomeSolid). This usually means you are referring to font families in an IconData class but not including them in the assets section of your pubspec.yaml, are missing the package that would include them, or are missing "uses-material-design: true".
Font asset "fa-regular-400.ttf" was tree-shaken, reducing it from 67976 to 1672 bytes (97.5% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Font asset "fa-solid-900.ttf" was tree-shaken, reducing it from 423676 to 5040 bytes (98.8% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from [164](https://host/flutter/appname/-/jobs/124926#L164)5184 to 2856 bytes (99.8% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Target android_aot_release_android-arm failed: ProcessException: Failed to find "/root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-arm-release/linux-arm64/gen_snapshot" in the search path.
  Command: /root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-arm-release/linux-arm64/gen_snapshot 
Target android_aot_release_android-arm64 failed: ProcessException: Failed to find "/root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-arm64-release/linux-arm64/gen_snapshot" in the search path.
  Command: /root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-arm64-release/linux-arm64/gen_snapshot 
Target android_aot_release_android-x64 failed: ProcessException: Failed to find "/root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-x64-release/linux-arm64/gen_snapshot" in the search path.
  Command: /root/fvm/versions/3.29.3/bin/cache/artifacts/engine/android-x64-release/linux-arm64/gen_snapshot 
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/root/fvm/versions/3.29.3/bin/flutter'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 7m 57s
Running Gradle task 'bundleRelease'...                            480.6s
Gradle task bundleRelease failed with exit code 1

Flutter Doctor output

Doctor output
$ fvm flutter doctor
Downloading Linux arm64 Dart SDK from Flutter engine cf56914b326edb0ccb123ffdc60f00060bd513fa...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  205M  100  205M    0     0  26.9M      0  0:00:07  0:00:07 --:--:-- 29.0M
Building flutter tool...
Resolving dependencies...
Downloading packages...
+ _fe_analyzer_shared 76.0.0 (82.0.0 available)
+ _macros 0.3.3 from sdk dart
+ analyzer 6.11.0 (7.4.5 available)
+ archive 3.6.1 (4.0.7 available)
+ args 2.6.0 (2.7.0 available)
+ async 2.12.0 (2.13.0 available)
+ boolean_selector 2.1.2
+ browser_launcher 1.1.3
+ built_collection 5.1.1
+ built_value 8.9.3 (8.9.5 available)
+ checked_yaml 2.0.3
+ clock 1.1.2
+ collection 1.19.1
+ completion 1.0.1
+ convert 3.1.2
+ coverage 1.11.1 (1.13.1 available)
+ crypto 3.0.6
+ csslib 1.0.2
+ dap 1.4.0
+ dds 5.0.0
+ dds_service_extensions 2.0.1
+ devtools_shared 11.2.0 (11.2.1 available)
+ dtd 2.4.0 (2.5.1 available)
+ dwds 24.3.2 (24.3.10 available)
+ extension_discovery 2.1.0
+ fake_async 1.3.2 (1.3.3 available)
+ ffi 2.1.3 (2.1.4 available)
+ file 7.0.1
+ file_testing 3.0.2
+ fixnum 1.1.1
+ flutter_template_images 5.0.0
+ frontend_server_client 4.0.0
+ glob 2.1.2 (2.1.3 available)
+ graphs 2.3.2
+ html 0.15.5 (0.15.6 available)
+ http 1.2.2 (1.4.0 available)
+ http_multi_server 3.2.2
+ http_parser 4.1.2
+ intl 0.19.0 (0.20.2 available)
+ io 1.0.5
+ js 0.7.1 (discontinued)
+ json_annotation 4.9.0
+ json_rpc_2 3.0.3 (4.0.0 available)
+ logging 1.3.0
+ macros 0.1.3-main.0
+ matcher 0.12.17
+ meta 1.16.0 (1.17.0 available)
+ mime 2.0.0
+ multicast_dns 0.3.2+7 (0.3.3 available)
+ mustache_template 2.0.0
+ native_assets_builder 0.10.2 (discontinued replaced by hooks_runner)
+ native_assets_cli 0.10.0 (discontinued replaced by hooks)
+ native_stack_traces 0.6.0
+ node_preamble 2.0.2
+ package_config 2.1.1 (2.2.0 available)
+ path 1.9.1
+ petitparser 6.1.0
+ platform 3.1.6
+ pool 1.5.1
+ process 5.0.3
+ pub_semver 2.1.5 (2.2.0 available)
+ pubspec_parse 1.5.0
+ shelf 1.4.2
+ shelf_packages_handler 3.0.2
+ shelf_proxy 1.0.4
+ shelf_static 1.1.3
+ shelf_web_socket 2.0.1 (3.0.0 available)
+ source_map_stack_trace 2.1.2
+ source_maps 0.10.13
+ source_span 1.10.1
+ sprintf 7.0.0
+ sse 4.1.7
+ stack_trace 1.12.1
+ standard_message_codec 0.0.1+4
+ stream_channel 2.1.4
+ string_scanner 1.4.1
+ sync_http 0.3.1
+ term_glyph 1.2.2
+ test 1.25.14 (1.26.0 available)
+ test_api 0.7.4 (0.7.5 available)
+ test_core 0.6.8 (0.6.9 available)
+ typed_data 1.4.0
+ unified_analytics 7.0.1 (8.0.1 available)
+ usage 4.1.1 (discontinued)
+ uuid 4.5.1
+ vm_service 14.3.1 (15.0.0 available)
+ vm_service_interface 2.0.1
+ vm_snapshot_analysis 0.7.6
+ watcher 1.1.1
+ web 1.1.0 (1.1.1 available)
+ web_socket 0.1.6 (1.0.1 available)
+ web_socket_channel 3.0.1 (3.0.3 available)
+ webdriver 3.0.4 (3.1.0 available)
+ webkit_inspection_protocol 1.2.1
+ xml 6.5.0
+ yaml 3.1.3
+ yaml_edit 2.2.2
Changed 97 dependencies!
4 packages are discontinued.
34 packages have newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.
  ╔════════════════════════════════════════════════════════════════════════════╗
  ║                 Welcome to Flutter! - https://flutter.dev/                  ║
  ║                                                                            ║
  ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
  ║ statistics and basic crash reports. This data is used to help improve      ║
  ║ Flutter tools over time.                                                   ║
  ║                                                                            ║
  ║ Flutter tool analytics are not sent on the very first run. To disable      ║
  ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
  ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
  ║ event will be sent, and then no further information will be sent by the    ║
  ║ Flutter tool.                                                              ║
  ║                                                                            ║
  ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
  ║ The Google Privacy Policy describes how data is handled in this service.   ║
  ║                                                                            ║
  ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
  ║ crash reports to Google.                                                   ║
  ║                                                                            ║
  ║ Read about data we send with crash reports:                                ║
  ║ https://flutter.dev/to/crash-reporting                                     ║
  ║                                                                            ║
  ║ See Google's privacy policy:                                               ║
  ║ https://policies.google.com/privacy                                        ║
  ║                                                                            ║
  ║ To disable animations in this tool, use                                    ║
  ║ 'flutter config --no-cli-animations'.                                      ║
  ╚════════════════════════════════════════════════════════════════════════════╝
Downloading Material fonts...                                    1,104ms
Downloading Gradle Wrapper...                                       31ms
Downloading package sky_engine...                                  296ms
Downloading package flutter_gpu...                                  30ms
Downloading flutter_patched_sdk tools...                           731ms
Downloading flutter_patched_sdk_product tools...                   681ms
Downloading linux-arm64 tools...                                    6.1s
Downloading linux-arm64/font-subset tools...                       314ms
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.3, on Debian GNU/Linux 12 (bookworm) 6.8.0-1025-oracle, locale en_US.UTF-8)
[✗] 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/to/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++ is required for Linux development.
      It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
    ✗ CMake is required for Linux development.
      It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
    ✗ ninja is required for Linux development.
      It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
    ✗ pkg-config is required for Linux development.
      It is likely available from your distribution (e.g.: apt install pkg-config), or can be downloaded from https://www.freedesktop.org/wiki/Software/pkg-config/
[!] Android Studio (not installed)
[✓] Connected device (1 available)
[✓] Network resources
! Doctor found issues in 4 categories.

AngeloAvv avatar May 16 '25 15:05 AngeloAvv