Flutter app crashes when I produce appbundle - flutter

From today, after updating the dependencies, when I build the app doing appbundle, crash (not making an apk)
I print the result with flutter build appbundle --verbose
Gradle build failed to produce an Android bundle package.
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:780:7)
#2 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#3 _rootRunUnary (dart:async/zone.dart:1132:38)
#4 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#7 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#8 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#9 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#10 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#11 runCommandAndStreamOutput (package:flutter_tools/src/base/process.dart)
#12 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#13 _rootRunUnary (dart:async/zone.dart:1132:38)
#14 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#15 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#16 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#17 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#18 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#19 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#20 _rootRun (dart:async/zone.dart:1124:13)
#21 _CustomZone.run (dart:async/zone.dart:1021:19)
#22 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#23 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#24 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#25 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#26 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#27 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)

Related

Dart Analysis server has terminated

I develop in Flutter for 1 year and suddenly I faced this error after launching IntelliJ IDEA. The Dart analysis has stopped to work. And only way to analyze code is via dart analyze lib/ that is so inconvenient.
Is there anyone who know what's causing this?
Dart analysis issue
Stack Overflow
Version information
Dart SDK 2.10.2
Dart IntelliJ 202.7319.5
IntelliJ IDEA 2020.2.3
Mac OS X 10.15.7
Details
Stack Overflow
#0 Driver._captureExceptions.errorFunction (package:analysis_server/src/server/driver.dart:732:7)
#1 _CustomZone.handleUncaughtError (dart:async/zone.dart:1076:19)
#2 _CustomZone.runGuarded (dart:async/zone.dart:999:7)
#3 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#4 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#5 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#6 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:125:20)
#7 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
#8 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:125:20)
#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
#10 _CustomZone.runGuarded (dart:async/zone.dart:1093:19)
#11 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#12 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#13 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#14 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:125:20)
#15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
#16 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#17 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#18 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#19 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#20 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#21 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#22 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#23 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#24 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#25 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#26 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#27 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#28 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#29 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#30 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#31 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#32 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#33 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
...
...
#4959 _File._fileForRelativeUri (package:analyzer/src/services/available_declarations.dart:1738:20)
#4960 _File.refresh (package:analyzer/src/services/available_declarations.dart:1213:19)
#4961 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#4962 _File._fileForRelativeUri (package:analyzer/src/services/available_declarations.dart:1738:20)
#4963 _File.refresh (package:analyzer/src/services/available_declarations.dart:1213:19)
#4964 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#4965 _File._fileForRelativeUri (package:analyzer/src/services/available_declarations.dart:1738:20)
#4966 _File.refresh (package:analyzer/src/services/available_declarations.dart:1213:19)
#4967 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#4968 _File._fileForRelativeUri (package:analyzer/src/services/available_declarations.dart:1738:20)
#4969 _File.refresh (package:analyzer/src/services/available_declarations.dart:1213:19)
#4970 DeclarationsTracker._getFileByPath (package:analyzer/src/services/available_declarations.dart:699:14)
#4971 DeclarationsTracker.doWork (package:analyzer/src/services/available_declarations.dart:601:18)
#4972 CompletionLibrariesWorker.performWork (package:analysis_server/src/domains/completion/available_suggestions.dart:302:13)
#4973 AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:1939:35)
#4974 _rootRunUnary (dart:async/zone.dart:1198:47)
#4975 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#4976 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#4977 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#4978 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#4979 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#4980 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#4981 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#4982 Monitor.signal (package:analyzer/src/dart/analysis/status.dart)
#4983 _rootRunUnary (dart:async/zone.dart:1198:47)
#4984 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#4985 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#4986 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#4987 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#4988 Future._addListener.<anonymous closure> (dart:async/future_impl.dart:393:9)
#4989 _rootRun (dart:async/zone.dart:1190:13)
#4990 _CustomZone.runGuarded (dart:async/zone.dart:1093:19)
#4991 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#4992 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#4993 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#4994 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:125:20)
#4995 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
And:
Dart analysis issue
Stack Overflow
Version information
Dart SDK 2.10.2
Dart IntelliJ 202.7319.5
IntelliJ IDEA 2020.2.3
Mac OS X 10.15.7
Details
Stack Overflow
#0 Driver._captureExceptions.errorFunction (package:analysis_server/src/server/driver.dart:732:7)
#1 _CustomZone.handleUncaughtError (dart:async/zone.dart:1076:19)
#2 _CustomZone.runGuarded (dart:async/zone.dart:999:7)
#3 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#4 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#5 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#6 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:125:20)
#7 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:428:5)
#8 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
#9 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:125:20)
#10 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:428:5)
#11 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
#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 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:125:20)
#17 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:428:5)
#18 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
#19 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#20 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#21 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#22 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#23 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#24 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#25 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#26 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#27 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#28 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#29 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#30 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#31 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#32 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#33 _File.refresh (package:analyzer/src/services/available_declarations.dart:1738:20)
#34 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
...
...
#4965 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#4966 _File._fileForRelativeUri (package:analyzer/src/services/available_declarations.dart:1738:20)
#4967 _File.refresh (package:analyzer/src/services/available_declarations.dart:1213:19)
#4968 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#4969 _File._fileForRelativeUri (package:analyzer/src/services/available_declarations.dart:1738:20)
#4970 _File.refresh (package:analyzer/src/services/available_declarations.dart:1213:19)
#4971 DeclarationsTracker._getFileByUri (package:analyzer/src/services/available_declarations.dart:713:14)
#4972 _File._fileForRelativeUri (package:analyzer/src/services/available_declarations.dart:1738:20)
#4973 _File.refresh (package:analyzer/src/services/available_declarations.dart:1213:19)
#4974 DeclarationsTracker._getFileByPath (package:analyzer/src/services/available_declarations.dart:699:14)
#4975 DeclarationsTracker.doWork (package:analyzer/src/services/available_declarations.dart:601:18)
#4976 CompletionLibrariesWorker.performWork (package:analysis_server/src/domains/completion/available_suggestions.dart:302:13)
#4977 AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:1939:35)
#4978 _rootRunUnary (dart:async/zone.dart:1198:47)
#4979 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#4980 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#4981 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#4982 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#4983 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#4984 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#4985 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#4986 Monitor.signal (package:analyzer/src/dart/analysis/status.dart)
#4987 _rootRunUnary (dart:async/zone.dart:1198:47)
#4988 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#4989 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#4990 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#4991 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#4992 Future._addListener.<anonymous closure> (dart:async/future_impl.dart:393:9)
#4993 _rootRun (dart:async/zone.dart:1190:13)
#4994 _CustomZone.run (dart:async/zone.dart:1093:19)
#4995 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#4996 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#4997 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#4998 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#4999 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:125:20)
#5000 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:428:5)
#5001 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
This helped me.
Deleting ~/.dartServer/.analysis-driver/ might be worth a try.
From: Alt+Enter stopped working for Dart files in IntelliJ
It is caused by Stack overflow in Dart Analyzer Server.

#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

Invalid argument(s): Cannot find executable for where.: flutter

I am tring to install and setup flutter by followig way
1. I downloaded flutter and unzip
2. Added path of flutter and bin folder in environment variable
3. Fire command flutter doctor
Then dart has been downloaded via command line and then i got error
Oops; flutter has exited unexpectedly: "Invalid argument(s): Cannot find executable for where.". Unable to generate crash report due to secondary error: Invalid argument(s): Cannot find executable for where.
please let us know at https://github.com/flutter/flutter/issues. Unhandled exception: ProcessExit: 1 #0 _handleToolError (package:flutter_tools/runner.dart:149:7) #1 _asyncErrorWrapperHelper.errorCallback (dart:async-patch/async_patch.dart:87:64) #2 _rootRunBinary (dart:async/zone.dart:1204:38) #3 _CustomZone.runBinary (dart:async/zone.dart:1093:19) #4 _FutureListener.handleError (dart:async/future_impl.dart:155:20) #5 Future._propagateToListeners.handleError (dart:async/future_impl.dart:694:47) #6 Future._propagateToListeners (dart:async/future_impl.dart:715:24) #7 Future._completeError (dart:async/future_impl.dart:534:5) #8 _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:43:15) #9 _informUserOfCrash (package:flutter_tools/runner.dart) #10 _asyncErrorWrapperHelper.errorCallback (dart:async-patch/async_patch.dart:87:64) #11 _rootRunBinary (dart:async/zone.dart:1204:38) #12 _CustomZone.runBinary (dart:async/zone.dart:1093:19) #13 _FutureListener.handleError (dart:async/future_impl.dart:155:20) #14 Future._propagateToListeners.handleError (dart:async/future_impl.dart:694:47) #15 Future._propagateToListeners (dart:async/future_impl.dart:715:24) #16 Future._completeError (dart:async/future_impl.dart:534:5) #17 _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:43:15) #18 _doctorText (package:flutter_tools/runner.dart) #19 _asyncErrorWrapperHelper.errorCallback (dart:async-patch/async_patch.dart:87:64) #20 _rootRunBinary (dart:async/zone.dart:1204:38) #21 _CustomZone.runBinary (dart:async/zone.dart:1093:19) #22 _FutureListener.handleError (dart:async/future_impl.dart:155:20) #23 Future._propagateToListeners.handleError (dart:async/future_impl.dart:694:47) #24 Future._propagateToListeners (dart:async/future_impl.dart:715:24) #25 Future._completeError (dart:async/future_impl.dart:534:5) #26 _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:43:15) #27 AppContext.run (package:flutter_tools/src/base/context.dart) #28 _asyncErrorWrapperHelper.errorCallback (dart:async-patch/async_patch.dart:87:64) #29 _rootRunBinary (dart:async/zone.dart:1204:38) #30 _CustomZone.runBinary (dart:async/zone.dart:1093:19) #31 _FutureListener.handleError (dart:async/future_impl.dart:155:20) #32 Future._propagateToListeners.handleError (dart:async/future_impl.dart:694:47) #33 Future._propagateToListeners (dart:async/future_impl.dart:715:24) #34 Future._completeError (dart:async/future_impl.dart:534:5) #35 _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:43:15) #36 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart) #37 _asyncErrorWrapperHelper.errorCallback (dart:async-patch/async_patch.dart:87:64) #38 _rootRunBinary (dart:async/zone.dart:1204:38) #39 _CustomZone.runBinary (dart:async/zone.dart:1093:19) #40 _FutureListener.handleError (dart:async/future_impl.dart:155:20) #41 Future._propagateToListeners.handleError (dart:async/future_impl.dart:694:47) #42 Future._propagateToListeners (dart:async/future_impl.dart:715:24) #43 Future._completeError (dart:async/future_impl.dart:534:5) #44 Future._asyncCompleteError.<anonymous closure> (dart:async/future_impl.dart:582:7) #45 _rootRun (dart:async/zone.dart:1184:13) #46 _CustomZone.run (dart:async/zone.dart:1077:19) #47 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1003:23) #48 _microtaskLoop (dart:async/schedule_microtask.dart:43:21) #49 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5) #50 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13) #51 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:405:11) #52 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5) #53 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
I solved the issue by following 3 steps,
first step:- you need to disabled your virus guard,
second step:- you should remove cache folder entirely (it is located in ex:- 'C:\flutter\bin\cache')
Run 'Flutter Doctor' which would download all artifacts again
You have to install git and then restart your editors and your device

why does flutter desktop-embedding throw an error on build?

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

flutter desktop build fails with `com.apple.xcode.tools.swift.compiler`

I try to build and run flutter for desktop and I get the bellow error when I use ~/dev/flutter/bin/flutter run -v
Objects-normal/x86_64/GeneratedPluginRegistrant~partial.swiftmodule -emit-dependencies-path
/Users/myuser/tmp/flutter-desktop-embedding/example/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/
Objects-normal/x86_64/GeneratedPluginRegistrant.d -emit-reference-dependencies-path
/Users/myuser/tmp/flutter-desktop-embedding/example/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/
Objects-normal/x86_64/GeneratedPluginRegistrant.swiftdeps -o
/Users/myuser/tmp/flutter-desktop-embedding/example/build/macos/Build/Intermediates.noindex/Runner.build/Debug/Runner.build/
Objects-normal/x86_64/GeneratedPluginRegistrant.o
[ +27 ms] ** BUILD FAILED **
[ +3 ms] The following build commands failed:
[ ] CompileSwift normal x86_64 /Users/myuser/tmp/flutter-desktop-embedding/example/macos/ExampleWindow.swift
[ ] CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
[ ] (2 failures)
[ +16 ms] Building macOS application... (completed in 10.1s)
[ +10 ms] "flutter run" took 11,052ms.
Build process failed
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 buildMacOS (package:flutter_tools/src/macos/build_macos.dart:85:5)
<asynchronous suspension>
#2 MacOSDevice.startApp (package:flutter_tools/src/macos/macos_device.dart:86:13)
<asynchronous suspension>
#3 FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:378:54)
<asynchronous suspension>
#4 HotRunner.run (package:flutter_tools/src/run_hot.dart:254:39)
<asynchronous suspension>
#5 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:472:37)
<asynchronous suspension>
#6 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:490:18)
#7 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#8 _rootRunUnary (dart:async/zone.dart:1132:38)
#9 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#10 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#11 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#12 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#13 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#14 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#15 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#16 RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#17 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#18 _rootRunUnary (dart:async/zone.dart:1132:38)
#19 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#20 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#21 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#22 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#23 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#24 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#25 _rootRun (dart:async/zone.dart:1124:13)
#26 _CustomZone.run (dart:async/zone.dart:1021:19)
#27 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#28 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#29 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#30 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#31 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#32 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
This is how i setup the desktop:
~/dev/flutter/bin/flutter channel master
~/dev/flutter/bin/flutter upgrade
~/dev/flutter/bin/flutter doctor
export ENABLE_FLUTTER_DESKTOP=true
~/dev/flutter/bin/flutter devices
~/dev/flutter/bin/flutter packages get
~/dev/flutter/bin/flutter precache --macos
The example i'm trying to run:
https://github.com/google/flutter-desktop-embedding.git