Skip to content
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

Cannot invoke "org.antlr.v4.runtime.Token.getText()" because "ctx.messageName" is null #26

Open
Kratos1013 opened this issue Jul 16, 2024 · 2 comments

Comments

@Kratos1013
Copy link

Hello!

I'm getting this type of error. It says like proto file contains an error. But my proto files has no error, because they can be generated with gradle tasks. Its giving error only in KMP

Task :composeApp:generateMPProtos FAILED
line 5:7 token recognition error at: '"google/'
line 5:23 token recognition error at: '/t'
line 5:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 5:39 token recognition error at: '";'
line 6:7 token recognition error at: '"google/'
line 6:23 token recognition error at: '/w'
line 6:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 6:38 token recognition error at: '";'
line 5:7 token recognition error at: '"google/'
line 5:23 token recognition error at: '/t'
line 5:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 5:39 token recognition error at: '";'
line 6:7 token recognition error at: '"google/'
line 6:23 token recognition error at: '/w'
line 6:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 6:38 token recognition error at: '";'
line 13:7 token recognition error at: '"vendors/'
line 13:23 token recognition error at: '-'
line 13:16 mismatched input 'vendors' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 13:35 token recognition error at: '";'
line 5:7 token recognition error at: '"google/'
line 5:23 token recognition error at: '/t'
line 5:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 5:39 token recognition error at: '";'
line 6:7 token recognition error at: '"google/'
line 6:23 token recognition error at: '/w'
line 6:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 6:38 token recognition error at: '";'
line 13:7 token recognition error at: '"vendor-'
line 13:23 token recognition error at: '/v'
line 13:15 mismatched input 'showcase' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 13:30 token recognition error at: '-'
line 13:39 token recognition error at: '-'
line 13:51 token recognition error at: '";'
line 5:7 token recognition error at: '"google/'
line 5:23 token recognition error at: '/t'
line 5:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 5:39 token recognition error at: '";'
line 6:7 token recognition error at: '"google/'
line 6:23 token recognition error at: '/w'
line 6:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 6:38 token recognition error at: '";'
line 5:7 token recognition error at: '"google/'
line 5:23 token recognition error at: '/t'
line 5:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 5:39 token recognition error at: '";'
line 6:7 token recognition error at: '"google/'
line 6:23 token recognition error at: '/w'
line 6:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 6:38 token recognition error at: '";'
line 5:7 token recognition error at: '"google/'
line 5:23 token recognition error at: '/t'
line 5:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 5:39 token recognition error at: '";'
line 6:7 token recognition error at: '"google/'
line 6:23 token recognition error at: '/w'
line 6:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 6:38 token recognition error at: '";'
line 5:7 token recognition error at: '"google/'
line 5:23 token recognition error at: '/t'
line 5:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 5:39 token recognition error at: '";'
line 6:7 token recognition error at: '"google/'
line 6:23 token recognition error at: '/w'
line 6:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 6:38 token recognition error at: '";'
line 13:7 token recognition error at: '"vendor-'
line 13:23 token recognition error at: '/v'
line 13:15 mismatched input 'showcase' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 13:30 token recognition error at: '-'
line 13:39 token recognition error at: '-'
line 13:51 token recognition error at: '";'
line 14:7 token recognition error at: '"vendors/'
line 14:23 token recognition error at: '-'
line 14:16 mismatched input 'vendors' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 14:35 token recognition error at: '";'
line 5:7 token recognition error at: '"google/'
line 5:23 token recognition error at: '/t'
line 5:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 5:39 token recognition error at: '";'
line 6:7 token recognition error at: '"google/'
line 6:23 token recognition error at: '/w'
line 6:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 6:38 token recognition error at: '";'
line 13:7 token recognition error at: '"showcase/'
line 13:25 token recognition error at: '-'
line 13:17 mismatched input 'showcase' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 13:37 token recognition error at: '";'
line 5:7 token recognition error at: '"google/'
line 5:23 token recognition error at: '/t'
line 5:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 5:39 token recognition error at: '";'
line 6:7 token recognition error at: '"google/'
line 6:23 token recognition error at: '/w'
line 6:15 mismatched input 'protobuf' expecting {'public', COMMENT_OR_WS, WS, VALUE_STRING}
line 6:38 token recognition error at: '";'
line 138:9 mismatched input 'message' expecting {COMMENT_OR_WS, EXPRESSION_NAME}
line 138:17 mismatched input '=' expecting {COMMENT_OR_WS, EXPRESSION_NAME}

@leroyramaphoko
Copy link

Hi @Kratos1013. Please check that you are not using the reserved keyword message as a field. That might be the reason why

@TimOrtel
Copy link
Owner

Can you post your proto file that has this error?

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

3 participants