Skip to content

flutter make-host-app-editable --ios && flutter build ios-framework crashes, ios/Flutter/AppFrameworkInfo.plist not found #51097

@kikuchy

Description

@kikuchy

Steps to Reproduce

Trying ios-framework build for containing the module project using some plugins by add2app, it will cause crashing during a build process.
We're confusing about it because our team wants to provide a module made of flutter for another team.

  1. Run flutter create -t module module_test && cd module_test.
  2. Run flutter make-host-app-editable to be editable
  3. Add some plugin (not package) like a image_picker
  4. Run flutter build ios-framework and it will crash
Log of `flutter build ios-framework`
$ flutter build ios-framework --output=tmp
The plugin `flutter_plugin_android_lifecycle` is built using an older version of the Android plugin API which assumes that it's running in a full-Flutter environment. It may have
undefined behaviors when Flutter is integrated into an existing app as a module.
The plugin can be updated to the v2 Android Plugin APIs by following https://flutter.dev/go/android-plugin-migration.
Building framework for com.example.moduleTest in debug mode...
 ├─Populating Flutter.framework...                                 239ms
 ├─Add placeholder App.framework for debug...                      233ms

Sending crash report to Google.
Crash report sent (report ID: c4441bfbae98f471)
Oops; flutter has exited unexpectedly.
 
Crash report written to /Users/kikuchy/tmp/module_test/flutter_01.log;
please let us know at https://github.com/flutter/flutter/issues.
Content of `flutter_01.log`

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter build ios-framework --output=tmp

exception

FileSystemException: FileSystemException: Cannot open file, path = '/Users/kikuchy/tmp/module_test/ios/Flutter/AppFrameworkInfo.plist' (OS Error: No such file or directory, errno = 2)

#0      _File.throwIfError (dart:io/file_impl.dart:645:7)
#1      _File.openSync (dart:io/file_impl.dart:489:5)
#2      _File.readAsBytesSync (dart:io/file_impl.dart:549:18)
#3      ForwardingFile.readAsBytesSync (package:file/src/forwarding/forwarding_file.dart:95:62)
#4      BuildIOSFrameworkCommand._produceAppFramework (package:flutter_tools/src/commands/build_ios_framework.dart:274:59)
<asynchronous suspension>
#5      BuildIOSFrameworkCommand.runCommand (package:flutter_tools/src/commands/build_ios_framework.dart:170:13)
<asynchronous suspension>
#6      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:615:18)
#7      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:73:64)
#8      _rootRunUnary (dart:async/zone.dart:1134:38)
#9      _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#10     _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#11     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#12     Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#13     Future._completeWithValue (dart:async/future_impl.dart:524:5)
#14     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:554:7)
#15     _rootRun (dart:async/zone.dart:1126:13)
#16     _CustomZone.run (dart:async/zone.dart:1023:19)
#17     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#18     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#19     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#20     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#21     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#22     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:175:5)

flutter doctor

�[32m[✓]�[39m Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.3 19D76, locale ja-JP)
    �[32m•�[39m Flutter version 1.12.13+hotfix.8 at /Users/kikuchy/SDK/flutter
    �[32m•�[39m Framework revision 0b8abb4724 (8 days ago), 2020-02-11 11:44:36 -0800
    �[32m•�[39m Engine revision e1e6ced81d
    �[32m•�[39m Dart version 2.7.0

�[32m[✓]�[39m Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    �[32m•�[39m Android SDK at /Users/kikuchy/Library/Android/sdk
    �[32m•�[39m Android NDK location not configured (optional; useful for native profiling support)
    �[32m•�[39m Platform android-29, build-tools 29.0.2
    �[32m•�[39m Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    �[32m•�[39m All Android licenses accepted.

�[32m[✓]�[39m Xcode - develop for iOS and macOS (Xcode 11.3)
    �[32m•�[39m Xcode at /Applications/Xcode.app/Contents/Developer
    �[32m•�[39m Xcode 11.3, Build version 11C29
    �[32m•�[39m CocoaPods version 1.8.4

�[32m[✓]�[39m Android Studio (version 3.5)
    �[32m•�[39m Android Studio at /Applications/Android Studio.app/Contents
    �[32m•�[39m Flutter plugin version 40.2.2
    �[32m•�[39m Dart plugin version 191.8593
    �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

�[32m[✓]�[39m IntelliJ IDEA Ultimate Edition (version 2019.3.3)
    �[32m•�[39m IntelliJ at /Applications/IntelliJ IDEA.app
    �[32m•�[39m Flutter plugin version 43.0.3
    �[32m•�[39m Dart plugin version 193.6494.35

�[32m[✓]�[39m IntelliJ IDEA Community Edition (version 2019.2.3)
    �[32m•�[39m IntelliJ at /Applications/IntelliJ IDEA CE.app
    �[32m•�[39m Flutter plugin version 40.2.4
    �[32m•�[39m Dart plugin version 192.7402

�[33m[!]�[39m VS Code (version 1.42.1)
    �[32m•�[39m VS Code at /Applications/Visual Studio Code.app/Contents
    �[31m✗�[39m Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

�[32m[✓]�[39m Connected device (3 available)
    �[32m•�[39m Pixel 3           • 8CDX1MTHU                            • android-arm64 • Android 10 (API 29)
    �[32m•�[39m iPhone Xʀ         • 7A8FDDD0-B430-46E0-B520-96CF2630B7E5 • ios           • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
    �[32m•�[39m iPhone 11 Pro Max • 1F4FCAF3-8258-46DD-BAAD-E6B9D03F12FE • ios           • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)

�[33m!�[39m Doctor found issues in 1 category.
Content of `pubspec.yaml`
name: module_test
description: A new flutter module project.

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
#
# This version is used _only_ for the Runner app, which is used if you just do
# a `flutter run` or a `flutter make-host-app-editable`. It has no impact
# on any other native host app that you embed your Flutter project into.
version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2

  image_picker: ^0.6.3+1

dev_dependencies:
  flutter_test:
    sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

flutter:
  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add Flutter specific assets to your application, add an assets section, 
  # like this:
  # assets:
  #  - images/a_dot_burr.jpeg
  #  - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add Flutter specific custom fonts to your application, add a fonts
  # section here, in this "flutter" section. Each entry in this list should
  # have a "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages


  # This section identifies your Flutter project as a module meant for
  # embedding in a native host app.  These identifiers should _not_ ordinarily
  # be changed after generation - they are used to ensure that the tooling can
  # maintain consistency when adding or modifying assets and plugins.
  # They also do not have any bearing on your native host application's
  # identifiers, which may be completely independent or the same as these.
  module:
    androidX: true
    androidPackage: com.example.module_test
    iosBundleIdentifier: com.example.moduleTest

Log of `flutter doctor -v`
$ flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.3 19D76, locale ja-JP)
    • Flutter version 1.12.13+hotfix.8 at /Users/kikuchy/SDK/flutter
    • Framework revision 0b8abb4724 (8 days ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/kikuchy/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3, Build version 11C29
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.2.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 43.0.3
    • Dart plugin version 193.6494.35

[✓] IntelliJ IDEA Community Edition (version 2019.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 40.2.4
    • Dart plugin version 192.7402

[!] VS Code (version 1.42.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • Pixel 3           • 8CDX1MTHU                            • android-arm64 • Android 10 (API 29)
    • iPhone Xʀ         • 7A8FDDD0-B430-46E0-B520-96CF2630B7E5 • ios           • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
    • iPhone 11 Pro Max • 1F4FCAF3-8258-46DD-BAAD-E6B9D03F12FE • ios           • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flowc: crashStack traces logged to the consoleplatform-iosiOS applications specificallyt: 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