-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Failing to parse a valid descriptor generated for message with a few enums #4514
Comments
Now I added another enum to that same proto, and now I'm getting the same InvalidProtocolBufferException but it disappears if I remove the "ignored" variable. What's more weird, I took the descriptor proto literal from the generated code and dumped it to disk, and protoc --decode_raw is able to decode it. Programmatically decoding it from other places in my project also works. I wonder if this has something to do with shading - is there much reflection magic going on? At the least, more informative error messages would help ("Protocol message end-group tag did not match expected tag." gives no information as to where this is happening in the stream, or even what is the expected and actual tag). |
@jkff Sorry for taking such a long time to reply to this--are you still running into this problem? I wonder if it's potentially caused by a mismatch between the |
I've run into this problem both times when I tried to modify this proto, but both times was able to work around it (in first case adding a bogus field, second removing it back). I haven't run into it since then, but something is clearly quite broken here. If there's currently too little information to provide a real fix, a good first step would be to improve the proto parsing error messages (like "Protocol message end-group tag did not match expected tag.") so that next time someone hits this they are able to provide more information. |
Doesn't seem to have bothered anyone for multiple releases and I haven't been able to reproduce this so I'm going to close this. Not sure what was happening here but it seems to have been fixed sometime in the last several years. If it reoccurs or there's a full reproduction available, please comment and I'll reopen and take another look. |
Encountered this issue while working on apache/beam#4672 . I haven't had time to create a minimal self-contained reproducible example, but the gist of the issue is as follows.
I have a message that looks like this:
Accessing
Foo
from code results in an error parsing theFoo
generated descriptor.Adding a bogus field to
Foo
solves the problem:Below is a paste of the error I got with the actual message (
StandardPTransforms
in the PR linked above, inmodel/pipeline/src/main/proto/beam_runner_api.proto
)The text was updated successfully, but these errors were encountered: