You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
Hi there, I'm working on a school project using your MTA library.
So I'm fully using your library (with some personal augments for ease of use) and it's working fantastic, I really appreciate your effort.
That being said, it would seem I'm running into a problem. Randomly I'll have a perfectly valid request to mta.schedule() throw the following error:
RangeError: Illegal offset: 0 <= 32736 (+4) <= 32739 at ByteBuffer.module.exports.ByteBufferPrototype.readUTF8String (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\bytebuffer\dist\bytebuffer-node.js:2117:27) at ByteBuffer.module.exports.ByteBufferPrototype.readVString (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\bytebuffer\dist\bytebuffer-node.js:2209:24) at Element.ProtoBuf.Reflect.ElementPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:2185:35) at Field.ProtoBuf.Reflect.FieldPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:3752:33) at Message.ProtoBuf.Reflect.MessagePrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:3263:45) at Element.ProtoBuf.Reflect.ElementPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:2201:46) at Field.ProtoBuf.Reflect.FieldPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:3752:33) at Message.ProtoBuf.Reflect.MessagePrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:3258:48) at Element.ProtoBuf.Reflect.ElementPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:2201:46) at Field.ProtoBuf.Reflect.FieldPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:3752:33)
There seems to be no pattern to this either. I could be sending the exact same request every 60 seconds for an hour and it won't happen, but then it'll go and happen 3 times in a row. It's not necessarily a fatal` issue, I have my front end retrying on failed requests, but it's definitely annoying and could cause a lot of problems when I make the project available publicly.
The randomness of this error leads me to think that it's an issue with the MTA API itself rather than your implementation of it, but I'd really appreciate it if you could take a look at see if there might be a better way to handle the error and attempt retries within the library instead? I'm still learning Javascript so I don't know enough to fork the library yet but maybe I'll do that some day.
Thank you for your time
The text was updated successfully, but these errors were encountered:
Egrodo
changed the title
Illegal group end indicator in ProtoBuf decode
RangeError: Illegal offset: 0 <= 32736 (+4) <= 32739 in ProtoBuf read
Dec 1, 2018
Hi @Egrodo, I have noticed this error from time to time, as well. A protobuf upgrade is likely needed to fix it. Unfortunately because the upgraded version has breaking changes, it's a larger project that I personally haven't had the time to take on yet. I'd definitely welcome a PR, however! 😃
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi there, I'm working on a school project using your MTA library.
So I'm fully using your library (with some personal augments for ease of use) and it's working fantastic, I really appreciate your effort.
That being said, it would seem I'm running into a problem. Randomly I'll have a perfectly valid request to mta.schedule() throw the following error:
RangeError: Illegal offset: 0 <= 32736 (+4) <= 32739 at ByteBuffer.module.exports.ByteBufferPrototype.readUTF8String (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\bytebuffer\dist\bytebuffer-node.js:2117:27) at ByteBuffer.module.exports.ByteBufferPrototype.readVString (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\bytebuffer\dist\bytebuffer-node.js:2209:24) at Element.ProtoBuf.Reflect.ElementPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:2185:35) at Field.ProtoBuf.Reflect.FieldPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:3752:33) at Message.ProtoBuf.Reflect.MessagePrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:3263:45) at Element.ProtoBuf.Reflect.ElementPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:2201:46) at Field.ProtoBuf.Reflect.FieldPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:3752:33) at Message.ProtoBuf.Reflect.MessagePrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:3258:48) at Element.ProtoBuf.Reflect.ElementPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:2201:46) at Field.ProtoBuf.Reflect.FieldPrototype.decode (C:\Users\egrodo\Documents\code\choochooserver\node_modules\mta-gtfs\node_modules\protobufjs\dist\protobuf.js:3752:33)
There seems to be no pattern to this either. I could be sending the exact same request every 60 seconds for an hour and it won't happen, but then it'll go and happen 3 times in a row. It's not necessarily a fatal` issue, I have my front end retrying on failed requests, but it's definitely annoying and could cause a lot of problems when I make the project available publicly.
The randomness of this error leads me to think that it's an issue with the MTA API itself rather than your implementation of it, but I'd really appreciate it if you could take a look at see if there might be a better way to handle the error and attempt retries within the library instead? I'm still learning Javascript so I don't know enough to fork the library yet but maybe I'll do that some day.
Thank you for your time
The text was updated successfully, but these errors were encountered: