massimocandela / geofeed-finder

Utility to find geofeed files linked from rpsl.
BSD 3-Clause "New" or "Revised" License
74 stars 8 forks source link

(node:17883) UnhandledPromiseRejectionWarning: Error: Not valid prefix #3

Closed bengan closed 3 years ago

bengan commented 3 years ago

On Linux (opensuse tumbleweed) with the pre-compiled version.

$ geofeed-finder-linux-x64 -i ripe Downloading RIPE whois data Parsing RIPE data 193.201.40.0/24 https://www.namex.it/namex_geofeeds.csv [download] 193.201.28.0/23 https://www.namex.it/namex_geofeeds.csv [cache] 2001:7f8:10::/48 https://www.namex.it/namex_geofeeds.csv [cache] 193.24.29.0/24 https://www.namex.it/namex_geofeeds.csv [cache] 193.0.24.0/21 https://meetings.ripe.net/geo/google.csv [download] 2001:67c:64::/48 https://meetings.ripe.net/geo/google.csv [cache] 2001:67c:1230::/46 https://noc.ietf.org/geo/google.csv [download] 2001:67c:370::/48 https://noc.ietf.org/geo/google.csv [cache] 31.133.128.0/18 https://noc.ietf.org/geo/google.csv [cache] 31.130.224.0/20 https://noc.ietf.org/geo/google.csv [cache] 83.231.214.0/24 https://geo.ip.gin.ntt.net/geofeeds/geofeeds.csv [download] 5.158.213.0/25 https://geo.ip.gin.ntt.net/geofeeds/geofeeds.csv [cache] 192.83.230.0/24 https://rg.net/geofeed [download] 185.33.108.0/22 https://www.namex.it/namex_geofeeds.csv [cache] 81.255.185.28/30 https://www.mvps.net/api/geolocation.php [download] 45.132.188.0/22 https://rg.net/geofeed [cache] 2a0f:80::/32 https://www.namex.it/namex_geofeeds.csv [cache] 2a0d:1a40:7900::/40 https://as207960.net/assets/geofeeds.csv [download] 45.129.95.0/24 https://as207960.net/assets/geofeeds.csv [cache] 198.180.150.0/24 https://rg.net/geofeed [cache] (node:17883) UnhandledPromiseRejectionWarning: Error: Not valid prefix at Object.getIpAndNetmask (/snapshot/geofeed-finder/node_modules/ip-sub/ipUtils.js:22:15) at Object.getNetmask (/snapshot/geofeed-finder/node_modules/ip-sub/ipUtils.js:196:33) at Object.isSubnet (/snapshot/geofeed-finder/node_modules/ip-sub/ipUtils.js:218:72) at /snapshot/geofeed-finder/build/finder.js:100:102 at Array.filter () at Finder.validateGeofeeds (/snapshot/geofeed-finder/build/finder.js:99:21) at /snapshot/geofeed-finder/build/finder.js:91:24 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Promise.all (index 3) (node:17883) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:17883) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

massimocandela commented 3 years ago

Hi @bengan,

Thanks a lot for reporting. This is fixed. This is still a prototype and the case of a geofeed file containing a single ip was not managed properly. I also deployed, you should be able to see another release .