Skip to content

M1 android tests failed due to unsupported arm64 android sdk and java cipd packages #98532

Closed

Description

@keyonghan

Following #87508 (comment), we are adding new M1 arm64 tests to staging for validation: https://flutter-review.googlesource.com/c/infra/+/26927

Some of the tests need android sdk, however we do not have the arm64 version in the cipd packages.

CIPD('ensure_installed') failed with: failed to resolve flutter_internal/android/sdk/mac-arm64@version:29.0 (line 1): no such package: flutter_internal/android/sdk/mac-arm64

Example build: https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_arm64_staging%20build_aar_module_test/6/overview

/cc @jmagman @zanderso @godofredoc

Activity

  1. keyonghan commented on Feb 15, 2022

    @keyonghan
    ContributorAuthor

    @blasten Is this something android team will help create, the cipd package? This is blocking the tests migration to M1 hosts.

  2. keyonghan commented on Feb 15, 2022

    @keyonghan
    ContributorAuthor

    @blasten Is this something android team will help create, the cipd package? This is blocking the tests migration to M1 hosts.

    Nvm, assigning. to myself for an ARM version creation.

  3. self-assigned this
    on Feb 15, 2022
  4. jmagman commented on Feb 15, 2022

    @jmagman
    Member

    @keyonghan in the meantime you could remove android_sdk and open_jdk and leave off build_aar_module_test from the M1 tests (the rest are iOS or macOS) https://flutter-review.googlesource.com/c/infra/+/27060.

    Obviously we'd like to test building Android on M1 but it may not be worth blocking test coverage of native macOS desktop #60118. Up to you though.

  5. keyonghan commented on Feb 15, 2022

    @keyonghan
    ContributorAuthor
  6. keyonghan commented on Feb 18, 2022

    @keyonghan
    ContributorAuthor

    Thanks @GaryQian for uploading the arm64 version, and it passed the dependency step! But seems we has some failure, maybe related to some packages in this version?
    build: https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/keyonghan_google.com/96fd7247e50ce3d92fad4cce8a7e881c986b12aafe2299687461f215bf87dc1d/+/build.proto

    [build_aar_module_test] [STDOUT] stdout: [  +10 ms] Generating /opt/s/w/ir/x/t/flutter_module_test.IsMrE8/hello/.android/Flutter/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
    [build_aar_module_test] [STDOUT] stdout: [  +16 ms] 💪 Building with sound null safety 💪
    [build_aar_module_test] [STDOUT] stdout: [   +2 ms] Running Gradle task 'assembleAarDebug'...
    [build_aar_module_test] [STDOUT] stdout: [   +1 ms] Using gradle from /opt/s/w/ir/x/t/flutter_module_test.IsMrE8/hello/.android/gradlew.
    [build_aar_module_test] [STDOUT] stdout: [  +30 ms] executing: [/opt/s/w/ir/x/t/flutter_module_test.IsMrE8/hello/.android/] /opt/s/w/ir/x/t/flutter_module_test.IsMrE8/hello/.android/gradlew -I=/opt/s/w/ir/x/w/recipe_cleanup/tmp3mfu9y46/flutter sdk/packages/flutter_tools/gradle/aar_init_script.gradle -Pflutter-root=/opt/s/w/ir/x/w/recipe_cleanup/tmp3mfu9y46/flutter sdk -Poutput-dir=/opt/s/w/ir/x/t/flutter_module_test.IsMrE8/hello/build/host -Pis-plugin=false -PbuildNumber=1.0 -Pverbose=true -Ptarget=lib/main.dart -Pdart-obfuscation=false -Ptrack-widget-creation=true -Ptree-shake-icons=false -Ptarget-platform=android-arm,android-arm64,android-x64 assembleAarDebug
    [build_aar_module_test] [STDOUT] stdout: [  +72 ms] The operation couldn’t be completed. Unable to locate a Java Runtime.
    [build_aar_module_test] [STDOUT] stdout:            Please visit http://www.java.com/ for information on installing Java.
    [build_aar_module_test] [STDOUT] stdout: [        ] Running Gradle task 'assembleAarDebug'... (completed in 103ms)
    [build_aar_module_test] [STDOUT] stderr: [        ] The operation couldn’t be completed. Unable to locate a Java Runtime.
    [build_aar_module_test] [STDOUT] stderr:            Please visit http://www.java.com/ for information on installing Java.
    [build_aar_module_test] [STDOUT] stderr: 
    [build_aar_module_test] [STDOUT] stderr: 
    [build_aar_module_test] [STDOUT] stdout: [   +1 ms] "flutter aar" took 480ms.
    [build_aar_module_test] [STDOUT] stderr: [   +1 ms] Gradle task assembleAarDebug failed with exit code 1.
    [build_aar_module_test] [STDOUT] stderr: [        ] 
    [build_aar_module_test] [STDOUT] stderr:            #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
    [build_aar_module_test] [STDOUT] stderr:            #1      AndroidGradleBuilder.buildGradleAar (package:flutter_tools/src/android/gradle.dart:670:7)
    [build_aar_module_test] [STDOUT] stderr:            <asynchronous suspension>
    [build_aar_module_test] [STDOUT] stderr:            #2      AndroidGradleBuilder.buildAar (package:flutter_tools/src/android/gradle.dart:156:7)
    [build_aar_module_test] [STDOUT] stderr:            <asynchronous suspension>
    [build_aar_module_test] [STDOUT] stderr:            #3      BuildAarCommand.runCommand (package:flutter_tools/src/commands/build_aar.dart:141:5)
    [build_aar_module_test] [STDOUT] stderr:            <asynchronous suspension>
    [build_aar_module_test] [STDOUT] stderr:            #4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1165:27)
    [build_aar_module_test] [STDOUT] stderr:            <asynchronous suspension>
    [build_aar_module_test] [STDOUT] stderr:            #5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
    
  7. keyonghan commented on Feb 18, 2022

    @keyonghan
    ContributorAuthor

    Seems we are still missing openjdk package (thanks @GaryQian for pointing this out). We need a mac-arm64 version as well.

  8. keyonghan commented on Mar 22, 2022

    @keyonghan
    ContributorAuthor

    Tried a couple of things, but still no luck.

    1. use same mac-amd64 version (simply changed config to mac-arm64), hit (build)
    /opt/s/w/ir/x/t/flutter_module_test.whMHhq/hello/.android/gradlew: line 160: /opt/s/w/ir/cache/java/contents/Home/bin/java: Bad CPU type in executable
    
    1. use latest java17 (arm64), hit (build)
     FAILURE: Build failed with an exception.
    [build_aar_module_test] [STDOUT] stdout: 
    [build_aar_module_test] [STDOUT] stdout:            * Where:
    [build_aar_module_test] [STDOUT] stdout:            Settings file '/opt/s/w/ir/x/t/flutter_module_test.hSfWTX/hello/.android/settings.gradle' line: 6
    [build_aar_module_test] [STDOUT] stdout: 
    [build_aar_module_test] [STDOUT] stdout:            * What went wrong:
    [build_aar_module_test] [STDOUT] stdout:            A problem occurred evaluating settings 'android_generated'.
    [build_aar_module_test] [STDOUT] stdout:            > BUG! exception in phase 'semantic analysis' in source unit '/opt/s/w/ir/x/t/flutter_module_test.hSfWTX/hello/.android/include_flutter.groovy' Unsupported class file major version 61
    [build_aar_module_test] [STDOUT] stdout: 
    

    Based on https://stackoverflow.com/questions/68597899/bug-exception-in-phase-semantic-analysis-in-source-unit-buildscript-unsup, seems the latest version is not supported yet.

    1. use java11 (arm64) from Azul (oracle doesn't have an arm64 version for java11), hit (build)
    Target android_aot_profile_android-arm failed: ProcessException: Bad CPU type in executable
    
  9. changed the title [-]M1 tests failed with `failed to resolve flutter_internal/android/sdk/mac-arm64@version:29.0`[/-] [+]M1 android tests failed due to unsupported arm64 `android sdk` and `java` cipd packages[/+] on Mar 22, 2022
  10. keyonghan commented on Mar 22, 2022

    @keyonghan
    ContributorAuthor

    @blasten @GaryQian Do you have any insight re the above error in bullet 3?

  11. github-actions commented on May 2, 2022

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

team-infraOwned by Infrastructure team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions