Flutter does not work on my iOS device (iPhone X).
When I run using 'flutter run' it keeps compiling ( up to 'Installing and launching...' ) and opening a blank app for like a second.
When I run my app using Xcode, it opens a blank app, and I receive this error message:
dyld`__abort_with_payload:
0x1013975dc <+0>: mov x16, #0x209
0x1013975e0 <+4>: svc #0x80
-> 0x1013975e4 <+8>: b.lo 0x101397600 ; <+36> #Thread 1: signal SIGABRT
0x1013975e8 <+12>: stp x29, x30, [sp, #-0x10]!
0x1013975ec <+16>: mov x29, sp
0x1013975f0 <+20>: bl 0x101395be8 ; cerror_nocancel
0x1013975f4 <+24>: mov sp, x29
0x1013975f8 <+28>: ldp x29, x30, [sp], #0x10
0x1013975fc <+32>: ret
0x101397600 <+36>: ret
and:
dyld: Library not loaded: #rpath/Flutter.framework/Flutter
Referenced from: /private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Runner
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter: code signature invalid for '/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter'
/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter: code signature invalid for '/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter'
/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter: stat() failed with errno=1
/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter: code signature invalid for '/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter'
/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter: stat() failed with errno=1
/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter: code signature invalid for '/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter'
/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter: stat() failed with errno=1
/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter: code signature invalid for '/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter'
/private/var/containers/Bundle/Application/57467581-3BC4-4097-AA4A-717D2AA9BF93/Runner.app/Frameworks/Flutter.framework/Flutter: stat() failed with errno=1
Flutter doctor:
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.15.3 19D76,
locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.3.2)
[✓] VS Code (version 1.38.1)
[✓] Connected device (1 available)
• No issues found!
iOS version: 13.3.1
MacOs version: Catalina 10.15.3
Important notice: It works on my iPad or on a Simulator ( iOS and Android ).
This is not a flutter issue, it has to do with apple latest ios 13.3.1.
It also reproduces by creating a new Xcode project and just adding a framework target, which automatically gets embedded and linked in the app target.
More details about the issue:
https://github.com/flutter/flutter/issues/49504
Related
I am trying to debug with ASAN. (address sanitizer)
But I have met a segmentation fault.
I try to debug with lldb.
It seems that there is a bug in ASAN that causes the error.
Process 71756 stopped
* thread #1, stop reason = EXC_BAD_ACCESS (code=1, address=0x180000000)
frame #0: 0x0000000100bfa5f4 libclang_rt.asan_osx_dynamic.dylib`__sanitizer::get_dyld_hdr() + 184
libclang_rt.asan_osx_dynamic.dylib`__sanitizer::get_dyld_hdr:
-> 0x100bfa5f4 <+184>: ldr w9, [x0]
0x100bfa5f8 <+188>: cmp w21, w9, lsr #1
0x100bfa5fc <+192>: b.ne 0x100bfa5b0 ; <+116>
0x100bfa600 <+196>: ldr w9, [x0, #0xc]
The gcc and g++ version are AppleClang 12.0.5.12050022 for arm64(M1).
Note. ASAN works good until I upgraded the osx to 13.2.1.
Can I upgrade or downgrade my gcc/g++ version to fix it? and how?
error log in xcode , no issue in iOS version below 16 , im using XCode 14.1
libsp.dylib`spd_checkin_socket.cold.1:
0x204699364 <+0>: adrp x8, 143811
0x204699368 <+4>: adrp x9, 0
0x20469936c <+8>: add x9, x9, #0xa3f; "Linked against modern SDK, VOIP socket will not wake. Use Local Push Connectivity instead"
0x204699370 <+12>: str x9, [x8, #0x130]
-> 0x204699374 <+16>: brk #0x1
I'm compiling a flutter app for android and iOS. The project compiles and runs on android emulators but I get a build error when I try to build the iOS version via VSCode or Android Studio.
Here is the build error:
error: Multiple commands produce
'/Users/jdoe/Development/My-Great-App/my_great_app/build/ios/Debug-development-iphonesimulator/Runner.app/Runner':
1) Target 'Runner' has copy command from '/Users/jdoe/Development/My-Great-App/my_great_app/ios/Runner' to
'/Users/jdoe/Development/My-Great-App/my_great_app/build/ios/Debug-development-iphonesimulator/Runner.app/Runner'
2) Target 'Runner' has link command with output
'/Users/jdoe/Development/My-Great-App/my_great_app/build/ios/Debug-development-iphonesimulator/Runner.app/Runner'
[ +49 ms] Could not build the application for the simulator.
[ +3 ms] Error launching application on iPhone 8.
[ +5 ms] "flutter run" took 79,020ms.
[ +18 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:607:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:972:18)
#3 _rootRunUnary (dart:async/zone.dart:1198:47)
#4 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#7 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#8 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#9 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#10 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#11 RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#12 _rootRunUnary (dart:async/zone.dart:1198:47)
#13 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#14 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#15 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#16 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#17 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#18 Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#19 _rootRun (dart:async/zone.dart:1190:13)
#20 _CustomZone.run (dart:async/zone.dart:1093:19)
#21 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#22 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#23 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#24 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#25 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
Here is my environment:
jdoe#MacBook-Air My Great App % flutter doctor -v
[✓] Flutter (Channel beta, 1.22.0-12.1.pre, on Mac OS X 10.15.6 19G2021, locale en-CA)
• Flutter version 1.22.0-12.1.pre at /Users/toddherron1a/Development/flutter
• Framework revision 8b3760638a (12 days ago), 2020-09-15 17:47:13 -0700
• Engine revision 4654fc6cf6
• Dart version 2.10.0 (build 2.10.0-110.3.beta)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/toddherron1a/Library/Android/sdk
• 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_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0, Build version 12A7209
• CocoaPods version 1.10.0.rc.1
[✓] 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 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.49.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.14.1
[✓] Connected device (4 available)
• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• iPhone 8 (mobile) • 6F348FD9-AA18-4290-84EA-FB7A1AFB9F9E • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
• Web Server (web) • web-server • web-javascript • Flutter Tools
• Chrome (web) • chrome • web-javascript • Google Chrome 85.0.4183.121
• No issues found!
Things I've tried:
flutter clean
pod update
Removing VALID_ARCH from Xcode
There is no facebook login in this app, so this solution wasn't applicable.
I'm a bit stuck and I'm continuing development on Android for the time being. Any thoughts or ideas for getting the iOS build to work would be most appreciated!
The problem turned out to be duplicate GoogleService-Info.plist files in Xcode's Copy Bundle Resources (Targets • Runner • Build Phases).
Once both copies were removed using the "-", the build worked.
I went back to an app I had not touched for a couple of months. However when installing and launching it on the device (iPhone X), it freezes on the launch screen.
Here is what is displayed in the console :
dyld: Library not loaded: #rpath/GTMSessionFetcher.framework/GTMSessionFetcher
Referenced from: /private/var/containers/Bundle/Application/7ECE2655-24A5-4B69-8B99-4294C970E67F/Bangos Noir.app/Bangos Noir
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/7ECE2655-24A5-4B69-8B99-4294C970E67F/Bangos Noir.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signature invalid for '/private/var/containers/Bundle/Application/7ECE2655-24A5-4B69-8B99-4294C970E67F/Bangos Noir.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher'
/private/var/containers/Bundle/Application/7ECE2655-24A5-4B69-8B99-4294C970E67F/Bangos Noir.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signature invalid for '/private/var/containers/Bundle/Application/7ECE2655-24A5-4B69-8B99-4294C970E67F/Bangos Noir.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher'
/private/var/containers/Bundle/Application/7ECE2655-24A5-4B69-8B99-4294C970E67F/Bangos Noir.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: stat() failed with errno=1
/private/var/containers/Bundle/Application/7ECE2655-24A5-4B69-8B99-4294C970E67F/Bangos Noir.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signature invalid for '/private/var/containers/Bundle/Application/7ECE2655-24A5-4B69-8B99-4294C970E67F/Bangos Noir.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher'
/private/var/containers/Bundle/Application/7ECE2655-24A5-4B69-8B99-4294C970E67F/Bangos Noir.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: stat() failed with errno=1
(lldb)
Moreover here is the log from the debug navigator :
dyld`__abort_with_payload:
0x100e8f5dc <+0>: mov x16, #0x209
0x100e8f5e0 <+4>: svc #0x80
-> 0x100e8f5e4 <+8>: b.lo 0x100e8f600 ; <+36>
0x100e8f5e8 <+12>: stp x29, x30, [sp, #-0x10]!
0x100e8f5ec <+16>: mov x29, sp
0x100e8f5f0 <+20>: bl 0x100e8dbe8 ; cerror_nocancel
0x100e8f5f4 <+24>: mov sp, x29
0x100e8f5f8 <+28>: ldp x29, x30, [sp], #0x10
0x100e8f5fc <+32>: ret
0x100e8f600 <+36>: ret
However, the app runs just fine on a simulator.
I found a possible solution here
https://stackoverflow.com/a/60257204/10213202
But it does not work for me.
PS : app name is Bangos Noir.
The thing is that I try to build a iOS release for a flutter app but it crashes I search for results about the errors but found nothing hope someone could help.
NOTE : The app launch and works perfectly on both IOS and Android but doesn't build on any of them. here is my post about the Android problem :
Android post
You can find below the result of my "flutter doctor -v" and "flutter build ios -v".
flutter doctor -v :
[✓] Flutter (Channel stable, v1.9.1+hotfix.5, on Mac OS X 10.15 19A602, locale en-FR)
• Flutter version 1.9.1+hotfix.5 at /Users/axel/flutter
• Framework revision 1aedbb1835 (4 days ago), 2019-10-17 08:37:27 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/axel/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• 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.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.1, Build version 11A1027
• 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)
[✓] VS Code (version 1.39.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.5.1
[✓] Connected device (2 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10
(API 29) (emulator)
• iPhone 11 Pro • DB06E423-957F-41AA-99D0-05735D90C30B • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-1 (simulator)
• No issues found!
flutter build ios -v :
[ +118 ms] "flutter ios" took 19,172ms.
Encountered error while building for device.
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:94:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:490:18)
#3 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#4 _rootRunUnary (dart:async/zone.dart:1132:38)
#5 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#6 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#7 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#8 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#9 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#10 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#11 _rootRun (dart:async/zone.dart:1124:13)
#12 _CustomZone.run (dart:async/zone.dart:1021:19)
#13 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#14 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#15 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#16 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#17 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#18 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
Ok i found the problem, First i wasn't working with the stable flutter version i was with 1.10.x and going back to flutter 1.9.x-prefix.x made it run back again but the build din't work anymore, the thing that was making the build crash was that with the latest xCode version and since i was working with firebase cloud messaging i need to add back the mobile provision back in xCode part of my flutter app. – Axel Frau just now Edit Delete
i followed this tutorial : Firebase Cloud messaging to do this as on the project i'm working on somebody else did it before me.