8000 upgrade to 1.20.1 app can not load the flutter module and creates a new folder · Issue #63176 · flutter/flutter · GitHub
[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to 1.20.1 app can not load the flutter module and creates a new folder #63176

Closed
beydeng opened this issue Aug 7, 2020 · 14 comments · Fixed by #63412
Closed

upgrade to 1.20.1 app can not load the flutter module and creates a new folder #63176

beydeng opened this issue Aug 7, 2020 · 14 comments · Fixed by #63412
Labels
a: existing-apps Integration with existing apps via the add-to-app flow c: regression It was better in the past than it is now found in release: 1.20 Found to occur in 1.20 found in release: 1.21 Found to occur in 1.21 has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@beydeng
Copy link
beydeng commented Aug 7, 2020

Flutter 1.20.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2ae3451 (29 hours ago) • 2020-08-05 19:53:19 -0700
Engine • revision c8e3b94853
Tools • Dart 2.9.0

My iOS podfile
flutter_application_path = '../flutter_module'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

# Pods for iOSFlutterHybrid

install_all_flutter_pods(flutter_application_path)

end

as i run pod install,it will create a new folder on my app root;
like this :

flutter_module
Dany/flutter_module/.ios/Flutter/podhelper.rb (the new floder)
myiOS

it seems like my app can not find podhelper.rb in the flutter_module floder,but to the new floder;

how can i solve this problem

@TahaTesser
Copy link
Member

Hi @beydeng
Do you have any custom pods in your podfile i am unable to reproduce the issue, app runs fine
Screenshot 2020-08-07 at 5 22 29 PM

flutter doctor -v
[✓] Flutter (Channel stable, 1.20.1, on Mac OS X 10.15.6 19G73, locale en-GB)
    • Flutter version 1.20.1 at /Users/taha/Code/flutter_stable
    • Framework revision 2ae34518b8 (33 hours ago), 2020-08-05 19:53:19 -0700
    • Engine revision c8e3b94853
    • Dart version 2.9.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at /Users/taha/Code/sdk
    • Platform android-30, build-tools 30.0.1
    • ANDROID_HOME = /Users/taha/Code/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

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

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.47.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.13.2

[✓] Connected device (2 available)
    • Taha’s iPhone (mobile) • 00008020-001059882212002E            • ios • iOS 14.0
    • iPhone 11 (mobile)     • 1EB615AF-5AB9-4AAA-A587-A6642BB79484 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)

• No issues found!


Can you please provide your podfile, your pubspec.yaml a complete reproducible minimal code sample with steps by steps to reproduce
Thank you

@TahaTesser TahaTesser added in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels Aug 7, 2020
@beydeng
Copy link
Author
beydeng commented Aug 10, 2020

@TahaTesser
image

my iOS podfile is

Uncomment this line to define a global platform for your project

flutter_application_path = '../flutter_module/'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

platform :ios,
target "XiaobanParent" do
# Uncomment thisline if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for khb
pod 'SDWebImage', '5.0.0'

pod 'WechatOpenSDK', '1.8.7'
pod 'AFNetworking',  '3.2.0'
pod 'Masonry', '1.1.0'

#pod 'PLMediaStreamingKit' 
pod 'PLPlayerKit' 
pod 'AMap3DMap', '6.6.0'
pod 'AMapSearch', '6.9.0'
pod 'AMapLocation'

pod 'RongCloudIM/IMLib', '2.8.32' 
pod 'RongCloudIM/IMKit', '2.8.32'

pod 'GTSDK', '2.2.0.0'

pod 'SDAutoLayout'
pod 'ReactiveObjC'
pod 'JJException', '0.2.8'
pod 'BAPickView', '1.1.9'
pod 'TZImagePickerController'

pod 'CYLTabBarController', '~> 1.29.0'

pod 'SDCycleScrollView','>= 1.80'

# Pods for iOSFlutterHybrid

install_all_flutter_pods(flutter_application_path)

end

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 10, 2020
@beydeng
Copy link
Author
beydeng commented Aug 10, 2020

I can't find any problem in my app...

@beydeng
Copy link
Author
beydeng commented Aug 10, 2020

image

@beydeng
Copy link
Author
beydeng commented Aug 10, 2020

it seems like the iOS load the flutter engine module to the new floder(User),but i can't find the problem why "pod install" create the new floder(User)
image

@beydeng beydeng changed the title As I upgrade to 1.20.1,my app can not run As I upgrade to 1.20.1,my app can not load the flutter module Aug 10, 2020
@beydeng
Copy link
Author
beydeng commented Aug 10, 2020

As i switch V17.5,it's runs fine.

@TahaTesser
Copy link
Member
TahaTesser commented Aug 10, 2020

I can reproduce this issue, it creates this new folder when running native app with flutter module when using your pod files

Screenshot 2020-08-10 at 5 34 45 PM 1

test_projects.zip

flutter doctor -v
[✓] Flutter (Channel stable, 1.20.1, on Mac OS X 10.15.6 19G73, locale en-GB)
    • Flutter version 1.20.1 at /Users/taha/Code/flutter_stable
    • Framework revision 2ae34518b8 (4 days ago), 2020-08-05 19:53:19 -0700
    • Engine revision c8e3b94853
    • Dart version 2.9.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at /Users/taha/Code/sdk
    • Platform android-30, build-tools 30.0.1
    • ANDROID_HOME = /Users/taha/Code/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Xcode 12.0, Build version 12A8179i
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.47.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.13.2

[✓] Connected device (1 available)
    • SM M305F (mobile) • 32003c30dc19668f • android-arm64 • Android 10 (API 29)

• No issues found!

flutter doctor -v
[✓] Flutter (Channel master, 1.21.0-8.0.pre.122, on Mac OS X 10.15.6 19G73, locale en-GB)
    • Flutter version 1.21.0-8.0.pre.122 at /Users/taha/Code/flutter_master
    • Framework revision 7c6f9dd239 (22 hours ago), 2020-08-09 10:31:03 -0400
    • Engine revision 6d86e67f04
    • Dart version 2.10.0 (build 2.10.0-4.0.dev 0341576448)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at /Users/taha/Code/sdk
    • Platform android-30, build-tools 30.0.1
    • ANDROID_HOME = /Users/taha/Code/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Xcode 12.0, Build version 12A8179i
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.47.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.13.2

[✓] Connected device (5 available)
    • SM M305F (mobile)  • 32003c30dc19668f                     • android-arm64  • Android 10 (API 29)
    • iPhone 11 (mobile) • D872C450-D8D2-4AF7-BFF2-9278640BA1D6 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-0
      (simulator)
    • macOS (desktop)    • macos                                • darwin-x64     • Mac OS X 10.15.6 19G73
    • Web Server (web)   • web-server                           • web-javascript • Flutter Tools
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 84.0.4147.105

• No issues found!

@TahaTesser TahaTesser added a: existing-apps Integration with existing apps via the add-to-app flow engine flutter/engine repository. See also e: labels. found in release: 1.20 Found to occur in 1.20 has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-ios iOS applications specifically c: regression It was better in the past than it is now and removed in triage Presently being triaged by the triage team labels Aug 10, 2020
@TahaTesser TahaTesser changed the title As I upgrade to 1.20.1,my app can not load the flutter module upgrade to 1.20.1 app can not load the flutter module and creates a new folder Aug 10, 2020
@TahaTesser TahaTesser added the found in release: 1.21 Found to occur in 1.21 label Aug 10, 2020
@chinmaygarde chinmaygarde added tool Affects the "flutter" command-line tool. See also t: labels. and removed engine flutter/engine repository. See also e: labels. labels Aug 10, 2020
@chinmaygarde
Copy link
Member

cc @jmagman

@jmagman
Copy link
Member
jmagman commented Aug 12, 2020

I fixed up the App.framework path problem (which #63568 also does) and it still doesn't embed the App.framework into the resulting host app, though it does make the phantom /User/ directory go away. The Flutter script doesn't run any flutter code, it just bails at flutter_export_environment.sh: line 8: inherited: command not found. When I escape the export "OTHER_LDFLAGS=$(inherited) -framework Flutter" parenthesis, it embeds as expected.

@szotp
Copy link
szotp commented Aug 12, 2020

Interesting, for me it would still make App.framework after printing that error:

<my directory>/app/.ios/Flutter/flutter_export_environment.sh: line 8: inherited: command not found
Project<my directory>/app built and packaged successfully.

And the app ran fine, but I'm still using Xcode 11.

@jmagman
Copy link
Member
jmagman commented Aug 12, 2020

@szotp you're right. I updated #63412 to just fix the path issue and make the test more complete. The tests pass, and in my own local test I see the embedded App.framework.

Would you mind reviewing and validating that PR works? I appreciate that you already did #63568, I fixed it in a slightly different way.

@jmagman
Copy link
Member
jmagman commented Aug 12, 2020

The workaround is to use beta. It's only a few commits behind stable. The regression was introduced in #62372.

Screen Shot 2020-08-12 at 9 59 03 AM

@szotp
Copy link
szotp commented Aug 12, 2020

Another workaround: make App.framework manually before running pod install:

app_framework="my_flutter/.ios/Flutter/App.framework"
mkdir $app_framework
echo "static const int Moo = 88;" | xcrun clang -x c -dynamiclib -o "${app_framework}/App" -
cd MyApp
pod install

@github-actions
Copy link

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 -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: existing-apps Integration with existing apps via the add-to-app flow c: regression It was better in the past than it is now found in release: 1.20 Found to occur in 1.20 found in release: 1.21 Found to occur in 1.21 has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
0