MobilityData / gtfs-realtime-bindings

Language bindings generated from the GTFS Realtime protocol buffer spec for popular languages.
Apache License 2.0
370 stars 127 forks source link

Error in the official Google Transit API Node.js sample #66

Closed wmcb91 closed 3 years ago

wmcb91 commented 4 years ago

In the official Google Transit API Node.js sample the code on line 11 will throw this error: TypeError: Cannot read property 'decode' of undefined.

// Incorrect
var feed = GtfsRealtimeBindings.FeedMessage.decode(body);

// Corrected
var feed = GtfsRealtimeBindings.transit_realtime.FeedMessage.decode(body);
barbeau commented 4 years ago

@wmcb91 Thanks for reporting this! We'll try to get this fixed.

barbeau commented 3 years ago

@wmcb91 Looks like this is fixed here - https://developers.google.com/transit/gtfs-realtime/examples/nodejs-sample. Thanks for reporting!