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

Error en windows español #112

Closed
k41z3n opened this issue Mar 4, 2020 · 2 comments
Closed

Error en windows español #112

k41z3n opened this issue Mar 4, 2020 · 2 comments

Comments

@k41z3n
Copy link

k41z3n commented Mar 4, 2020

`{
host: 'ping',
alive: true,
output: '\r\n' +
'Haciendo ping a 192.168.1.1 con 32 bytes de datos:\r\n' +
'Respuesta desde 192.168.1.1: bytes=32 tiempo=1ms TTL=64\r\n' +
'\r\n' +
'Estad�sticas de ping para 192.168.1.1:\r\n' +
' Paquetes: enviados = 1, recibidos = 1, perdidos = 0\r\n' +
' (0% perdidos),\r\n' +
'Tiempos aproximados de ida y vuelta en milisegundos:\r\n' +
' M�nimo = 1ms, M�ximo = 1ms, Media = 1ms\r\n',
time: 1,
min: '1.000',
max: '1.000',
avg: '1.000',
stddev: '0.000',
numeric_host: ''
}
host 192.168.1.1 is alive
{
host: 'ping',
alive: true,
output: '\r\n' +
'Haciendo ping a 192.168.1.14 con 32 bytes de datos:\r\n' +
'Respuesta desde 192.168.1.14: bytes=32 tiempo=1ms TTL=128\r\n' +
'\r\n' +
'Estad�sticas de ping para 192.168.1.14:\r\n' +
' Paquetes: enviados = 1, recibidos = 1, perdidos = 0\r\n' +
' (0% perdidos),\r\n' +
'Tiempos aproximados de ida y vuelta en milisegundos:\r\n' +
' M�nimo = 1ms, M�ximo = 1ms, Media = 1ms\r\n',
time: 1,
min: '1.000',
max: '1.000',
avg: '1.000',
stddev: '0.000',
numeric_host: ''
}
host 192.168.1.14 is alive
C:\Users\Diseno\Desktop\Service\node_modules\ping\lib\parser\win.js:56
this._times.push(parseFloat(match[1], 10));
^

TypeError: Cannot read property '1' of null
at WinParser.processBody (C:\Users\Diseno\Desktop\Service\node_modules\ping\lib\parser\win.js:56:42)
at WinParser.parser.eat (C:\Users\Diseno\Desktop\Service\node_modules\ping\lib\parser\base.js:125:14)
at C:\Users\Diseno\Desktop\Service\node_modules\underscore\underscore.js:76:21
at Function.
.each._.forEach (C:\Users\Diseno\Desktop\Service\node_modules\underscore\underscore.js:186:9)
at ChildProcess. (C:\Users\Diseno\Desktop\Service\node_modules\ping\lib\ping-promise.js:76:12)
at Object.onceWrapper (events.js:297:20)
at ChildProcess.emit (events.js:209:13)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
[nodemon] app crashed - waiting for file changes before starting...`

@stark-ace-1891
Copy link

Modify the win.js file
The error is due to the fact that in the code it looks for the text 'ms' and when it does not get results it gets an undefined in the variable' timeKVP ', sometimes when the answer is very fast the text does not contain this text but if the' m ', for this reason we modify line 55 as follows:
stake

@mondwan
Copy link
Collaborator

mondwan commented Apr 4, 2020

Sort of related to #110 . Close this and follow discussions there

@mondwan mondwan closed this as completed Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants