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

fix: Add check for existing array before reading #2042

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marsv024
Copy link

When parsing a proto and handling oneofs there is no check if the array actually exists before reading it, causing the code to throw errors some times.

This change add a check if the oneoffsArray exist before trying to read it.

Seems to be the samme issue as described in: #1958

When parsing a proto and handling oneofs there is no check if the
array actually exists before reading it, causing the code to throw
errors some times.

This change add a check if the oneoffsArray exist before trying to
read it.
@josephharrington
Copy link

@sofisl Is this something you could help get merged and released? I found this open PR after we started running into this error as well, but I'm not sure who exactly to ping.

It seems to be much more likely to hit the indexOf error when using @grpc/proto-loader since that library uses the toDescriptor methods.

I added a minimal repro of the issue to #1958. I'm happy to add a regression test as well if it will help this get merged and released. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants