Repository navigation
Codesigning failing for 3.27 beta #157016
Copy link
Copy link
Closed
Description
[INFO] codesign: Executing: /usr/bin/codesign --keychain build.keychain -f -s Developer ID Application: FLUTTER.IO LLC (S8QB4VV633) /Volumes/Work/s/w/ir/x/t/conductor_codesignBmgvmt/single_artifact/FlutterMacOS.xcframework/macos-arm64_x86_64/FlutterMacOS.framework --timestamp --options=runtime
Unhandled exception:
Exception: Failed to codesign binary or bundle at /Volumes/Work/s/w/ir/x/t/conductor_codesignBmgvmt/single_artifact/FlutterMacOS.xcframework/macos-arm64_x86_64/FlutterMacOS.framework with args: /usr/bin/codesign --keychain build.keychain -f -s Developer ID Application: FLUTTER.IO LLC (S8QB4VV633) /Volumes/Work/s/w/ir/x/t/conductor_codesignBmgvmt/single_artifact/FlutterMacOS.xcframework/macos-arm64_x86_64/FlutterMacOS.framework --timestamp --options=runtime
stdout:
stderr:
/Volumes/Work/s/w/ir/x/t/conductor_codesignBmgvmt/single_artifact/FlutterMacOS.xcframework/macos-arm64_x86_64/FlutterMacOS.framework: replacing existing signature
/Volumes/Work/s/w/ir/x/t/conductor_codesignBmgvmt/single_artifact/FlutterMacOS.xcframework/macos-arm64_x86_64/FlutterMacOS.framework: unsealed contents present in the root directory of an embedded framework
#0 FileCodesignVisitor.codesignAtPath.<anonymous closure> (package:codesign/src/file_codesign_visitor.dart:388)
<asynchronous suspension>
#1 RetryOptions.retry (package:retry/retry.dart:131)
<asynchronous suspension>
#2 FileCodesignVisitor.codesignAtPath (package:codesign/src/file_codesign_visitor.dart:381)
<asynchronous suspension>
#3 FileCodesignVisitor.visitDirectory (package:codesign/src/file_codesign_visitor.dart:289)
<asynchronous suspension>
#4 FileCodesignVisitor.visitDirectory (package:codesign/src/file_codesign_visitor.dart:264)
<asynchronous suspension>
#5 FileCodesignVisitor.visitDirectory (package:codesign/src/file_codesign_visitor.dart:264)
<asynchronous suspension>
#6 FileCodesignVisitor.visitDirectory (package:codesign/src/file_codesign_visitor.dart:264)
<asynchronous suspension>
#7 FileCodesignVisitor.processRemoteZip (package:codesign/src/file_codesign_visitor.dart:221)
<asynchronous suspension>
#8 FileCodesignVisitor.validateAll (package:codesign/src/file_codesign_visitor.dart:182)
<asynchronous suspension>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
christopherfujino commentedon Oct 16, 2024
Per https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG312:
cbracken commentedon Oct 16, 2024
Would be great if they told us what that content was -- is there a zip I can download to take a look?
christopherfujino commentedon Oct 16, 2024
I will work on trying to get you a zipped bundle
christopherfujino commentedon Oct 16, 2024
This should upload logs once codesiging fails: https://flutter-review.googlesource.com/c/recipes/+/60420
christopherfujino commentedon Oct 16, 2024
Ok, we have new release builds that we expect to fail again, but to upload the offending zipped archives: https://ci.chromium.org/ui/p/dart-internal/builders/flutter/Mac%20engine_release_builder/713/overview
christopherfujino commentedon Oct 17, 2024
Ok, it looks like the cause of codesigning failing is that there are unexpected .DS_Store files in the zip.
christopherfujino commentedon Oct 17, 2024
This is out to address: flutter/cocoon#3955
//cipd_packages/codesign delete any .DS_Store files in archives (#3955)
christopherfujino commentedon Oct 17, 2024
Ok, we have two new CIPD packages of codesign published:
I now need to move the
liverefchristopherfujino commentedon Oct 17, 2024
The first time I updated the
liveref, I executed:This time, it will be:
They both succeeded:
christopherfujino commentedon Oct 17, 2024
New build used the new codesign app, but appeared to fail exactly the same.
jmagman commentedon Oct 17, 2024
The codesigning build failure is complaining
unsealed contents present in the root directory of an embedded frameworkI bet it's because thePrivacyInfo.xcprivacyfile needs to be in theResourcesdirectory on macOS (a different spot than iOS) flutter-team-archive/engine#55078I made a new macOS framework project, added an App Privacy file, and the copy step puts it in
TestFramework.framework/Versions/A/Resources:cbracken commentedon Oct 18, 2024
Ugh yeah that's what I was initially wondering when I noticed it in the dump in the logs, since it's the only new file we've embedded in there since the last release and it is at the root. That said, the .DS_Store thing seemed a bit more promising at the time based on StackOverflow, and on the assumption that Apple's code-signing tools would know about privacy manifests. Sounds like that was probably a bad assumption though.
jmagman commentedon Oct 18, 2024
The beta fix is at flutter-team-archive/engine#55938. The beta framework test #157136 should be merged first.
1 remaining item
Beta fix macos xcprivacy manifest copy location (#55938)
Beta test alternate correct macOS framework xcprivacy manifest locati…
christopherfujino commentedon Oct 18, 2024
It actually doesn't matter, I merged both.
christopherfujino commentedon Oct 18, 2024
I believe this is resolved since the engine builds succeeded. I'll leave this open until we roll it to the framework and the updated test passes.
jmagman commentedon Oct 22, 2024
Cherry-picking back to master so this doesn't regress in the next beta: flutter-team-archive/engine#56010 and #157318
Test alternate correct macOS framework xcprivacy manifest location (#…
Fix macos xcprivacy manifest copy location (#56010)
Beta test alternate correct macOS framework xcprivacy manifest locati…
Test alternate correct macOS framework xcprivacy manifest location (f…
Fix macos xcprivacy manifest copy location (flutter-team-archive/engi…
zhuhaichao518 commentedon Feb 5, 2025
@jmagman You saved my day!
PrivacyInfo.xcprivacyis exactly the file causing the problem in my case.cbracken commentedon Feb 12, 2025
Whoops! Better late than never -- closing!
github-actions commentedon Feb 26, 2025
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 -vand a minimal reproduction of the issue.