Skip to content

Release fails to codesign new binaries #188075

Description

@vashworth

https://ci.chromium.org/ui/p/dart-internal/builders/flutter/Mac%20Production%20Engine%20Drone/28563/overview

[SEVERE] codesign: The binary file analysis_server_aot.dart.snapshot is causing an issue. 
This file is located at dart-sdk/bin/snapshots/analysis_server_aot.dart.snapshot in the flutter engine artifact.
[SEVERE] codesign: The system has detected a binary file at dart-sdk/bin/snapshots/analysis_server_aot.dart.snapshot. But it is not in the codesigning configuration files you provided. If this is a new engine artifact, please add it to one of the codesigning config files.
Unhandled exception:
Exception: Codesign test failed.

We compared binary files in engine artifacts with those listed in
* entitlements.txt
* without_entitlements.txt
* unsigned_binaries.txt
and the binary files do not match.

These are the configuration files encoded in engine artifact zip that detail
the code-signing requirements of each of the binaries in the archive.
Either an unexpected binary was listed in these files, or one of the expected
binaries listed in these files was not found in the archive.

This usually happens during an engine roll.

If this is a valid change, then the BUILD.gn or the codesigning configuration
files need to be changed. Binaries that will run on a macOS host require
entitlements, and binaries that run on an iOS device must NOT have entitlements.
For example, if this is a new binary that runs on macOS host, add it
to entitlements.txt file inside the zip artifact produced by BUILD.gn.
If this is a new binary that needs to be run on iOS device, add it to
without_entitlements.txt. If there are obsolete binaries in entitlements
configuration files, please delete or update these file paths accordingly.
[SEVERE] codesign: The binary file frontend_server_aot.dart.snapshot is causing an issue. 
This file is located at frontend_server_aot.dart.snapshot in the flutter engine artifact.
[SEVERE] codesign: The system has detected a binary file at frontend_server_aot.dart.snapshot. But it is not in the codesigning configuration files you provided. If this is a new engine artifact, please add it to one of the codesigning config files.
...

I believe this is caused by #186754, which added new binaries.

However, the entitlement file was not updated.

I think the dart-sdk ones need to be added here:

generated_file("dart_sdk_entitlement_config") {
outputs = [ "$target_gen_dir/dart_sdk_entitlements.txt" ]
# Dart SDK is a prebuilt archive. The rule for building
# Dart SDK is https://github.com/flutter/flutter/blob/main/engine/src/flutter/BUILD.gn#L61
contents = [
"dart-sdk/bin/dart",
"dart-sdk/bin/dartaotruntime",
"dart-sdk/bin/dartvm",
"dart-sdk/bin/utils/gen_snapshot",
"dart-sdk/bin/utils/wasm-opt",
]
deps = []
}

The frontend_server_aot.dart.snapshot, may need to do something like this:

metadata = {
entitlement_file_path = [ "flutter_tester" ]
}

I'm not 100% sure on how this all works

Metadata

Metadata

Labels

P0Critical issues such as a build break or regressionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions