docker-images-flutter icon indicating copy to clipboard operation
docker-images-flutter copied to clipboard

flutter test crash unexpectedly

Open intoxicated opened this issue 4 years ago • 4 comments

image worked fine 13 days ago but after recent update, I randomly get crash when I run my test on CI

Exception: the Dart compiler exited unexpectedly.
package:flutter_tools/src/base/common.dart 14:3                throwToolExit
package:flutter_tools/src/compile.dart 740:9                   DefaultResidentCompiler._compile.<fn>
package:stack_trace/src/stack_zone_specification.dart 126:26   StackZoneSpecification._registerUnaryCallback.<fn>.<fn>
package:stack_trace/src/stack_zone_specification.dart 208:15   StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 126:14   StackZoneSpecification._registerUnaryCallback.<fn>
dart:async/zone.dart 1198:47                                   _rootRunUnary
dart:async/zone.dart 1100:19                                   _CustomZone.runUnary
dart:async/future_impl.dart 143:18                             _FutureListener.handleValue
dart:async/future_impl.dart 696:45                             Future._propagateToListeners.handleValueCallback
dart:async/future_impl.dart 725:32                             Future._propagateToListeners
dart:async/future_impl.dart 529:5                              Future._completeWithValue
dart:async/future_impl.dart 567:7                              Future._asyncCompleteWithValue.<fn>
package:stack_trace/src/stack_zone_specification.dart 208:15   StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 116:48   StackZoneSpecification._registerCallback.<fn>
dart:async/zone.dart 1190:13                                   _rootRun
dart:async/zone.dart 1093:19                                   _CustomZone.run
dart:async/zone.dart 997:7                                     _CustomZone.runGuarded
dart:async/zone.dart 1037:23                                   _CustomZone.bindCallbackGuarded.<fn>
dart:async/schedule_microtask.dart 41:21                       _microtaskLoop
dart:async/schedule_microtask.dart 50:5                        _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 118:13                   _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 169:5                    _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async/zone.dart 1121:19                                   _CustomZone.registerUnaryCallback
dart:async/future_impl.dart 280:23                             Future.then
package:flutter_tools/src/compile.dart 738:32                  DefaultResidentCompiler._compile
===== asynchronous gap ===========================
dart:async/zone.dart 1121:19                                   _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 83:23                        _asyncThenWrapperHelper
package:flutter_tools/src/compile.dart 613:14                  DefaultResidentCompiler._recompile
package:flutter_tools/src/compile.dart 358:16                  _RecompileRequest._run
package:flutter_tools/src/compile.dart 336:30                  _CompilationRequest.run
package:flutter_tools/src/compile.dart 651:23                  DefaultResidentCompiler._handleCompilationRequest
package:stack_trace/src/stack_zone_specification.dart 126:26   StackZoneSpecification._registerUnaryCallback.<fn>.<fn>
package:stack_trace/src/stack_zone_specification.dart 208:15   StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 126:14   StackZoneSpecification._registerUnaryCallback.<fn>
dart:async/zone.dart 1198:47                                   _rootRunUnary
dart:async/zone.dart 1100:19                                   _CustomZone.runUnary
dart:async/zone.dart 1005:7                                    _CustomZone.runUnaryGuarded
dart:async/stream_impl.dart 357:11                             _BufferingStreamSubscription._sendData
dart:async/stream_impl.dart 611:14                             _DelayedData.perform
dart:async/stream_impl.dart 730:11                             _StreamImplEvents.handleNext
dart:async/stream_impl.dart 687:7                              _PendingEvents.schedule.<fn>
package:stack_trace/src/stack_zone_specification.dart 208:15   StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 116:48   StackZoneSpecification._registerCallback.<fn>
dart:async/zone.dart 1182:47                                   _rootRun
dart:async/zone.dart 1093:19                                   _CustomZone.run
dart:async/zone.dart 997:7                                     _CustomZone.runGuarded
dart:async/zone.dart 1037:23                                   _CustomZone.bindCallbackGuarded.<fn>
package:stack_trace/src/stack_zone_specification.dart 208:15   StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 116:48   StackZoneSpecification._registerCallback.<fn>
dart:async/zone.dart 1190:13                                   _rootRun
dart:async/zone.dart 1093:19                                   _CustomZone.run
dart:async/zone.dart 997:7                                     _CustomZone.runGuarded
dart:async/zone.dart 1037:23                                   _CustomZone.bindCallbackGuarded.<fn>
dart:async/schedule_microtask.dart 41:21                       _microtaskLoop
dart:async/schedule_microtask.dart 50:5                        _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 118:13                   _runPendingImmediateCallback
dart:isolate-patch/timer_impl.dart 404:11                      _Timer._runTimers
dart:isolate-patch/timer_impl.dart 428:5                       _Timer._handleMessage
dart:isolate-patch/isolate_patch.dart 168:12                   _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async/zone.dart 1121:19                                   _CustomZone.registerUnaryCallback
dart:async/stream_impl.dart 146:17                             _BufferingStreamSubscription._registerDataHandler
dart:async/stream_impl.dart 118:19                             new _BufferingStreamSubscription.zoned
dart:async/stream_impl.dart 113:14                             new _BufferingStreamSubscription
dart:async/stream_controller.dart 880:9                        new _ControllerSubscription
dart:async/stream_controller.dart 712:47                       _StreamController._subscribe
dart:async/stream_controller.dart 860:19                       _ControllerStream._createSubscription
dart:async/stream_impl.dart 493:9                              _StreamImpl.listen
package:flutter_tools/src/compile.dart 597:26                  DefaultResidentCompiler.recompile
package:flutter_tools/src/test/test_compiler.dart 158:60       TestCompiler._onCompilationRequest
===== asynchronous gap ===========================
dart:async/zone.dart 1121:19                                   _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 83:23                        _asyncThenWrapperHelper
package:stack_trace/src/stack_zone_specification.dart 126:26   StackZoneSpecification._registerUnaryCallback.<fn>.<fn>
package:stack_trace/src/stack_zone_specification.dart 208:15   StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 126:14   StackZoneSpecification._registerUnaryCallback.<fn>
dart:async/zone.dart 1198:47                                   _rootRunUnary
dart:async/zone.dart 1100:19                                   _CustomZone.runUnary
dart:async/zone.dart 1005:7                                    _CustomZone.runUnaryGuarded
dart:async/stream_impl.dart 357:11                             _BufferingStreamSubscription._sendData
dart:async/stream_impl.dart 611:14                             _DelayedData.perform
dart:async/stream_impl.dart 730:11                             _StreamImplEvents.handleNext
dart:async/stream_impl.dart 687:7                              _PendingEvents.schedule.<fn>
package:stack_trace/src/stack_zone_specification.dart 208:15   StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 116:48   StackZoneSpecification._registerCallback.<fn>
dart:async/zone.dart 1182:47                                   _rootRun
dart:async/zone.dart 1093:19                                   _CustomZone.run
dart:async/zone.dart 997:7                                     _CustomZone.runGuarded
dart:async/zone.dart 1037:23                                   _CustomZone.bindCallbackGuarded.<fn>
package:stack_trace/src/stack_zone_specification.dart 208:15   StackZoneSpecification._run
package:stack_trace/src/stack_zone_specification.dart 116:48   StackZoneSpecification._registerCallback.<fn>
dart:async/zone.dart 1190:13                                   _rootRun
dart:async/zone.dart 1093:19                                   _CustomZone.run
dart:async/zone.dart 997:7                                     _CustomZone.runGuarded
dart:async/zone.dart 1037:23                                   _CustomZone.bindCallbackGuarded.<fn>
dart:async/schedule_microtask.dart 41:21                       _microtaskLoop
dart:async/schedule_microtask.dart 50:5                        _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 118:13                   _runPendingImmediateCallback
dart:isolate-patch/timer_impl.dart 404:11                      _Timer._runTimers
dart:isolate-patch/timer_impl.dart 428:5                       _Timer._handleMessage
dart:isolate-patch/isolate_patch.dart 168:12                   _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async/zone.dart 1121:19                                   _CustomZone.registerUnaryCallback
dart:async/stream_impl.dart 146:17                             _BufferingStreamSubscription._registerDataHandler
dart:async/stream_impl.dart 118:19                             new _BufferingStreamSubscription.zoned
dart:async/stream_impl.dart 113:14                             new _BufferingStreamSubscription
dart:async/stream_controller.dart 880:9                        new _ControllerSubscription
dart:async/stream_controller.dart 712:47                       _StreamController._subscribe
dart:async/stream_controller.dart 860:19                       _ControllerStream._createSubscription
dart:async/stream_impl.dart 493:9                              _StreamImpl.listen
package:flutter_tools/src/test/test_compiler.dart 55:31        new TestCompiler
package:flutter_tools/src/test/flutter_platform.dart 446:22    FlutterPlatform._startTest
===== asynchronous gap ===========================
dart:async/zone.dart 1121:19                                   _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 83:23                        _asyncThenWrapperHelper
package:flutter_tools/src/test/flutter_platform.dart 349:36    FlutterPlatform.loadChannel
package:flutter_tools/src/test/flutter_platform.dart 302:46    FlutterPlatform.load
package:test_core/src/runner/loader.dart 224:38                Loader.loadFile.<fn>
===== asynchronous gap ===========================
dart:async/zone.dart 1121:19                                   _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 83:23                        _asyncThenWrapperHelper
package:test_core/src/runner/loader.dart                       Loader.loadFile.<fn>
package:test_core/src/runner/load_suite.dart 97:31             new LoadSuite.<fn>.<fn>
package:test_core/src/runner/load_suite.dart 107:8             new LoadSuite.<fn>
package:test_api/src/backend/invoker.dart 231:15               Invoker.waitForOutstandingCallbacks.<fn>
dart:async/zone.dart 1190:13                                   _rootRun
dart:async/zone.dart 1093:19                                   _CustomZone.run
dart:async/zone.dart 1630:10                                   _runZoned
dart:async/zone.dart 1550:10                                   runZoned
package:test_api/src/backend/invoker.dart 228:5                Invoker.waitForOutstandingCallbacks
package:test_api/src/backend/invoker.dart 383:17               Invoker._onRun.<fn>.<fn>.<fn>
===== asynchronous gap ===========================
dart:async/zone.dart 1121:19                                   _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 83:23                        _asyncThenWrapperHelper
package:test_api/src/backend/invoker.dart                      Invoker._onRun.<fn>.<fn>.<fn>
dart:async/zone.dart 1190:13                                   _rootRun
dart:async/zone.dart 1093:19                                   _CustomZone.run
dart:async/zone.dart 1630:10                                   _runZoned
dart:async/zone.dart 1550:10                                   runZoned
package:test_api/src/backend/invoker.dart 370:9                Invoker._onRun.<fn>.<fn>
dart:async/zone.dart 1190:13                                   _rootRun
dart:async/zone.dart 1093:19                                   _CustomZone.run
dart:async/zone.dart 1630:10                                   _runZoned
dart:async/zone.dart 1550:10                                   runZoned
package:test_api/src/backend/invoker.dart 150:7                Invoker.guard
package:test_api/src/backend/invoker.dart 413:15               Invoker._guardIfGuarded
package:test_api/src/backend/invoker.dart 369:7                Invoker._onRun.<fn>
package:stack_trace/src/chain.dart 104:24                      Chain.capture.<fn>
dart:async/zone.dart 1190:13                                   _rootRun
dart:async/zone.dart 1093:19                                   _CustomZone.run
dart:async/zone.dart 1630:10                                   _runZoned
dart:async/zone.dart 1550:10                                   runZoned
package:stack_trace/src/chain.dart 102:12                      Chain.capture
package:test_api/src/backend/invoker.dart 368:11               Invoker._onRun
package:test_api/src/backend/live_test_controller.dart 153:11  LiveTestController.run
dart:async/future.dart 201:37                                  new Future.microtask.<fn>
dart:async/zone.dart 1182:47                                   _rootRun
dart:async/zone.dart 1093:19                                   _CustomZone.run
dart:async/zone.dart 997:7                                     _CustomZone.runGuarded
dart:async/zone.dart 1037:23                                   _CustomZone.bindCallbackGuarded.<fn>
dart:async/zone.dart 1190:13                                   _rootRun
dart:async/zone.dart 1093:19                                   _CustomZone.run
dart:async/zone.dart 997:7                                     _CustomZone.runGuarded
dart:async/zone.dart 1037:23                                   _CustomZone.bindCallbackGuarded.<fn>
dart:async/schedule_microtask.dart 41:21                       _microtaskLoop
dart:async/schedule_microtask.dart 50:5                        _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 118:13                   _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 169:5                    _RawReceivePortImpl._handleMessage

any idea?

intoxicated avatar Jan 12 '21 20:01 intoxicated

If you have a reproducible example then it might a good issue for the upstream https://github.com/flutter/flutter repository

fkorotkov avatar Jan 12 '21 20:01 fkorotkov

weird thing is it works fine on local..

intoxicated avatar Jan 12 '21 22:01 intoxicated

Ok so I found that CI runs on linux and my local machine is mac os x. That's the only difference. Any idea what could possibly cause such problem?

intoxicated avatar Jan 16 '21 04:01 intoxicated

If you have Docker installed locally you can try to reproduce it locally via command like this:

docker run --rm -it -v ${PWD}:/build --workdir /build cirrusci/flutter:stable flutter test

fkorotkov avatar Jan 16 '21 16:01 fkorotkov

I'd close this issue, no recent activity.

cc @fkorotkov

bartekpacia avatar May 23 '24 11:05 bartekpacia