I have a flutter application that I am trying to generate release for IOS out of it, but I am facing this error:
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
I have tried most of the internet solutions for this error and still get it the same, I am not sure if it is related to something specific or it is a general error, any suggestion would be highly appreciated
flutter build ios --verbose
here is the log:
/Users/husseinajam/Library/Developer/Xcode/DerivedData/Runner-blmaktiwmbrumnfrwrxbcbrwqoqk/Build/Intermediates.noindex/Runner.build/Release-
iphoneos/Runner.build/Script-3B06AD1E1E4923F5004D2608.sh
♦ mkdir -p -- /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Frameworks
♦ rsync -av --delete /Users/husseinajam/Desktop/imim/ios/../ios/Flutter/App.framework
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Frameworks
building file list ... rsync: link_stat "/Users/husseinajam/Desktop/imim/ios/../ios/Flutter/App.framework"
failed: No such file
or directory (2)
done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at
/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
GenerateDSYMFile /Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app.dSYM
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Runner (in target 'Runner' from project
'Runner')
cd /Users/husseinajam/Desktop/imim/ios
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app/Runner -o
/Users/husseinajam/Desktop/imim/build/ios/Release-iphoneos/Runner.app.dSYM
[+8613 ms] "flutter ios" took 118,982ms.
[ +5 ms] Encountered error while building for device.
[ +2 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1 BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:116:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:977: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 Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#10 _rootRun (dart:async/zone.dart:1190:13)
#11 _CustomZone.run (dart:async/zone.dart:1093:19)
#12 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#13 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#14 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#15 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
[ +744 ms] ensureAnalyticsSent: 257ms
[ +2 ms] Running shutdown hooks
[ ] Shutdown hook priority 4
[ +1 ms] Shutdown hooks complete
[ ] exiting with code 1
have you tried the following;
'flutter clean' command -> run build(if supporting iOS 9 try changing it to iOS 11 for a test)
Updating flutter to the latest version and running and running the first step?
I am using Xcode 12.4
Build Settings -> Targets -> Build Active Architecture Only, set it to Yes.[Debug,Profile & Release for all]
Related
I have followed the directions here for mapbox, and can successfully build the package locally. I have previously been able to build my app with older versions of mapbox, but this new version breaks it.
I have post-clone script below to add the .netrc file to the build computer and then run the flutter build command. It makes it to the flutter build line, and then fails on pod install. The error message doesn't indicate what URL returns 403. This is the code output from running with --verbose.
I have entered the mapbox_key into the App Center environment variables for the build and verified it is being set properly with the echo command.
Has anyone experienced this problem before and know how to fix it?
error message
Cloning into '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20220201-5726-105j6ub'...
Cloning into '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20220201-5726-cc9t4i'...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 66 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 403
[ +14 ms] "flutter ios" took 426,650ms.
[ +7 ms] Error running pod install
[ ]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 CocoaPods._runPodInstall (package:flutter_tools/src/macos/cocoapods.dart:340:7)
<asynchronous suspension>
#2 CocoaPods.processPods (package:flutter_tools/src/macos/cocoapods.dart:168:7)
<asynchronous suspension>
#3 processPodsIfNeeded (package:flutter_tools/src/macos/cocoapod_utils.dart:44:30)
<asynchronous suspension>
#4 buildXcodeProject (package:flutter_tools/src/ios/mac.dart:203:3)
<asynchronous suspension>
#5 _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:264:37)
<asynchronous suspension>
#6 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27)
<asynchronous suspension>
#7 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#8 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#9 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#10 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#11 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#12 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14 main (package:flutter_tools/executable.dart:92:3)
<asynchronous suspension>
[ +3 ms] ensureAnalyticsSent: 1ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1
##[error]The process '/bin/bash' failed with exit code 1
##[error]Bash failed with error: The process '/bin/bash' failed with exit code 1
##[section]Finishing: Post Clone Script
##[section]Starting: Xcode build (signed)
post-clone script
#!/usr/bin/env bash
set -e
set -x
cd ~
echo "machine api.mapbox.com
login mapbox
password $mapbox_key" > .netrc
chmod 0600 .netrc
cat .netrc
cd ./work/1/s/rider_app
git clone https://github.com/flutter/flutter.git -b 2.5.3 --depth 1
export PATH="$PATH:`pwd`/flutter/bin"
flutter doctor
flutter clean
echo "Installed flutter in `pwd`/flutter"
flutter build ios --verbose --release --no-codesign --no-sound-null-safety --dart-define=TRC_API_URL=$TRC_API_URL --dart-define=TRC_RIDER_GRPC_API_URL=$TRC_RIDER_GRPC_API_URL
I needed to select at least all of these token scopes in order to fix this issue. I am not sure which additional scope fixed the problem. I only had DOWNLOADS:READ selected originally.
I don't understand, what am I doing wrong. I install (activate) grinder:
$ pub global activate grinder
Then I create a simple tool/grind.dart:
import "dart:io";
import "package:grinder/grinder.dart";
main(args) => grind(args);
#Task("Build")
build() {
Process.run("webdev build", []);
}
But then Process.run() fails of No such file or directory error:
$ grind build
ProcessException: No such file or directory
Command: webdev build
#0 build (...project/tool/grind.dart:33:3)
<asynchronous suspension>
#1 _LocalLibraryMirror._invoke (dart:mirrors/runtime/libmirrors_impl.dart:1104:36)
#2 _LocalObjectMirror.invoke (dart:mirrors/runtime/libmirrors_impl.dart:230:25)
#3 TaskDiscovery.discoverDeclaration.<anon> (package:grinder/src/discover_tasks.dart:79:38)
#4 _rootRun (dart:async/zone.dart:1124:13)
#5 _CustomZone.run (dart:async/zone.dart:1021:19)
#6 _runZoned (dart:async/zone.dart:1516:10)
#7 runZoned (dart:async/zone.dart:1463:12)
#8 ZonedValue.withValue (package:grinder/src/utils.dart:112:12)
#9 GrinderTask.execute (package:grinder/src/grinder_task.dart:64:27)
#10 Grinder._invokeTask (package:grinder/src/grinder.dart:193:27)
#11 Grinder.start.<anon> (package:grinder/src/grinder.dart:168:16)
#12 Future.forEach.<anon> (dart:async/future.dart:486:26)
#13 Future.doWhile.<anon> (dart:async/future.dart:528:26)
#14 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#15 _RootZone.bindUnaryCallbackGuarded.<anon> (dart:async/zone.dart:1353:26)
#16 Future.doWhile (dart:async/future.dart:543:18)
#17 Future.forEach (dart:async/future.dart:484:12)
#18 Grinder.start (package:grinder/src/grinder.dart:167:21)
#19 runTasks (package:grinder/src/cli.dart:67:39)
<asynchronous suspension>
#20 grind (package:grinder/grinder.dart:46:12)
#21 main (...project/tool/grind.dart:9:15)
Even though webdev build does work correctly (is in path)?:
$ webdev build
Creating build script
...
What is the problem here? How could I fix this? Or is there a way to call webdev build programmatically right from Dart code?
The executable must not contain parameters.
Use instead:
Process.run("webdev", ["build"]);
Good afternoon,
I try to run a Flutter project on iOS, previously successfully run on Android. However, I got an error:
"x86_64" is not an allowed value for option "ios-arch".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
Failed to build /Users/user123/Downloads/my_app.
Command /bin/sh failed with exit code 255
I tried different solutions offered here about a variety of errors "Command /bin/sh failed with exit code XXX". But, none of them helped.
Also, I checked solutions on GitHub:
https://github.com/flutter/flutter/issues/9814.
At the same time, it is not completely clear for me how to implement them into iOS project.
I will be appreciated for any support.
Sincerely,
Maryna
Update: these are the results of the commands:
$ flutter run --verbose
[ +53 ms] executing: [/Users/user143726/Downloads/flutter/] git rev-parse --abbrev-ref --symbolic #{u}
[ +60 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic #{u}
[ ] origin/beta
[ ] executing: [/Users/user143726/Downloads/flutter/] git rev-parse --abbrev-ref HEAD
[ +10 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] beta
[ ] executing: [/Users/user143726/Downloads/flutter/] git ls-remote --get-url origin
[ +8 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ ] executing: [/Users/user143726/Downloads/flutter/] git log -n 1 --pretty=format:%H
[ +12 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] 5ab9e70727d858def3a586db7fb98ee580352957
[ ] executing: [/Users/user143726/Downloads/flutter/] git log -n 1 --pretty=format:%ar
[ +13 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ ] 3 weeks ago
[ +1 ms] executing: [/Users/user143726/Downloads/flutter/] git describe --match v*.*.* --first-parent --long --tags
[ +14 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[ ] v0.8.2-0-g5ab9e7072
[ +508 ms] executing: /Users/user143726/Library/Android/sdk/platform-tools/adb devices -l
[ +32 ms] Exit code 0 from: /Users/user143726/Library/Android/sdk/platform-tools/adb devices -l
[ ] List of devices attached
[ +8 ms] executing: idevice_id -h
[ +98 ms] /usr/bin/xcrun simctl list --json devices
[ +449 ms] No connected devices.
[ ] Run 'flutter emulators' to list and start any available device emulators.
[ ] If you expected your device to be detected, please run "flutter doctor" to diagnose
[ ] potential issues, or visit https://flutter.io/setup/ for troubleshooting tips.
[ +18 ms] "flutter run" took 1,014ms.
#0 throwToolExit (package:flutter_tools/src/base/common.dart:26:3)
#1 RunCommand.validateCommand
(package:flutter_tools/src/commands/run.dart:239:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:350:11)
<asynchronous suspension>
#3 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:306:33)
<asynchronous suspension>
#4 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#5 _rootRun (dart:async/zone.dart:1124:13)
#6 _CustomZone.run (dart:async/zone.dart:1021:19)
#7 _runZoned (dart:async/zone.dart:1516:10)
#8 runZoned (dart:async/zone.dart:1463:12)
#9 AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#10 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:297:20)
#11 CommandRunner.runCommand (package:args/command_runner.dart:194:27)
<asynchronous suspension>
#12 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:347:21)
<asynchronous suspension>
#13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#14 _rootRun (dart:async/zone.dart:1124:13)
#15 _CustomZone.run (dart:async/zone.dart:1021:19)
#16 _runZoned (dart:async/zone.dart:1516:10)
#17 runZoned (dart:async/zone.dart:1463:12)
#18 AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#19 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:303:19)
<asynchronous suspension>
#20 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109:29)
#21 new Future.sync (dart:async/future.dart:224:31)
#22 CommandRunner.run (package:args/command_runner.dart:109:11)
#23 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:211:18)
#24 run.<anonymous closure> (package:flutter_tools/runner.dart:59:20)
<asynchronous suspension>
#25 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#26 _rootRun (dart:async/zone.dart:1124:13)
#27 _CustomZone.run (dart:async/zone.dart:1021:19)
#28 _runZoned (dart:async/zone.dart:1516:10)
#29 runZoned (dart:async/zone.dart:1463:12)
#30 AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#31 runInContext (package:flutter_tools/src/context_runner.dart:42:24)
<asynchronous suspension>
#32 run (package:flutter_tools/runner.dart:50:10)
#33 main (package:flutter_tools/executable.dart:52:9)
<asynchronous suspension>
#34 main (file:///b/build/slave/Mac_Flutter_Packaging/build/archive/flutter/packages/fl utter_tools/bin/flutter_tools.dart:8:3)
#35 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#36 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
$ flutter analyze
Analyzing my_app...
info • Unused import: 'package:my_app/main.dart' • test/widget_test.dart:10:8 • unused_import
1 issue found. (ran in 8.4s)
$ flutter doctor -v
[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.6 17G65, locale en)
• Flutter version 0.8.2 at /Users/user143726/Downloads/flutter
• Framework revision 5ab9e70727 (3 weeks ago), 2018-09-07 12:33:05 -0700
• Engine revision 58a1894a1c
• Dart version 2.1.0-dev.3.1.flutter-760a9690c2
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
• Android SDK at /Users/user143726/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.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_152-release-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.0, Build version 10A255
• ios-deploy 2.0.0
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 28.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[!] VS Code (version 1.27.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 devices
! No devices available
! Doctor found issues in 2 categories.
After lots of try i follow these steps to release ipa file :
Go to your trminal:
cd your-flutter-project
flutter run (That will launch the app to your connected or opened device )
Now,
come to again to your MAC terminal and type
flutter build apk (that will make the release apk)
For IOS,
flutter build ios
after complete the task you will see the path of your file package something like
/Users/Sanjeev/Documents/WorkSpaceForFlutter/myapp/build/ios/iph
oneos/Runner.app.
Now go to Xcode >Product >Archive you will get the screen below
This is how i resolve my issue
Command /bin/sh failed with exit code 255
I solve the problem with the following commands.
flutter clean
flutter build ios
After that I can create signed builds and also upload to App Stores.
This exit code (255) occurs from incorrectly Generated.xcconfig configuration like TRACK_WIDGET_CREATION, FLUTTER_FRAMEWORK_DIR, FLUTTER_BUILD_MODE
In archive ios release mode. So before archiving make sure to run flutter clean then flutter build ios for some reason flutter build ios --release doesn't work for me. Then lastly go to Xcode and archive the ios app
Commands
flutter clean then
flutter build ios
Hope it helps.
This issue happened to me after building a release version. It seems that iOS emulators does not support release versions.
If you want to run your app on an emulator you will need to build a debug version
flutter clean
flutter build ios --debug
For me, it happenned that I was opening .xcodeproj (WRONG) file instead of .xcworkspace (RIGHT)
For me helped:
Disconnect all physical phone's from mac.
Close Xcode.
In terminal command
flutter clean
Start Xcode by running Runner.xcworkspace, that you have inside your project folder /yourProjectFolder/ios/Runner
Choose menu Product - Archive
That's it! After that build was successful. Appear windows where you can distribute app.
I'm following the Getting Started with Flutter guide and getting stuck when running the actual flutter command:
flutter init -o my_app
Resolving dependencies...
Error on line 17, column 16 of pubspec.yaml: Invalid version constraint: Could not parse version "^1.4.0". Unknown text at "^1.4.0".
stack_trace: ^1.4.0
^^^^^^
Unhandled exception:
Uncaught Error: FileSystemException: Cannot open file, path = '/Users/craig/Code/flutter/packages/flutter_tools/packages/sky_tools/executable.dart' (OS Error: No such file or directory, errno = 2)
Stack Trace:
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:349)
#1 _RootZone.runUnary (dart:async/zone.dart:1151)
#2 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:496)
#3 _Future._propagateToListeners (dart:async/future_impl.dart:579)
#4 _Future._completeWithValue (dart:async/future_impl.dart:339)
#5 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:401)
#6 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#7 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#8 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
Unhandled exception:
Uncaught Error: FileSystemException: Cannot open file, path = '/Users/craig/Code/flutter/bin/cache/flutter_tools.snapshot' (OS Error: No such file or directory, errno = 2)
Stack Trace:
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:349)
#1 _RootZone.runUnary (dart:async/zone.dart:1151)
#2 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:496)
#3 _Future._propagateToListeners (dart:async/future_impl.dart:579)
#4 _Future._completeWithValue (dart:async/future_impl.dart:339)
#5 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:401)
#6 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#7 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#8 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
Looks like your Dart version is outdated < 1.9.2.
Try dart --version to get the version of your installed Dart SDK.
Current is 1.12.x.
Update 2018-03-20
During the migration phase to Dart 2 you might want to install Dart from the dev channel to get a 2.0.0-alpha.x version.
The newest stable version is 1.24.x
For example
brew install dart --devel
Update 2018-06-21
Now also supported:
brew install dart#2
For others who're facing a similar error, I suggest that you read the docs carefully. I didn't, hence I wasted quite some time looking out for the solution elsewhere, even though it was right in front of my eyes all the time: https://flutter.io/setup-macos/#update-your-path
I'm writing the commands down so that you can copy and paste them easily in your terminal window:
touch $HOME/.bash_profile
open $HOME/.bash_profile
Line 1 creates a text file named .bash_profile. Line 2 opens it.
Then the line given below has to be pasted in the text file:
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
Don't forget to save the file after pasting. flutter doctor should work with every Terminal window now.
Open your terminal and run this
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
then run flutter, it will work.
It's because you the path you set up is temporary. To add the path
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
[PATH_TO_FLUTTER_GIT_DIRECTORY] -> Folder where you downloaded flutter or cloned from git.
Then do
echo $PATH
Watch this video to easy install
https://www.youtube.com/watch?v=Em8igImhBKc
My application was being developed with 1.6.0-dev.09_07 and starting my application was done with no issue.
I switched to the 1.6.0.release-stable received the following error:
--- 8:03:25 AM Starting pub serve : epimss_design ---
Loading source assets...
Loading polymer/src/build/mirrors_remover, observe and smoke/src/default_transformer transformers...
'Unhandled exception:
Uncaught Error: SocketException: OS Error: The semaphore timeout period has expired.
, errno = 121, address = localhost, port = 58876
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:820)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:126)'
dart:isolate-patch/isolate_patch.dart 256 Isolate.spawnUri
e:%5Cb%5Cbuild%5Cslave%5Cdart-editor-win-stable%5Cbuild%5Cdart%5Csdk%5Clib%5C_internal%5Cpub%5Clib%5Csrc%5Cdart.dart 179 _isolateBuffer
dart:isolate-patch/isolate_patch.dart 219 _startIsolate.isolateStartHandler
dart:isolate-patch/isolate_patch.dart 122 _RawReceivePortImpl._handleMessage
I tried the 1.7.0.dev_00_01 release with the same error.
What has changed in the current stable release (1.6) and 1.7 dev streams to cause this.
I removed all DartEditor, pub and .dartium folders so not to have any legacy issues, but it still does not work.
I ran pub-upgrade on all apps with no errors - this suggest that my pubspec.lock and pubspec.yaml are OK.
Thanks