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

Trouble Parsing Enums #565

Closed
griffnb opened this issue Dec 16, 2016 · 2 comments
Closed

Trouble Parsing Enums #565

griffnb opened this issue Dec 16, 2016 · 2 comments
Labels

Comments

@griffnb
Copy link

griffnb commented Dec 16, 2016

protobuf.js version: 6.2.0

Protobuff is failing to parse prototype files that are included. They are standard files and parsed fine before version 6.0
prototypeFiles.zip

// Decode the Message
 ProtoBuf.load('beeswax/bid/request.proto').then(root=>{
     var BidAgentRequest = root.lookup('bid.BidAgentRequest');
     console.log(BidAgentRequest);
}).catch(e=>{
    console.trace(e);
 })
failed to load Error: illegal name ';' (line 448)
    at Error (native)
    at illegal (/Users/xxxx/node_modules/protobufjs/src/parse.js:67:16)
    at parseEnumField (/Users/xxxx/node_modules/protobufjs/src/parse.js:342:19)
    at parseEnum (/Users/xxxx/node_modules/protobufjs/src/parse.js:332:21)
    at parseCommon (/Usersxxxxs/CoreNodeServe/node_modules/protobufjs/src/parse.js:207:17)
    at parseType (/Users/xxxxx/node_modules/protobufjs/src/parse.js:229:21)
    at parseCommon (/Users/xxxx/node_modules/protobufjs/src/parse.js:203:17)
    at parseType (/Users/xxxxx/node_modules/protobufjs/src/parse.js:229:21)
    at parseCommon (/Users/xxxxxxx/node_modules/protobufjs/src/parse.js:203:17)
    at parseType (/Users/xxxxxxx/node_modules/protobufjs/src/parse.js:229:21)
    at parseCommon (/Users/xxxxx/node_modules/protobufjs/src/parse.js:203:17)
    at parse (/Users/xxxxxxx/node_modules/protobufjs/src/parse.js:526:21)
    at process (/Users/xxxxxxxxnode_modules/protobufjs/src/root.js:92:48)
    at /Users/xxxxxxxxxxx/node_modules/protobufjs/src/root.js:162:17
    at fetchReadFileCallback (/Users/xxxxxxx/node_modules/@protobufjs/fetch/index.js:30:19)
@dcodeIO dcodeIO added the bug label Dec 17, 2016
@dcodeIO
Copy link
Member

dcodeIO commented Dec 17, 2016

Tracked this down to

enum Foo {
  option foo = "bar"; // at semi
  ...
}

dcodeIO added a commit that referenced this issue Dec 17, 2016
@dcodeIO
Copy link
Member

dcodeIO commented Dec 17, 2016

Should now be fixed in master.

@dcodeIO dcodeIO closed this as completed Dec 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants