Getting build error from Dart, NoSuchMethodError: incorrect number of arguments passed to method named '_greaterThanFromInteger@0x36924d72'

StackOverflow https://stackoverflow.com/questions/23391650

  •  12-07-2023
  •  | 
  •  

Question

My dart application runs normally when I run it from the debugger, now I have decided to build to get the Javascript built, I get this strange build error and I have no idea.

I have not built for a long time as I was just running from the debugger. How can I try to find out what is causing the error? I can try to comment out code I guess until the error goes away, but that's going to be tedious.

Here is a pastebin of entire build.

Build error:
Transform InlineCodeExtractor on minuteheet|web/minuteheet.html threw error: Closure call with mismatched arguments: function '_greaterThanFromInteger@0x36924d72'

NoSuchMethodError: incorrect number of arguments passed to method named '_greaterThanFromInteger@0x36924d72'
Receiver: Closure: () => int from Function 'length':.
Tried calling: _greaterThanFromInteger@0x36924d72(0)
Found: _greaterThanFromInteger@0x36924d72()
dart:core-patch/object_patch.dart 45                                         Object.noSuchMethod
dart:core-patch/integers.dart 75                                             int.>
dart:core-patch/integers.dart 78                                             int.>=
http://127.0.0.1:50622/packages/analyzer/src/generated/scanner.dart 496:25   CharSequenceReader.advance
http://127.0.0.1:50622/packages/analyzer/src/generated/scanner.dart 904:33   Scanner.tokenize
http://127.0.0.1:50622/packages/analyzer/src/generated/scanner.dart 912:7    Scanner.tokenize
http://127.0.0.1:50622/packages/analyzer/src/generated/scanner.dart 912:7    Scanner.tokenize
http://127.0.0.1:50622/packages/polymer/src/build/code_extractor.dart 78:31  _hasLibraryDirective
http://127.0.0.1:50622/packages/polymer/src/build/code_extractor.dart 58:34  InlineCodeExtractor.apply.<fn>
dart:async/zone.dart 730                                                     _rootRunUnary
dart:async/zone.dart 864                                                     _RootZone.runUnary
dart:async/future_impl.dart 488                                              _Future._propagateToListeners.handleValueCallback
dart:async/future_impl.dart 571                                              _Future._propagateToListeners
dart:async/future_impl.dart 331                                              _Future._completeWithValue
dart:async/future_impl.dart 393                                              _Future._asyncComplete.<fn>
dart:async/schedule_microtask.dart 1                                         _AsyncCallbackEntry.callback
dart:async/schedule_microtask.dart 23                                        _asyncRunCallbackLoop
dart:async/schedule_microtask.dart 32                                        _asyncRunCallback
dart:isolate-patch/isolate_patch.dart 119                                    _RawReceivePortImpl._handleMessage

dart:core                                                                    int.>=
http://127.0.0.1:50622/packages/analyzer/src/generated/scanner.dart 496:25   CharSequenceReader.advance
http://127.0.0.1:50622/packages/analyzer/src/generated/scanner.dart 904:33   Scanner.tokenize
http://127.0.0.1:50622/packages/analyzer/src/generated/scanner.dart 912:7    Scanner.tokenize
http://127.0.0.1:50622/packages/analyzer/src/generated/scanner.dart 912:7    Scanner.tokenize
http://127.0.0.1:50622/packages/polymer/src/build/code_extractor.dart 78:31  _hasLibraryDirective
http://127.0.0.1:50622/packages/polymer/src/build/code_extractor.dart 58:34  InlineCodeExtractor.apply.<fn>
dart:isolate                                                                 _RawReceivePortImpl._handleMessage
[Warning from _Serial on minuteheet|web/main.dart with input minuteheet|lib/components/menu_component.dart]:
package:minuteheet/components/menu_component.dart:7:1: Unable to find ../lib/components/menu.html at minuteheet|../lib/components/menu.html
Was it helpful?

Solution

Removing dart polymer made the error go away.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top