After downloading the flutter archive and installing on macbook, everything works fine, but once I typed the flutter upgrade command the process failed and I got the error below.
Unhandled exception:
Invalid argument(s): Cannot find executable for sysctl.
#0 _getExecutable (package:process/src/interface/local_process_manager.dart:124:5)
#1 LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:91:30)
#2 ErrorHandlingProcessManager.runSync.<anonymous closure> (package:flutter_tools/src/base/error_handling_io.dart:649:37)
#3 _runSync (package:flutter_tools/src/base/error_handling_io.dart:548:14)
#4 ErrorHandlingProcessManager.runSync (package:flutter_tools/src/base/error_handling_io.dart:649:12)
#5 _DefaultProcessUtils.runSync (package:flutter_tools/src/base/process.dart:420:51)
#6 _MacOSUtils.hostPlatform (package:flutter_tools/src/base/os.dart:305:25)
#7 _MacOSUtils.name (package:flutter_tools/src/base/os.dart:291:123)
#8 new _DefaultUsage (package:flutter_tools/src/reporting/usage.dart:247:18)
#9 new Usage (package:flutter_tools/src/reporting/usage.dart:81:9)
#10 runInContext.<anonymous closure> (package:flutter_tools/src/context_runner.dart:263:20)
#11 AppContext._generateIfNecessary.<anonymous closure> (package:flutter_tools/src/base/context.dart:104:41)
#12 _LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:291:23)
#13 AppContext._generateIfNecessary (package:flutter_tools/src/base/context.dart:92:20)
#14 AppContext.get (package:flutter_tools/src/base/context.dart:121:32)
#15 flutterUsage (package:flutter_tools/src/globals.dart:55:35)
#16 _handleToolError (package:flutter_tools/runner.dart:133:13)
#17 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:87:13)
#18 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:81:17)
#19 _rootRunBinary (dart:async/zone.dart:1222:13)
#20 _CustomZone.runBinary (dart:async/zone.dart:1107:19)
#21 runZonedGuarded.<anonymous closure> (dart:async/zone.dart:1601:18)
#22 _CustomZone.handleUncaughtError (dart:async/zone.dart:1076:19)
#23 Future._propagateToListeners (dart:async/future_impl.dart:646:16)
#24 Future._completeError (dart:async/future_impl.dart:537:5)
#25 _completeOnAsyncError (dart:async-patch/async_patch.dart:264:13)
#26 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart)
<asynchronous suspension>
Please can someone help me?
I had a thing where each call of "flutter" executable did nothing and just returned without output.
remove the flutter sdk and install it fresh, helped in my case.
Related
I started my project when null safety wasn't stable and I did not want to use it back then. Now I'm heading to deployment and I want to upgrade the project to use Null-Safety. I keep getting this error, tried it on both stable and dev channel and Flutter & Dart are both up to date.
Analyzing project...
[-----------------------------------------------------------------------------|]No analysis issues found.
Generating migration suggestions...
[------------------------------------------------------------------------------]
Compiling instrumentation information...
[----------------------------------- ]RangeError (index): Invalid value: Not in inclusive range 0..12: 13
#0 List.[] (dart:core-patch/array.dart:268:52)
#1 BestPracticesVerifier._targetKindsFor (package:analyzer/src/error/best_practices_verifier.dart:1582:38)
#2 BestPracticesVerifier.visitAnnotation (package:analyzer/src/error/best_practices_verifier.dart:250:17)
#3 AnnotationImpl.accept (package:analyzer/src/dart/ast/ast.dart:280:49)
#4 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7611:20)
#5 AnnotatedNodeImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:148:17)
#6 ClassDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1559:11)
#7 RecursiveAstVisitor.visitClassDeclaration (package:analyzer/dart/ast/visitor.dart:707:10)
#8 BestPracticesVerifier.visitClassDeclaration (package:analyzer/src/error/best_practices_verifier.dart:320:13)
#9 ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1536:49)
#10 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7611:20)
#11 CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2141:21)
#12 RecursiveAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:731:10)
#13 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2134:49)
#14 LibraryAnalyzer._computeHints (package:analyzer/src/dart/analysis/library_analyzer.dart:281:10)
#15 LibraryAnalyzer.analyzeSync.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:167:9)
#16 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:397:8)
#17 LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:166:13)
#18 LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:107:12)
#19 AnalysisDriver._computeResolvedLibrary2.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1416:65)
#20 PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:32:15)
#21 AnalysisDriver._computeResolvedLibrary2 (package:analyzer/src/dart/analysis/driver.dart:1402:20)
#22 AnalysisDriver._computeResolvedLibrary.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1395:15)
#23 _rootRun (dart:async/zone.dart:1354:13)
#24 _CustomZone.run (dart:async/zone.dart:1258:19)
#25 _runZoned (dart:async/zone.dart:1788:10)
#26 runZoned (dart:async/zone.dart:1710:10)
#27 NullSafetyUnderstandingFlag.enableNullSafetyTypes (package:analyzer/dart/element/null_safety_understanding_flag.dart:42:12)
#28 AnalysisDriver._computeResolvedLibrary (package:analyzer/src/dart/analysis/driver.dart:1394:40)
#29 AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:964:22)
#30 AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2018:24)
<asynchronous suspension>
You have in a list that has 12 items, you work with item number 13 that you get this error
I want to run my existing flutter app on windows, so I loaded the lastest flutter-desktop-embedding version, placed my code inside and tried to run it. It soon breaks with an exception:
Build process failed. To view the stack trace, please run `flutter run -d windows -v`.
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 buildWindows (package:flutter_tools/src/windows/build_windows.dart:82:5)
<asynchronous suspension>
#2 WindowsDevice.buildForDevice (package:flutter_tools/src/windows/windows_device.dart:46:11)
#3 DesktopDevice.startApp (package:flutter_tools/src/desktop_device.dart:87:13)
<asynchronous suspension>
#4 FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:416:54)
<asynchronous suspension>
#5 HotRunner.run (package:flutter_tools/src/run_hot.dart:266:39)
<asynchronous suspension>
#6 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:499:37)
<asynchronous suspension>
#7 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:570:18)
#8 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#9 _rootRunUnary (dart:async/zone.dart:1132:38)
#10 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#11 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#12 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#13 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#14 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#15 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#16 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#17 RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#18 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#19 _rootRunUnary (dart:async/zone.dart:1132:38)
#20 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#21 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#22 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#23 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#24 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#25 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#26 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#27 IosProject.isSwift (package:flutter_tools/src/project.dart)
#28 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#29 _rootRunUnary (dart:async/zone.dart:1132:38)
#30 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#31 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#32 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#33 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#34 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#35 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#36 _rootRun (dart:async/zone.dart:1124:13)
#37 _CustomZone.run (dart:async/zone.dart:1021:19)
#38 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#39 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#40 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#41 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#42 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#43 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
I am developing on the master channel, already made flutter upgrade and else I think i did everything else I need to do. Running the example comming with flutter-desktop-embedding does not throw any exception, and it seems that if I copy my lib folder into the examples folder, the app will not build.
Does anyone face this issue too?
This problem is due Flutter Version to Solve it
Open Terminal and Write flutter upgrade --force
Open Your Windows Flutter Project and Write flutter run
Steps to Reproduce
follow https://flutter.dev/docs/get-started/install/windows
git clone -b stable https://github.com/flutter/flutter.git
updated my Edit environment variables
Logs
C:\Users\Win10>flutter doctor
CreateProcessW failed 193
CreateProcessW failed 193
CreateProcessW failed 193
Unhandled exception:
ProcessException: %1 is not a valid Win32 application.
Command: C:\Program Files\Git\cmd\git.EXE log -n 1 --pretty=format:%H
#0 _ProcessImpl._runAndWait (dart:io-patch/process_patch.dart:489:7)
#1 _runNonInteractiveProcessSync (dart:io-patch/process_patch.dart:634:18)
#2 Process.runSync (dart:io-patch/process_patch.dart:66:12)
#3 LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:83:20)
#4 _runWithLoggingSync (package:flutter_tools/src/base/process.dart:343:48)
#5 runSync (package:flutter_tools/src/base/process.dart:315:10)
#6 _runGit (package:flutter_tools/src/version.dart:532:10)
#7 new FlutterVersion (package:flutter_tools/src/version.dart:23:26)
#8 runInContext.<anonymous closure> (package:flutter_tools/src/context_runner.dart:81:29)
#9 AppContext._generateIfNecessary.<anonymous closure> (package:flutter_tools/src/base/context.dart:99:41)
#10 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)
#11 AppContext._generateIfNecessary (package:flutter_tools/src/base/context.dart:87:20)
#12 AppContext.get (package:flutter_tools/src/base/context.dart:115:32)
#13 FlutterVersion.instance (package:flutter_tools/src/version.dart:183:49)
#14 new Usage (package:flutter_tools/src/usage.dart:60:58)
#15 runInContext.<anonymous closure> (package:flutter_tools/src/context_runner.dart:101:20)
#16 AppContext._generateIfNecessary.<anonymous closure> (package:flutter_tools/src/base/context.dart:99:41)
#17 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:281:23)
#18 AppContext._generateIfNecessary (package:flutter_tools/src/base/context.dart:87:20)
#19 AppContext.get (package:flutter_tools/src/base/context.dart:115:32)
#20 Usage.instance (package:flutter_tools/src/usage.dart:84:40)
#21 flutterUsage (package:flutter_tools/src/usage.dart:54:33)
#22 _handleToolError (package:flutter_tools/runner.dart:112:7)
<asynchronous suspension>
#23 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:69:13)
<asynchronous suspension>
#24 _rootRunBinary (dart:async/zone.dart:1148:13)
#25 _CustomZone.runBinary (dart:async/zone.dart:1037:19)
#26 runZoned.<anonymous closure> (dart:async/zone.dart:1479:21)
#27 _CustomZone.handleUncaughtError (dart:async/zone.dart:1003:19)
#28 Future._propagateToListeners (dart:async/future_impl.dart:589:16)
#29 Future._completeError (dart:async/future_impl.dart:491:5)
#30 _SyncCompleter._completeError (dart:async/future_impl.dart:55:12)
#31 _Completer.completeError (dart:async/future_impl.dart:27:5)
#32 _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:40:18)
#33 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart)
<asynchronous suspension>
#34 _rootRun (dart:async/zone.dart:1124:13)
#35 _CustomZone.run (dart:async/zone.dart:1021:19)
#36 _runZoned (dart:async/zone.dart:1516:10)
#37 runZoned (dart:async/zone.dart:1500:12)
#38 run.<anonymous closure> (package:flutter_tools/runner.dart:60:18)
<asynchronous suspension>
#39 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:29)
<asynchronous suspension>
#40 _rootRun (dart:async/zone.dart:1124:13)
#41 _CustomZone.run (dart:async/zone.dart:1021:19)
#42 _runZoned (dart:async/zone.dart:1516:10)
#43 runZoned (dart:async/zone.dart:1463:12)
#44 AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
<asynchronous suspension>
#45 runInContext (package:flutter_tools/src/context_runner.dart:56:24)
<asynchronous suspension>
#46 run (package:flutter_tools/runner.dart:51:10)
#47 main (package:flutter_tools/executable.dart:62:9)
<asynchronous suspension>
#48 main (file:///C:/src/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#49 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#50 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
Found https://github.com/flutter/flutter/issues/19805#issuecomment-478306166 and Flutter with installation error for %1 is not a valid win32 application, but I have follow what those research say , but none of those help
It seems you have not pasted the PATH in Environment Variables Account.
You have to take the flutter(Extracted folder), and paste the path upto flutter/bin
in the Edit Path table.
then try running flutter doctor from the folder(in terminal) where you have your flutter folder
I have been exploring the flutter web for a while, everything is fine.
But I have problems in creating unit test (StatelessWidget test for example) for flutter_web components.
I have discover that there is a packages called flutter_web_test but it seems didn't work well.
test code as follow:
I have install test packages used by flutter_web demo projects: flutter_web_test
// import fluter
import 'package:flutter_web_test/flutter_web_test.dart';
// a stateless widget is imported
import 'package:ies2.pms/views/main.dart';
void main() {
testWidgets(
'test whether ',
(WidgetTester tester) async {
// very simple code, create widget in test
await tester.pumpWidget(CYFCustomView(name: 'aaa'));
print('aaa');
},
);
}
Then I start running with flutter test
Then I have received following errors:
Failed to load test harness. Are you missing a dependency on flutter_test?
00:05 +0: loading /Users/yifan.chen/ByteDanceIES/pms/test/main_test.dart Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Aflutter_test%2Fflutter_test.dart; message=StandardFileSystem only supports file:* and
data:* URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)
#1 asFileUri (package:vm/kernel_front_end.dart:601:37)
<asynchronous suspension>
#2 FrontendCompiler._outputDependenciesDelta (package:vm/frontend_server.dart:401:39)
<asynchronous suspension>
#3 FrontendCompiler.compile (package:vm/frontend_server.dart:375:13)
<asynchronous suspension>
#4 _FlutterFrontendCompiler.compile (package:frontend_server/server.dart:31:22)
<asynchronous suspension>
#5 listenAndCompile.<anonymous closure> (package:vm/frontend_server.dart:736:26)
<asynchronous suspension>
#6 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#7 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#8 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#9 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#10 _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#11 _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)
#12 _LineSplitterSink._addLines (dart:convert/line_splitter.dart:150:13)
#13 _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:125:5)
#14 StringConversionSinkMixin.add (dart:convert/string_conversion.dart:163:5)
#15 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#16 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#17 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#18 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#19 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#20 _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#21 _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)
#22 _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:241:7)
#23 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:312:20)
#24 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:305:5)
#25 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)
#26 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#27 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#28 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#29 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#30 _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#31 _StreamController._add (dart:async/stream_controller.dart:640:7)
#32 _StreamController.add (dart:async/stream_controller.dart:586:5)
#33 _Socket._onData (dart:io-patch/socket_patch.dart:1786:41)
#34 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#35 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#36 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#37 _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#38 _StreamController._add (dart:async/stream_controller.dart:640:7)
#39 _StreamController.add (dart:async/stream_controller.dart:586:5)
#40 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1335:33)
#41 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:856:14)
#42 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#43 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#44 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#45 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
00:05 +0 -1: loading /Users/yifan.chen/ByteDanceIES/pms/test/main_test.dart [E]
I can't find any solutions in Stackoverflow. And flutter_web currently haven't open issues yet. I have only discovered an issue in flutter, saying that flutter test is not supported for flutter_web project.
How should I run unit test on flutter_web project ? They have built flutter_web_test package, so it is supposed to be functional.
you shoukd move to flutter 1.9, flutter_web is deprecrated https://flutter.dev/web, the shorter way is update flutter to 1.9, create a new fresh project and activate web on it: flutter run -d chrome now you can build with flutter build web. I hope it solves your problems.
i tried launch the flutter web project locally by this terminal command
webdev serve --auto restart
but i got the following error message
Starting resource servers...Unhandled exception:
SocketException: Failed to create server socket (OS Error: Address already in use, errno = 48), address = 127.0.0.1, port = 8080
#0 _NativeSocket.bind (dart:io-patch/socket_patch.dart:591:7)
<asynchronous suspension>
#1 _RawServerSocket.bind (dart:io-patch/socket_patch.dart:1206:26)
#2 _ServerSocket.bind (dart:io-patch/socket_patch.dart:1466:29)
#3 ServerSocket.bind (dart:io-patch/socket_patch.dart:1457:26)
#4 _HttpServer.bind (dart:_http/http_impl.dart:2520:25)
#5 HttpServer.bind (dart:_http:227:19)
#6 HttpMultiServer.loopback.<anonymous closure> (package:http_multi_server/http_multi_server.dart:113:39)
#7 HttpMultiServer._loopback (package:http_multi_server/http_multi_server.dart:172:30)
<asynchronous suspension>
#8 HttpMultiServer.loopback (package:http_multi_server/http_multi_server.dart:111:12)
#9 WebDevServer.start (package:webdev/src/serve/webdev_server.dart:83:33)
#10 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#11 WebDevServer.start (package:webdev/src/serve/webdev_server.dart:54:36)
#12 ServerManager.start (package:webdev/src/serve/server_manager.dart:22:38)
#13 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#14 ServerManager.start (package:webdev/src/serve/server_manager.dart:18:37)
#15 _startServerManager (package:webdev/src/serve/dev_workflow.dart:85:27)
#16 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#17 _startServerManager (package:webdev/src/serve/dev_workflow.dart:66:42)
#18 DevWorkflow.start (package:webdev/src/serve/dev_workflow.dart:186:31)
#19 _RootZone.runUnary (dart:async/zone.dart:1379:54)
#20 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#21 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#22 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#23 Future._complete (dart:async/future_impl.dart:473:7)
#24 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#25 _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
#26 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#27 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#28 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#29 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)
abdullah#Abdullahs-MacBook-Pro ~/D/F/web_profile> webdev serve --auto restart
[SEVERE] Deleted previous snapshot due to missing asset graph.
[INFO] Building new asset graph completed, took 1.4s
[INFO] Checking for unexpected pre-existing outputs. completed, took 1ms
[INFO] Starting resource servers...Unhandled exception:
SocketException: Failed to create server socket (OS Error: Address already in use, errno = 48), address = 127.0.0.1, port = 8080
#0 _NativeSocket.bind (dart:io-patch/socket_patch.dart:591:7)
<asynchronous suspension>
#1 _RawServerSocket.bind (dart:io-patch/socket_patch.dart:1206:26)
#2 _ServerSocket.bind (dart:io-patch/socket_patch.dart:1466:29)
#3 ServerSocket.bind (dart:io-patch/socket_patch.dart:1457:26)
#4 _HttpServer.bind (dart:_http/http_impl.dart:2520:25)
#5 HttpServer.bind (dart:_http:227:19)
#6 HttpMultiServer.loopback.<anonymous closure> (package:http_multi_server/http_multi_server.dart:113:39)
#7 HttpMultiServer._loopback (package:http_multi_server/http_multi_server.dart:172:30)
<asynchronous suspension>
#8 HttpMultiServer.loopback (package:http_multi_server/http_multi_server.dart:111:12)
#9 WebDevServer.start (package:webdev/src/serve/webdev_server.dart:83:33)
#10 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#11 WebDevServer.start (package:webdev/src/serve/webdev_server.dart:54:36)
#12 ServerManager.start (package:webdev/src/serve/server_manager.dart:22:38)
#13 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#14 ServerManager.start (package:webdev/src/serve/server_manager.dart:18:37)
#15 _startServerManager (package:webdev/src/serve/dev_workflow.dart:85:27)
#16 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#17 _startServerManager (package:webdev/src/serve/dev_workflow.dart:66:42)
#18 DevWorkflow.start (package:webdev/src/serve/dev_workflow.dart:186:31)
#19 _RootZone.runUnary (dart:async/zone.dart:1379:54)
#20 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#21 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#22 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#23 Future._complete (dart:async/future_impl.dart:473:7)
#24 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#25 _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
#26 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#27 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#28 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#29 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)
abdullah#Abdullahs-MacBook-Pro ~/D/F/web_profile> webdev serve --auto restart
[SEVERE] Deleted previous snapshot due to missing asset graph.
[INFO] Starting resource servers...Unhandled exception:
SocketException: Failed to create server socket (OS Error: Address already in use, errno = 48), address = 127.0.0.1, port = 8080
#0 _NativeSocket.bind (dart:io-patch/socket_patch.dart:591:7)
<asynchronous suspension>
#1 _RawServerSocket.bind (dart:io-patch/socket_patch.dart:1206:26)
#2 _ServerSocket.bind (dart:io-patch/socket_patch.dart:1466:29)
#3 ServerSocket.bind (dart:io-patch/socket_patch.dart:1457:26)
#4 _HttpServer.bind (dart:_http/http_impl.dart:2520:25)
#5 HttpServer.bind (dart:_http:227:19)
#6 HttpMultiServer.loopback.<anonymous closure> (package:http_multi_server/http_multi_server.dart:113:39)
#7 HttpMultiServer._loopback (package:http_multi_server/http_multi_server.dart:172:30)
<asynchronous suspension>
#8 HttpMultiServer.loopback (package:http_multi_server/http_multi_server.dart:111:12)
#9 WebDevServer.start (package:webdev/src/serve/webdev_server.dart:83:33)
#10 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#11 WebDevServer.start (package:webdev/src/serve/webdev_server.dart:54:36)
#12 ServerManager.start (package:webdev/src/serve/server_manager.dart:22:38)
#13 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#14 ServerManager.start (package:webdev/src/serve/server_manager.dart:18:37)
#15 _startServerManager (package:webdev/src/serve/dev_workflow.dart:85:27)
#16 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#17 _startServerManager (package:webdev/src/serve/dev_workflow.dart:66:42)
#18 DevWorkflow.start (package:webdev/src/serve/dev_workflow.dart:186:31)
#19 _RootZone.runUnary (dart:async/zone.dart:1379:54)
#20 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#21 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#22 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
abdullah#Abdullahs-MacBook-Pro ~/D/F/web_profile> webdev serve --auto restart
[SEVERE] Deleted previous snapshot due to missing asset graph.
[INFO] Building new asset graph completed, took 1.3s
[INFO] Checking for unexpected pre-existing outputs. completed, took 1ms
[INFO] Starting resource servers...Unhandled exception:
SocketException: Failed to create server socket (OS Error: Address already in use, errno = 48), address = 127.0.0.1, port = 8080
#0 _NativeSocket.bind (dart:io-patch/socket_patch.dart:591:7)
<asynchronous suspension>
#1 _RawServerSocket.bind (dart:io-patch/socket_patch.dart:1206:26)
#2 _ServerSocket.bind (dart:io-patch/socket_patch.dart:1466:29)
#3 ServerSocket.bind (dart:io-patch/socket_patch.dart:1457:26)
#4 _HttpServer.bind (dart:_http/http_impl.dart:2520:25)
#5 HttpServer.bind (dart:_http:227:19)
#6 HttpMultiServer.loopback.<anonymous closure> (package:http_multi_server/http_multi_server.dart:113:39)
#7 HttpMultiServer._loopback (package:http_multi_server/http_multi_server.dart:172:30)
<asynchronous suspension>
#8 HttpMultiServer.loopback (package:http_multi_server/http_multi_server.dart:111:12)
#9 WebDevServer.start (package:webdev/src/serve/webdev_server.dart:83:33)
#10 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#11 WebDevServer.start (package:webdev/src/serve/webdev_server.dart:54:36)
#12 ServerManager.start (package:webdev/src/serve/server_manager.dart:22:38)
#13 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#14 ServerManager.start (package:webdev/src/serve/server_manager.dart:18:37)
#15 _startServerManager (package:webdev/src/serve/dev_workflow.dart:85:27)
#16 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:49:6)
#17 _startServerManager (package:webdev/src/serve/dev_workflow.dart:66:42)
#18 DevWorkflow.start (package:webdev/src/serve/dev_workflow.dart:186:31)
#19 _RootZone.runUnary (dart:async/zone.dart:1379:54)
#20 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#21 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#22 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
my attempts to solve this problem by force quit the dart process from activity monitor ,
but still i get same error
is there anyway to change the port number from 8080 to any ?
or anyway to change to port number automatically if given default port is not available ?
Short answer.
webdev serve web:8082
Where web is a directory name and 8082 is a port number.