bitwalker / bitwalker/exprotobuf

invalid encoding starting at

Open
#86 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
482
Forks
68
PR merge metrics
No merged PRs in 30d

Description

I'm getting the following error when loading the proto file attached:

`** (UnicodeConversionError) invalid encoding starting at <<154, 179, 139, 210, 5, 18, 200, 5, 10, 5, 84, 49, 48, 48, 49, 16, 0, 26, 188, 5, 10, 32, 10, 3, 49, 50, 49, 18, 8, 49, 51, 58, 53, 56, 58, 48, 48, 26, 8, 50, 48, 49, 55, 49, 50, 50, 54, 32, 0, 42, ...>>
(elixir) lib/string.ex:1840: String.to_charlist/1
lib/exprotobuf/parser.ex:41: Protobuf.Parser.parse/2
lib/exprotobuf/parser.ex:55: Protobuf.Parser.parse!/2
lib/exprotobuf/parser.ex:10: anonymous fn/3 in Protobuf.Parser.parse_files!/2
(elixir) lib/enum.ex:1826: Enum."-reduce/3-lists^foldl/2-0-"/3
lib/exprotobuf/parser.ex:8: Protobuf.Parser.parse_files!/2
lib/exprotobuf.ex:80: Protobuf.parse/2
expanding macro: Protobuf.__using__/1...`

I was able to load the proto file in a sample java protobuf reader to ensure that the file is in the right format. Not sure if I'm missing a config parameter.

[GTFSDATAFILE_1514312552253.proto.zip](https://github.com/bitwalker/exprotobuf/files/1593746/GTFSDATAFILE_1514312552253.proto.zip)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with the attached GTFSDATAFILE_1514312552253.proto.zip, then read lib/exprotobuf/parser.ex and the Protobuf.parse entry point in lib/exprotobuf.ex. Trace why parsing reaches String.to_charlist/1 for this file and define done as successfully parsing the valid proto without UnicodeConversionError.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.