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

M1 staging tests fail with code signing error #100639

Closed
keyonghan opened this issue Mar 23, 2022 · 10 comments
Closed

M1 staging tests fail with code signing error #100639

keyonghan opened this issue Mar 23, 2022 · 10 comments
Labels
platform-mac Building on or for macOS specifically team-infra Owned by Infrastructure team

Comments

@keyonghan
Copy link
Contributor

Part of #87508

These builders are newly enabled on M1 bots, but hit code signing error (though no ios device is needed):

Mac_arm64_staging flutter_gallery_ios__compile
Mac_arm64_staging hello_world_ios__compile
Mac_arm64_staging native_ui_tests_ios
Mac_arm64_staging module_test_ios
Mac_arm64_staging ios_content_validation_test
Mac_arm64_staging ios_app_with_extensions_test

Example:

[flutter_gallery_ios__compile] [STDOUT] stderr: Or run on an iOS simulator without code signing
[flutter_gallery_ios__compile] [STDOUT] stderr: ════════════════════════════════════════════════════════════════════════════════
[flutter_gallery_ios__compile] [STDOUT] stderr: No development certificates available to code sign app for device deployment
@keyonghan
Copy link
Contributor Author

All these are host only tests, and are not expected for code signing. Shall we skip code signing for all of them @jmagman

@jmagman
Copy link
Member

jmagman commented Mar 23, 2022

It's still signing the apps even though it's not deploying them to any devices. Can we enable code-signing on these machines to test that it successfully works on M1?

@darshankawar darshankawar added in triage Presently being triaged by the triage team arch: m1 team-infra Owned by Infrastructure team and removed in triage Presently being triaged by the triage team labels Mar 24, 2022
@keyonghan
Copy link
Contributor Author

Five of those tests (intel prod) are running against a devicelab bot which support code-signing. Here they are running in host-only mode, and these bots are controlled by chromium team. I am not sure if there is an easy way to enable code-signing there. /cc @godofredoc

As for Mac_arm64_staging module_test_ios, it runs in host only mode now in intel prod bot, which does not support codesigning neither. However it passes: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20module_test_ios/5530/overview. Here is the error message from M1 bot side:

[module_test_ios] [STDOUT] stdout: Failed to build iOS app
[module_test_ios] [STDOUT] stdout: Error output from Xcode build:
[module_test_ios] [STDOUT] stdout: ↳
[module_test_ios] [STDOUT] stdout:     2022-03-24 12:31:33.043 xcodebuild[7531:62156] [MT] DVTSDK: Skipped SDK /opt/s/w/ir/cache/osx_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk; its version (10.15.6) is below required minimum (11.0) for the macosx platform.
[module_test_ios] [STDOUT] stdout:     2022-03-24 12:31:33.043 xcodebuild[7531:62156] [MT] DVTSDK: Skipped SDK /opt/s/w/ir/cache/osx_sdk/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk; its version (13.6) is below required minimum (15.0) for the iphonesimulator platform.
[module_test_ios] [STDOUT] stdout:     2022-03-24 12:31:33.044 xcodebuild[7531:62156] [MT] DVTSDK: Skipped SDK /opt/s/w/ir/cache/osx_sdk/XCode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.0.sdk; its version (14.0) is below required minimum (15.0) for the iphonesimulator platform.
[module_test_ios] [STDOUT] stdout:     2022-03-24 12:31:33.044 xcodebuild[7531:62156] [MT] DVTSDK: Skipped SDK /opt/s/w/ir/cache/osx_sdk/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk; its version (13.6) is below required minimum (15.0) for the iphoneos platform.
[module_test_ios] [STDOUT] stdout:     2022-03-24 12:31:33.044 xcodebuild[7531:62156] [MT] DVTSDK: Skipped SDK /opt/s/w/ir/cache/osx_sdk/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk; its version (14.0) is below required minimum (15.0) for the iphoneos platform.
[module_test_ios] [STDOUT] stdout:     ** BUILD FAILED **
[module_test_ios] [STDOUT] stdout: 
[module_test_ios] [STDOUT] stdout: 
[module_test_ios] [STDOUT] stdout: Xcode's output:
[module_test_ios] [STDOUT] stdout: ↳
[module_test_ios] [STDOUT] stdout:     Writing result bundle at path:
[module_test_ios] [STDOUT] stdout:     	/opt/s/w/ir/x/t/flutter_tools.OjcuTv/flutter_ios_build_temp_dir7nGsIp/temporary_xcresult_bundle
[module_test_ios] [STDOUT] stdout: 
[module_test_ios] [STDOUT] stdout: 
[module_test_ios] [STDOUT] stdout:     Failed to package /opt/s/w/ir/x/t/flutter_module_test.pOgjhl/hello.
[module_test_ios] [STDOUT] stdout:     Command PhaseScriptExecution failed with a nonzero exit code
[module_test_ios] [STDOUT] stdout:     note: Using new build system
[module_test_ios] [STDOUT] stdout:     note: Planning
[module_test_ios] [STDOUT] stdout:     note: Build preparation complete
[module_test_ios] [STDOUT] stdout:     note: Building targets in parallel
[module_test_ios] [STDOUT] stdout: 
[module_test_ios] [STDOUT] stdout:     Result bundle written to path:
[module_test_ios] [STDOUT] stdout:     	/opt/s/w/ir/x/t/flutter_tools.OjcuTv/flutter_ios_build_temp_dir7nGsIp/temporary_xcresult_bundle

@jmagman
Copy link
Member

jmagman commented Mar 24, 2022

The compilation error isn't actually printing. Filed #100723.

@jmagman
Copy link
Member

jmagman commented Mar 24, 2022

Run test verbosely to see what the compilation error actually is: #100724

@jmagman
Copy link
Member

jmagman commented Mar 24, 2022

flutter build ios --release definitely needs a cert unless there's a --no-codesign flag. For example flutter_gallery_ios__compile does seem to be successfully codesigning on the intel machine:

Which @keyonghan already said!

Five of those tests (intel prod) are running against a devicelab bot which support code-signing. Here they are running in host-only mode, and these bots are controlled by chromium team. I am not sure if there is an easy way to enable code-signing there. /cc @godofredoc

@keyonghan
Copy link
Contributor Author

Ran these tests in devicelab M1 bots with code signing, here are the brief summary:

Succeeded!
Mac_arm64_staging ios_app_with_extensions_test

Hit same issue as module_test_ios above:
Mac_arm64_staging flutter_gallery_ios__compile
Mac_arm64_staging hello_world_ios__compile
Mac_arm64_staging ios_content_validation_test

Testing failure:
Mac_arm64_staging native_ui_tests_ios

 *** If you believe this error represents a bug, please attach the result bundle at /opt/s/w/ir/x/t/flutter_xcresult
[native_ui_tests_macos] [STDOUT] stdout: 
[native_ui_tests_macos] [STDOUT] stderr: 2022-03-24 18:04:23.590 xcodebuild[7114:32508] [MT] IDETestOperationsObserverDebug: 0.011 elapsed -- Testing started completed.
[native_ui_tests_macos] [STDOUT] stderr: 2022-03-24 18:04:23.590 xcodebuild[7114:32508] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
[native_ui_tests_macos] [STDOUT] stderr: 2022-03-24 18:04:23.590 xcodebuild[7114:32508] [MT] IDETestOperationsObserverDebug: 0.011 sec, +0.011 sec -- end
[native_ui_tests_macos] [STDOUT] stdout: 
[native_ui_tests_macos] [STDOUT] stdout: Test session results, code coverage, and logs:
[native_ui_tests_macos] [STDOUT] stdout: 	/opt/s/w/ir/x/t/flutter_xcresult.ahYCyn/result
[native_ui_tests_macos] [STDOUT] stdout: 
[native_ui_tests_macos] [STDOUT] stderr: Testing failed:
[native_ui_tests_macos] [STDOUT] stderr: 	RunnerTests:
[native_ui_tests_macos] [STDOUT] stderr: 		The test runner encountered an error (Failed to establish communication with the test runner. If you believe this error represents a bug, please attach the result bundle at /opt/s/w/ir/x/t/flutter_xcresult. (Underlying Error: Couldn’t communicate with a helper application. Try your operation again. If that fails, quit and relaunch the application and try again. The connection to service named com.apple.testmanagerd.control was invalidated: failed at lookup with error 3 - No such process.))
[native_ui_tests_macos] [STDOUT] stderr: 
[native_ui_tests_macos] [STDOUT] stderr: ** TEST FAILED **
[native_ui_tests_macos] [STDOUT] stderr: 
[native_ui_tests_macos] [STDOUT] stdout: Testing started

@jmagman
Copy link
Member

jmagman commented Mar 28, 2022

Run test verbosely to see what the compilation error actually is: #100724

Target aot_assembly_release failed: ProcessException: Bad CPU type in executable

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8818412221879492849/+/u/run_module_test_ios/test_stdout

Looks the same as #100637

@jmagman
Copy link
Member

jmagman commented Apr 8, 2022

@keyonghan I think you already fixed this by installing Rosetta, can this be closed?

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2022
@Hixie Hixie added the platform-mac Building on or for macOS specifically label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform-mac Building on or for macOS specifically team-infra Owned by Infrastructure team
Projects
None yet
Development

No branches or pull requests

4 participants