flutter / flutter/flutter

Add more diagnostics to "Failed to codesign" message.

Open
#162,736 2 comments 0 reactions 0 assignees View on GitHub
a: build c: proposal fyi-tool P2 platform-ios team-ios tool triaged-ios
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

### Use case

On iOS builds, `codesign` can fail for numerous reasons, but flutter's error message omits the important details that indicate the reason. From flutter_tools/lib/src/build_system/targets/ios.dart:

```dart
final String stdout = (result.stdout as String).trim();
final String stderr = (result.stderr as String).trim();
final StringBuffer output = StringBuffer();
output.writeln('Failed to codesign ${binary.path} with identity $codesignIdentity.');
if (stdout.isNotEmpty) {
output.writeln(stdout);
}
if (stderr.isNotEmpty) {
output.writeln(stderr);
}
throw Exception(output.toString());
```

What I'm finding is that only the first line appears in the flutter output. When I run `flutter -v`, I can see all 3 lines of output, but I have to scroll back 12,000 lines to see it.

### Proposal

It would be useful if flutter outputted the full error message without requiring the verbose option.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.