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

when "repeated field items has nil element" occur, protobuf send data will timeout #307

Closed
wednesdaysunny opened this issue Mar 10, 2017 · 6 comments

Comments

@wednesdaysunny
Copy link

Hello:
when I set response a array, and array has only on element, and this element is nil, it will occur "repeated field items has nil element" error, and when this error occur, protobuf send data will timeout, can you help me?
Thank you very much.

@rvegas
Copy link

rvegas commented Sep 25, 2017

I have the same problem, did you find a solution?

@metrue
Copy link

metrue commented Dec 22, 2017

@wednesdaysunny You may need to post out your source then people can see what's going on here?

@dsnet
Copy link
Member

dsnet commented Feb 14, 2018

Closing issue as stale. There is insufficient information to address this. If you have a reproduction, file a new issue. Thanks.

@dsnet dsnet closed this as completed Feb 14, 2018
@ryanking8215
Copy link

I had the same problem.

I built a sample at https://github.com/ryanking8215/pb_nil_element

@neild
Copy link
Contributor

neild commented Oct 17, 2019

Repeated fields aren't allowed to contain nil messages, and many operations (Marshal, probably others) will panic if they encounter one.

The v2 API does permit nil values in repeated message fields, but until it is released you'll need to avoid them.

@calthomson
Copy link

@neild

The v2 API does permit nil values in repeated message fields, but until it is released you'll need to avoid them.

Is there documentation about that change somewhere, like a roadmap?

@golang golang locked and limited conversation to collaborators Jun 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants