Closed
Description
crash is run on the Device, but it is normal on the simulator,It is normal before upgrading MacOS.
current version:Swift version:5.5.1,xcode version:13.1,flutter version:2.5.3
crash:
Referenced from: /private/var/containers/Bundle/Application/8699A097-28EB-4B42-8566-994E5EC45F52/ceshiss.app/ceshiss
Reason: image not found
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
mamuseferha commentedon Nov 2, 2021
Hi @yanwei49
Can you please provide your
flutter doctor -v
and a minimal complete reproducible code sample?Thank you
yanwei49 commentedon Nov 2, 2021
flutter doctor -v:
yanwei49 commentedon Nov 2, 2021
https://stackoverflow.com/questions/69808637/dyld-library-not-loaded-rpath-app-framework-app-in-xcode13-1
geGao123 commentedon Nov 2, 2021
I have similar situation.
current version: xcode version:13.1, flutter version:2.6.0-12.0.pre.554, macOS 12.0.1
when i create a new ios project(swift),and add flutter module.run on the device and get this
crash:
flutter doctor -v:
maheshj01 commentedon Nov 3, 2021
@yanwei49 are you trying to add flutter to an existing ios app? if yes can you please refer the add to app docs and share which option are you using Option A, B or C?
Thanks
maheshj01 commentedon Nov 3, 2021
@geGao123 The error you are hitting seems different than the one reported here, I would advise you to please file a separate issue by filling in the details requested in the issue template.
Thanks
yanwei49 commentedon Nov 3, 2021
I use A,It is normal before upgrading the macOS system and xcode.
Aflysun commentedon Nov 3, 2021
I had the same problem, also use A ,😭
[-]Instant crash on MacOS12.0.1 xcode13.1 Library not loaded: @rpath/App.framework/App[/-][+][Add2App IOS] Instant crash on MacOS12.0.1 xcode13.1 Library not loaded: @rpath/App.framework/App[/+]maheshj01 commentedon Nov 3, 2021
@yanwei49 @Aflysun I tried running this add to app sample and it's working fine for me on macOS 12.0.1 with xcode 13, so this is likely not an issue with macOS version or Xcode version, Can you please share a complete project for us to have a look.
flutter doctor -v
Thanks
24 remaining items
WeMadeCode commentedon Nov 8, 2021
I have try to the macOS big Sur 11.3.1 + Xcode 13.1 and it's OK。But crashed in macOS Monterey 12.0.1 + Xcode 13.1. I suspect it has something to do with the system
WeMadeCode commentedon Nov 8, 2021
@maheshmnj Why don't you try it on macOS Monterey 12.0.1
maheshj01 commentedon Nov 8, 2021
@WeMadeCode I did please check flutter doctor #92896 (comment)
WeMadeCode commentedon Nov 8, 2021
[✓] Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-x64, locale zh-Hans-CN)
• Flutter version 2.5.3 at /Users/xxx/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 1811693 (3 weeks ago), 2021-10-15 10:46:35 -0700
• Engine revision d3ea636dc5
• Dart version 2.14.4
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/xxx/Library/Android/sdk
✗ cmdline-tools component is missing
Run
path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run
flutter doctor --android-licenses
to accept the SDK licenses.See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 13.1, Build version 13A1030d
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] VS Code (version 1.62.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.28.0
[✓] Connected device (2 available)
• iPhone (mobile) • 29a8d86ade875cec173ae3573439551cced781cd • ios • iOS 15.0.2 19A404
• Chrome (web) • chrome • web-javascript • Google Chrome 95.0.4638.69
! Error: iPhone is not connected. Xcode will continue when iPhone is connected. (code -13)
@maheshmnj
yeatse commentedon Nov 12, 2021
Same problem here on macOS 12.0.1 & Xcode 13.1.
After some investigations, I found that when building on macOS Monterey, two new load commands (
LC_DYLD_EXPORTS_TRIE
&LD_DYLD_CHAINED_FIXUPS
) are inserted intoApp.framework
, which makes the old version ofruby-macho
not so happy.Problem disappeared after upgrading
cocoapods
to 1.11.0 andruby-macho
to 2.5.1. See CocoaPods/CocoaPods#10390DayuEJ commentedon Nov 26, 2021
Please try update ruby and Cocoapods to latest version. can fix it. This problem make me feel sick. it wasted my day.......fuck!!!! good luck!!!!
ManuelOrtegaSSU commentedon Nov 29, 2021
This is working for me!! Thank you very much!
iamjjh commentedon Dec 7, 2021
sudo gem update ruby-macho
This is working for me
talzemingo commentedon Dec 14, 2021
Thanks iamjjh
sudo gem update ruby-macho
Works for me also
somepark commentedon Dec 15, 2021
AshineReal commentedon Dec 22, 2021
This is right correctly solution for this problem !!!
AshineReal commentedon Dec 22, 2021
it because , you fix procedure where really error lead to.
let's check right procedure , that should be.
podhelper.rb file which your project's podfile reference .
it insert a build phase (Run Flutter Build xxxx_flutter Script) before compile ,
it run other script which can be found in FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.dart
notice params 'build'
func buildApp() build the app.framework and make it into your_flutter_project/.ios/Flutter directory.
then Embed Pods Frameworks script should embed app.framework which build last step. (which the script is generated by pod install)
final your flutter project is build & embed into your ios host project.
Now error comes from
pod install
, where ruby-macho could not recognize new mach load command . detail see ref:#92896 (comment)so
Pods-xxxx-frameworks
generated with error effectinstall_framework
line , that 's no app.framework path mention on it !!!your fix solution mention the app.framework path , app.framework can be found and embed into your ios host project.
hope it clear to solve your question.
github-actions commentedon Jan 5, 2022
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.