Dart migration error: RangeError (index): Invalid value: Not in inclusive range 0..12: 13 #0 List.[] (dart:core-patch/array.dart:268:52) - flutter

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

Related

Flutter cannot be apgraded anymore

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.

#Flutter the Dart compiler exited unexpectedly

While running my flutter app, it works fine but after sometimes I'm getting the error below:
the Dart compiler exited unexpectedly.
#0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1 DefaultResidentCompiler._compile.<anonymous closure> (package:flutter_tools/src/compile.dart:771:13)
#2 _rootRun (dart:async/zone.dart:1180:38)
#3 _CustomZone.run (dart:async/zone.dart:1077:19)
#4 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#5 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#6 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:15)
#7 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:286:7)
#8 _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:98:11)
#9 _EventSinkWrapper.close (dart:async/stream_transformers.dart:25:11)
#10 _StringAdapterSink.close (dart:convert/string_conversion.dart:251:11)
#11 _LineSplitterSink.close (dart:convert/line_splitter.dart:136:11)
#12 _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:143:24)
#13 _rootRun (dart:async/zone.dart:1180:38)
#14 _CustomZone.run (dart:async/zone.dart:1077:19)
#15 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#16 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#17 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:15)
#18 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:286:7)
#19 _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:98:11)
#20 _EventSinkWrapper.close (dart:async/stream_transformers.dart:25:11)
#21 _StringAdapterSink.close (dart:convert/string_conversion.dart:251:11)
#22 _Utf8ConversionSink.close (dart:convert/string_conversion.dart:302:20)
#23 _ConverterStreamEventSink.close (dart:convert/chunked_conversion.dart:83:18)
#24 _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:143:24)
#25 _rootRun (dart:async/zone.dart:1180:38)
#26 _CustomZone.run (dart:async/zone.dart:1077:19)
#27 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#28 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:392:13)
#29 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:402:15)
#30 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:286:7)
#31 _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:787:19)
#32 _StreamController._closeUnchecked (dart:async/stream_controller.dart:644:7)
#33 _StreamController.close (dart:async/stream_controller.dart:637:5)
#34 _Socket._onData (dart:io-patch/socket_patch.dart:1989:21)
#35 _rootRunUnary (dart:async/zone.dart:1196:13)
#36 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#37 _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
#38 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#39 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:266:7)
#40 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:779:19)
#41 _StreamController._add (dart:async/stream_controller.dart:655:7)
#42 _StreamController.add (dart:async/stream_controller.dart:597:5)
#43 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1534:35)
#44 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1012:18)
#45 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#46 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#47 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#48 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
[{"event":"app.stop","params":{"appId":"68806365-e542-4635-9e22-33f15caa4633"}}]
Flutter doctor: Doctor no issues found
classpath 'com.android.tools.build:gradle:3.6.2'
classpath 'com.google.gms:google-services:4.3.3'
Anyone knows how to solve this? Help please.
I had the following error and the only way I fixed it was by just doing as follows:
flutter clean

Flutter Installation failed

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

failed to create local server ( address already in use ) when trying to serve flutter_web project

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.

flutter doctor throwing Unhandled exception on Mac OS X 10.14.3

Everything works fine except the flutter doctor command
I really don't know what it could be. Any help?
Command
flutter doctor
Exception
Victors-MacBook-Pro:police_videos victoraldir$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.2.1, on Mac OS X 10.14.3 18D109, locale en-IE)
⣽Unhandled exception:
RangeError (index): Invalid value: Only valid value is 0: 1
#0 List.[] (dart:core/runtime/libgrowable_array.dart:145:60)
#1 IntelliJValidatorOnMac.pluginsPath (package:flutter_tools/src/doctor.dart:681:31)
#2 IntelliJValidator.validate (package:flutter_tools/src/doctor.dart:524:53)
<asynchronous suspension>
#3 Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:116:52)
#4 Doctor.diagnose (package:flutter_tools/src/doctor.dart:189:41)
#5 _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#6 Doctor.diagnose (package:flutter_tools/src/doctor.dart:179:24)
#7 DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:48:39)
#8 _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#9 DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:34:42)
#10 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:545:18)
#11 _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#12 _rootRunUnary (dart:async/zone.dart:1132:38)
#13 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#14 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#15 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#16 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#17 Future._complete (dart:async/future_impl.dart:473:7)
#18 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#19 _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#20 _rootRun (dart:async/zone.dart:1124:13)
#21 _CustomZone.run (dart:async/zone.dart:1021:19)
#22 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#23 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#24 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#25 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#26 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
Turns out that I had a corrupted installation of IntelliJ (not Android Studio) hanging in my environment. Removed it completely and the problem has gone away