Skip to content

flutter run failed due to 'Permission denied' when replacing signature of 'Flutter.framework' #40146

@yrom

Description

@yrom

Steps to Reproduce

  1. Upgrade flutter to 1.9.1+hotfix.2
  2. Run flutter create -t module --org com.test test1
  3. Enter the test1 project: cd test1
  4. Start the ios simulator
  5. Run flutter run, everything works fun at this time.
  6. Add the plugin device_info in pubspec.yaml:
dependencies:
  device_info: ^0.4.0
  1. Run flutter packages get
  2. Run flutter run... failed!

Or clone the test project: https://github.com/yrom/test1

  1. git clone https://github.com/yrom/test1.git
  2. cd test1
  3. flutter packages get
  4. flutter run

Logs

Launching lib/main.dart on iPhone Xʀ in debug mode...
Running pod install...                                              0.9s
Running Xcode build...                                                  
 ├─Assembling Flutter resources...                           5.3s
 └─Compiling, linking and signing...                         2.3s
Xcode build done.                                            9.1s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    mkdir -p /Users/yrom/Downloads/test1/build/ios/Debug-iphonesimulator/Runner.app/Frameworks
    rsync --delete -av --filter P .*.?????? --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter
    "- Modules" "/Users/yrom/Downloads/test1/.ios/Pods/../Flutter/engine/Flutter.framework"
    "/Users/yrom/Downloads/test1/build/ios/Debug-iphonesimulator/Runner.app/Frameworks"
    building file list ... done
    Flutter.framework/
    Flutter.framework/Flutter
    Flutter.framework/Info.plist
    Flutter.framework/icudtl.dat
    Flutter.framework/_CodeSignature/
    Flutter.framework/_CodeSignature/CodeResources

    sent 94440045 bytes  received 120 bytes  62960110.00 bytes/sec
    total size is 94428117  speedup is 1.00
    Stripped /Users/yrom/Downloads/test1/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework/Flutter of architectures: armv7 arm64
    Code Signing /Users/yrom/Downloads/test1/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework with Identity -
    /usr/bin/codesign --force --sign -  --preserve-metadata=identifier,entitlements
    '/Users/yrom/Downloads/test1/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
    /Users/yrom/Downloads/test1/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework: replacing existing signature
    /Users/yrom/Downloads/test1/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework: Permission denied
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build systemnote: Planning buildnote: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone Xʀ.

Check out the full verbose log file: https://raw.githubusercontent.com/yrom/test1/master/1.log

Flutter doctor:

[✓] Flutter (Channel stable, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G87, locale zh-Hans-CN)
    • Flutter version 1.9.1+hotfix.2 at /Users/yrom/Library/flutter
    • Framework revision 2d2a1ffec9 (3 days ago), 2019-09-06 18:39:49 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.3, Build version 10G8
    • CocoaPods version 1.7.4

...

[✓] Connected device (1 available)
    • iPhone Xʀ • 00D207ED-8863-48FA-ACE7-061D13525B03 • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)

Metadata

Metadata

Assignees

No one assigned

    Labels

    t: xcode"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions