dart-lang / dart-lang/webdev

NoSuchMethodError: Closure call with mismatched argument

Open
#1,046 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
224
Forks
94
Avg merge
7h 14m
Merged PRs (30d)
2

Description

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)

#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)

#11 AppInspector.initialize (package:dwds/src/debugging/inspector.dart:145:24)
#12 ChromeProxyService.createIsolate (package:dwds/src/services/chrome_proxy_service.dart:165:37)

#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. (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. (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)
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with dwds 3.1.1, then trace package_config/src/package_config_impl.dart through package_config_json.dart and dwds/src/utilities/dart_uri.dart into AppInspector._initialize. Confirm the package configuration can be loaded without the mismatched-argument NoSuchMethodError during inspector initialization.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.