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

runLookupWithFollowup has a trace with invalid utf-8 attribute #858

Closed
MichaelMure opened this issue Jul 18, 2023 · 0 comments · Fixed by #859
Closed

runLookupWithFollowup has a trace with invalid utf-8 attribute #858

MichaelMure opened this issue Jul 18, 2023 · 0 comments · Fixed by #859

Comments

@MichaelMure
Copy link
Contributor

... and that make OpenTelemetry (in particular the GRCP exporter) unhappy:

traces export: rpc error: code = Internal desc = grpc: error while marshaling: string field contains invalid UTF-8

Tracking that down, I found that runLookupWithFollowup add a target attribute as string: https://github.com/libp2p/go-libp2p-kad-dht/blob/master/query.go#L84

However, that target is a DHT key (binary) cast here as a string. It's not valid utf-8.

A simple fix would be to b58 encode that value again.

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 a pull request may close this issue.

1 participant