fulup-bzh / GeoGate

GeoGate is an opensource tracking GPS/AIS framework to implement GTS applications.
Apache License 2.0
74 stars 39 forks source link

Versions 0.1.15 & 0.1.16 on NPM throw a TypeError: Cannot read property 'trim' of undefined #23

Closed fabdrol closed 6 years ago

fabdrol commented 7 years ago

After updating to version 0.1.16, we're getting a TypeError when decoding the following multiline AIS sentence:

const sentences = [
  '!AIVDM,2,1,0,A,53brRt4000010SG700iE@LE8@Tp4000000000153P615t0Ht0SCkjH4jC1C,0*25\n',
  '!AIVDM,2,2,0,A,`0000000001,2*75\n'
]

This used to work fine. The error we're seeing:

TypeError: Cannot read property 'trim' of undefined
      at new AisDecode (node_modules/ggencoder/lib/GG-AisDecode.js:367:57)

Edit: version 1.1.14 works as expected, 1.1.15 & 1.1.16 throw the error.

afischerdev commented 7 years ago

Thanks for that beautiful sample. I found the reason, please give me the time for some tests.

fulup-bzh commented 7 years ago

I really like when you find and fix problem by yourself. That's really cool.

fulup-bzh commented 7 years ago

fabdrol is you happy with 0.1.17 that was pushed today on NPM. I would propose you to close this issue.

fabdrol commented 6 years ago

@fulup-bzh sorry for the delay, completely missed your messages. To answer: all is well now, thank you.