Error with launch_url plugin in flutter - dart

I am trying to use launch_url plugin in Flutter but my app keeps quitting immediately as I click the button.
Code I use for the button:
new MaterialButton(
child: const Text('M-COM'),
height: 50.0,
minWidth: 200.0,
color: Colors.blue,
textColor: Colors.white,
splashColor: Colors.blueGrey,
onPressed: _launchURL,
)
Code for _launchURL:
_launchURL() async {
const url = 'https://flutter.io';
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
Imports:
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
import 'dart:async';
Dependencies:
dependencies:
flutter:
sdk: flutter
url_launcher:
Error I get:
F/libc ( 6730): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xd in tid 6748 (Thread-2), pid 6730 (.flutterstarter)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_gphone_x86/generic_x86:9/PPP4.180612.007/4860066:userdebug/dev-keys'
Revision: '0'
ABI: 'x86'
pid: 6730, tid: 6748, name: Thread-2 >>> com.yourcompany.flutterstarter <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xd
Cause: null pointer dereference
eax c8e6faac ebx c8e6faac ecx 0000000a edx c7e0f570
edi c5d175f0 esi c7e10408
ebp c7e0f468 esp c7e0f468 eip c84aa1d8
backtrace:
#00 pc 006981d8 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#01 pc 008f5b75 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#02 pc 008e87ea /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#03 pc 008ffb03 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#04 pc 008eb310 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#05 pc 008f5eea /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#06 pc 008e87ea /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#07 pc 008fe2fb /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#08 pc 008e8d97 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#09 pc 008fdcb7 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#10 pc 008eafb7 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#11 pc 008f997f /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#12 pc 008eaff8 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#13 pc 008fa175 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#14 pc 008eaf8a /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#15 pc 008f997f /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#16 pc 008eaff8 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#17 pc 008fcc16 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#18 pc 008eb034 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#19 pc 008ef41e /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#20 pc 008f0570 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#21 pc 0091433e /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#22 pc 0092fad4 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#23 pc 00932f2a /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#24 pc 00934573 /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#25 pc 00933d2b /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#26 pc 0093004a /data/app/com.yourcompany.flutterstarter-MdONNcPhZQnLdPJuB2HJaQ==/lib/x86/libflutter.so
#27 pc 0000056b <anonymous:c6440000>
Lost connection to device.
I am using Android Studio and trying to run the app on Android. What am I doing wrong?

Related

Flutter debug runs on one iOS 14 device, but won't run on another iOS 14 device

I have two iOS devices, iPhone 8 and iPhone 12 mini, both runs iOS 14.4.
Flutter debug works normally on iPhone 8, but it won't launch app on iPhone 12 mini. It will hang on launch screen and then just exit.
Running "flutter pub get" in myproject...
Launching lib/main.dart on XX iPhone in debug mode...
lib/main.dart:1
Automatically signing iOS for device deployment using specified development team in Xcode project: XYXYXYXYX
Xcode build done. 117,9s
Error launching application on XX iPhone.
Exited (sigterm)
I can start debugging from XCode on both devices, but even after successfull start from XCode, debug won't work from flutter next time when I run flutter run on iPhone 12 mini.
Runnin flutter run --release also works OK.
This is what I get at the end when I run flutter run --verbose
...
...
Application launched on the device. Waiting for observatory port.
[+30020 ms] Installing and launching... (completed in 61,6s)
[ +1 ms] Error launching application on Sheriff iPhone.
[ +5 ms] "flutter run" took 372.990ms.
[ +7 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:617:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1080:12)
<asynchronous suspension>
#3 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:931:27)
<asynchronous suspension>
#4 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#5 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#6 CommandRunner.runCommand (package:args/command_runner.dart:197:13)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
<asynchronous suspension>
#8 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#9 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:230:5)
<asynchronous suspension>
#11 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:9)
<asynchronous suspension>
#12 run.<anonymous closure> (package:flutter_tools/runner.dart:61:12)
<asynchronous suspension>
#13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#15 runInContext (package:flutter_tools/src/context_runner.dart:70:10)
<asynchronous suspension>
#16 main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>
[ +85 ms] (lldb) process detach
[ +228 ms] ensureAnalyticsSent: 230ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hook priority 4
[ +56 ms] Shutdown hooks complete
[ ] exiting with code 1
flutter doctor
# flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 1.24.0-10.2.pre, on macOS 11.2.2 20D80 darwin-x64, locale sr-Latn-RS)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.52.1)
[✓] Connected device (1 available)
• No issues found!
Local network connection is allowed for the app on iPhone 12 mini.
I have tried all kinds of flutter clean, pod install, deleting DeriverdData, restarting iOS device etc. but it didn't work.
What am I missing here?

Xcode 12: Command PhaseScriptExecution failed with a nonzero exit code

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]

Flutter fails on `flutter` command

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

DART pub get failed after update from 1.60 to 1.72: Failed to precompile intl:extract_to_arb

Last night, I accidentally updated my Dart Editor and SDK version from 1.60 to 1.72. Accidentally meaning I didn't want to change my development environment while I was developing, but it happened. After that, I see this when I try to "pub get":
>--- 7:48:46 AM Running pub get on /Users/Clayvessel/Dropbox/PROJECT/DART/DART_Project/OneViewer_Composite-Viewer/OneViewer_6 ... ---
>Resolving dependencies...
>Got dependencies!
>Precompiling executables...
>Loading source assets...
>Failed to precompile intl:extract_to_arb:
>Unhandled exception:
>Uncaught Error: Failure getting http://localhost:51271/packages/intl/extract_messages.dart: 404 Not Found
>Stack Trace:
>#0 _asyncLoadError (dart:_builtin:285)
>#1 _httpGet.<anonymous closure>.<anonymous closure> (dart:_builtin:228)
>#2 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#3 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#4 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#5 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:290)
>#6 _ForwardingStream._handleDone (dart:async/stream_pipe.dart:110)
>#7 _handleDone (dart:async/stream_pipe.dart:178)
>#8 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#9 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#10 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#11 _DelayedDone.perform (dart:async/stream_impl.dart:614)
>#12 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:711)
>#13 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:671)
>#14 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
>#15 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
>#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
>#17 _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)
>Failed to precompile intl:generate_from_arb:
>Unhandled exception:
>Uncaught Error: Failure getting http://localhost:51271/packages/intl/extract_messages.dart: 404 Not Found
>Stack Trace:
>#0 _asyncLoadError (dart:_builtin:285)
>#1 _httpGet.<anonymous closure>.<anonymous closure> (dart:_builtin:228)
>#2 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#3 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#4 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#5 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:290)
>#6 _ForwardingStream._handleDone (dart:async/stream_pipe.dart:110)
>#7 _handleDone (dart:async/stream_pipe.dart:178)
>#8 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#9 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#10 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#11 _DelayedDone.perform (dart:async/stream_impl.dart:614)
>#12 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:711)
>#13 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:671)
>#14 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
>#15 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
>#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
>#17 _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)
Specifically it is complaining about the two things:
import 'package:chart/chart.dart'
import 'package:chrome/chrome_app.dart' as chrome
They were working just fine before I update Dart SDK. In Dart Editor, it complains:
Target of URI does not exist
As a novice in Dart, I have done exhaustive searches and din't have a luck. Deadline is coming and I anxiously looking for a solution to this. I develop on Mac Book. But I have a Windows 7 notebook as well. They are sharing project folders equipped by Dropbox. Yesterday before this error happen, I updated my OS X to Yosemite. While the machine was updating, I tried to pub get and compile dart2js for my project in Windows 7 notebook. It generated some errors. So I deleted my whole Dart folder and downloaded it again now from Mac Book. And I realised now dart has been updated to 1.7.2.
Any help on this would be greatly appreciated!
On the command line, running "pub cache repair" might help. I frequently have to do this when I update.

cannot run my application on dart 1.6 release-stable and dart 1.7.0.dev_00_01

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

Resources