Skip to content

NoSuchMethodError: Closure call with mismatched arguments: function '_memberNamesSuffix' #377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hjlp20150803 opened this issue Jun 5, 2020 · 3 comments

Comments

@hjlp20150803
Copy link

I think this should be a bug, cause the same proto file is good when I use '$ protoc ./test.proto --go_out=grpc:./dart',but it's wrong with '$ protoc ./test.proto --dart_out=grpc:./dart'.

The problem should be here:
'string Create=11;',
it's good when I change it to
'string Create0=11;'

I am not sure if the 'Create' is the protected word.

$ pub --version
Pub 2.8.4

$ dart --version
Dart VM version: 2.9.0-13.0.dev.flutter-54adfeb93f (be) (Tue Jun 2 18:40:43 2020 +0000) on "macos_x64"

$ brew info dart
dart-lang/dart/dart: stable 2.8.4, devel 2.9.0-13.0.dev
The Dart SDK
https://dart.dev
Conflicts with:
  dart-beta (because dart-beta ships the same binaries)
/usr/local/Cellar/dart/2.8.4 (502 files, 486MB) *
  Built from source on 2020-06-05 at 09:50:05
From: https://github.com/dart-lang/homebrew-dart/blob/master/dart.rb
==> Options
--devel
	Install development version 2.9.0-13.0.dev
==> Caveats
Please note the path to the Dart SDK:
  /usr/local/opt/dart/libexec

test.proto:
syntax = "proto3";

package bridge;
//protoc-c --c_cout=.  *.proto
//protoc --go_out=. *.proto 
//protoc --dart_out=. *.proto

message AccessTime{
	string          Access=9;
	string          Write=10;
	string          Create=11;
}

$ protoc  ./test.proto --dart_out=grpc:./dart
Unhandled exception:
NoSuchMethodError: Closure call with mismatched arguments: function '_memberNamesSuffix'
Receiver: Closure: (_SyncIterator<String>) => bool
Tried calling: _memberNamesSuffix()
Found: _memberNamesSuffix(_SyncIterator<String>) => bool
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      _SyncIterable.iterator (dart:core-patch/core_patch.dart:117:45)
#2      disambiguateName (package:protoc_plugin/names.dart:166:27)
#3      _unusedMemberNames (package:protoc_plugin/names.dart:419:17)
#4      messageMemberNames (package:protoc_plugin/names.dart:291:11)
#5      MessageGenerator.resolve (package:protoc_plugin/message_generator.dart:187:27)
#6      FileGenerator.resolve (package:protoc_plugin/file_generator.dart:183:9)
#7      link (package:protoc_plugin/linker.dart:24:7)
#8      CodeGenerator.generate.<anonymous closure> (package:protoc_plugin/code_generator.dart:92:7)
#9      _RootZone.runUnary (dart:async/zone.dart:1450:54)
#10     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#11     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#12     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#13     Future._complete (dart:async/future_impl.dart:519:7)
#14     Stream.fold.<anonymous closure> (dart:async/stream.dart:776:14)
#15     _RootZone.runGuarded (dart:async/zone.dart:1372:10)
#16     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:410:13)
#17     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:420:15)
#18     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:305:7)
#19     _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:792:19)
#20     _StreamController._closeUnchecked (dart:async/stream_controller.dart:644:7)
#21     _StreamController.close (dart:async/stream_controller.dart:637:5)
#22     _Socket._onData (dart:io-patch/socket_patch.dart:2027:21)
#23     _RootZone.runUnaryGuarded (dart:async/zone.dart:1384:10)
#24     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
#25     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
#26     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784:19)
#27     _StreamController._add (dart:async/stream_controller.dart:655:7)
#28     _StreamController.add (dart:async/stream_controller.dart:597:5)
#29     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1563:35)
#30     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1045:18)
#31     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#32     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#33     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#34     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
--dart_out: protoc-gen-dart: Plugin failed with status code 255.
@osa1
Copy link
Member

osa1 commented May 11, 2022

I couldn't reproduce this, but from the description it looks similar to #159.

@hjlp20150803
Copy link
Author

hjlp20150803 commented May 11, 2022 via email

@osa1
Copy link
Member

osa1 commented Aug 5, 2022

I couldn't reproduce this, but from the description it looks similar to #159.

Looking at this again, this looks nothing like #159..

In any case, I tried to reproduce this again today, and it works, so closing this issue. If the problem persists on your end please try again with the latest protobuf and protoc_plugin.

@osa1 osa1 closed this as completed Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants