-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
map doesn't work for empty values #960
Comments
Usually, when a wild wire type 6 appears, the binary data has been corrupted somehow. Are you sure this is not related to this? |
Yeah I'm already using arraybuffer as advised. |
Do you have a (hex) dump of such an erroring buffer? Ideally a minimal one, just showing the issue. |
I tested with a few minimal examples. a
I just put key="testKey" with value="" in the map for testing. I'm getting
I guess it might be related to #845 |
I'm getting the same result with a |
From a first look it seems the encoder is omitting the empty value string in C#, while the decoder expects both key and value to be present. As you said, most likely related to #845 Do you also get an error when all keys and values are non-empty? |
No I'm not getting the error when keys and values are non-empty. |
@dcodeIO I keep encountering this bug. A fix is ready to merge - did you get a chance to look at it? |
What is the fix ? Do you mean
#1087
?
…On Tue, Jul 17, 2018, 19:01 Anna Kosieradzka ***@***.***> wrote:
@dcodeIO <https://github.com/dcodeIO> I keep encountering this bug.
A fix is ready to merge - did you get a chance to look at it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#960 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACPN_sHQ1leKD4f0gHYqqfsmP5zxR4Qiks5uHhiAgaJpZM4Q7Ho8>
.
|
I was thinking of #845 , but whichever does the job is fine by me. |
Ah yeah ok.
I'm also still interested by a fix for this.
This is a blocker to use protobuf generated by c# backends.
…On Wed, Jul 18, 2018, 12:46 Anna Kosieradzka ***@***.***> wrote:
I was thinking of #845 <#845>
, but whichever does the job is fine by me.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#960 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACPN_rnAxLxteLP4DzQvWZHhXeeIRi2Eks5uHxIJgaJpZM4Q7Ho8>
.
|
Up! Any plans to have a fix for this? It is two years after it was found and it is still reproducible. Both pull requests seem to be absolutely ignored |
check these data, when the value is 0 in the map, that value is skipped.
And I check the static js generated. The decoder moves the pointer forward when the value is zero, which makes mistake.
|
All - what is happening with this? I am affected by the issue too. It doesn't appear that a fix for it has been committed - can anyone clarify? |
I can confirm that #1087 fixes this issue, and I would be very happy about a merge. |
@dcodeIO @alexander-fenster any plans to merge the fix for this issue? |
+1 for this - it is quite a serious bug and I would be delighted to see it fixed. I can confirm that #1348 does indeed fix this. |
IMHO it's about time to merge the fix |
@bcoe / @dcodeIO / @alexander-fenster - would you kindly consider this? I would be absolutely delighted beyond belief to see this merged. Thank you so much! |
protobuf.js version: 6.8.3
protobuf.js throws an error when trying to decode any map encoded using google's protobuf for c#
The text was updated successfully, but these errors were encountered: