dart-lang / webdev

A CLI for Dart web development.
https://pub.dev/packages/webdev
212 stars 75 forks source link

NoSuchMethodError: Closure call with mismatched argument #1046

Open jonahwilliams opened 4 years ago

jonahwilliams commented 4 years ago

Original issue: https://github.com/flutter/flutter/issues/59245

This is on dwds: 3.1.1

NoSuchMethodError: NoSuchMethodError: Closure call with mismatched arguments: function 'MutablePackageTree.allPackages'
Receiver: Closure: (_SyncIterator) => bool
Tried calling: MutablePackageTree.allPackages()
Found: MutablePackageTree.allPackages(_SyncIterator) => bool

#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      _SyncIterable.iterator (dart:core-patch/core_patch.dart:117:45)
#2      new SimplePackageConfig (package:package_config/src/package_config_impl.dart:26:36)
#3      parsePackageConfigJson (package:package_config/src/package_config_json.dart:213:10)
#4      parsePackageConfigBytes (package:package_config/src/package_config_json.dart:45:10)
#5      readAnyConfigFile (package:package_config/src/package_config_io.dart:55:18)
<asynchronous suspension>
#6      readAnyConfigFileUri (package:package_config/src/package_config_io.dart:76:14)
#7      loadPackageConfigUri (package:package_config/package_config.dart:88:5)
#8      DartUri._loadPackageConfig (package:dwds/src/utilities/dart_uri.dart:35:30)
#9      DartUri.recordAbsoluteUris (package:dwds/src/utilities/dart_uri.dart:57:13)
#10     AppInspector._initialize (package:dwds/src/debugging/inspector.dart:87:19)
<asynchronous suspension>
#11     AppInspector.initialize (package:dwds/src/debugging/inspector.dart:145:24)
#12     ChromeProxyService.createIsolate (package:dwds/src/services/chrome_proxy_service.dart:165:37)
<asynchronous suspension>
#13     ChromeProxyService.create (package:dwds/src/services/chrome_proxy_service.dart:133:23)
#14     DebugService.start (package:dwds/src/services/debug_service.dart:140:55)
#15     DevHandler._startLocalDebugService (package:dwds/src/handlers/dev_handler.dart:156:25)
#16     _rootRunUnary (dart:async/zone.dart:1198:47)
#17     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#18     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#19     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#20     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#21     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#22     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#23     _rootRun (dart:async/zone.dart:1190:13)
#24     _CustomZone.run (dart:async/zone.dart:1093:19)
#25     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#26     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#27     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#28     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#29     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#30     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
devoncarew commented 4 years ago

I believe this is a dup of https://github.com/dart-lang/sdk/issues/41913.

wayne-werner commented 4 years ago

I don't know if this is any help, but I was getting this error as well today. After flutter pub run build_runner clean and rerunning, the problem went away.