-
Notifications
You must be signed in to change notification settings - Fork 105
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
isAlive false, no error in electron, but isAlive true (same IP) under node? #134
Comments
To narrow this down, I use the source code of node-ping to write code that does the same thing, in a very minimal version inside the electron app. "out" is just console log, but it goes to a special text box which is easy to see while the program is running.
the stderr message comes back as Why doesn't node-ping report an error? Maybe I wrote the minimal code incorrectly? But the same code runs just fine under node, so electron is failing to run it with the same permissions... |
Wonder if it's related to this: |
Submitted a bug report to Electron. |
Try 0.4.1, and see whether the error |
Sorry, it's been 4 months so we moved on and are no longer using this library at all. Rather than pretend that I could find time to revert, update the library and try it, I will just let you know that testing won't happen. Close this issue if you feel you've corrected the problem. |
oops. Anyway, thanks for the report. |
I'm baffled. Any insight on how to debug this appreciated. We are using ping to check if a robot is online before we attempt to connect to it. The specific code is:
https://github.com/cfry/dde/blob/master/core/robot.js#L1049
copied here for your convenience: (and THIS code IS open source, so I can share it)
On Windows, and Mac, this code is working (e.g. reaching the "if (isAlive)" clause when the robot is online and pingable. In Ubuntu 16 and 18, it is reaching the "else {" clause, not the "else if (err) {" clause.
At the same time, on the same Ubuntu 18 machine, a ping to the same IP address from bash is returned, and the following little node.js test code works as expected, reporting "Dex is alive" every time:
I have searched the electron issues for any mention of ping not working. e.g.
https://github.com/electron/electron/issues?q=is%3Aissue+%22node-ping%22+
and I'm not finding anything.
I've also, of course, searched your issues for anything related to electron and none of that seems to match:
https://github.com/danielzzz/node-ping/issues?q=is%3Aissue+electron
I'm sort of at a point of... I don't know how to go forward here. It's probably an electron issue, but I was hoping you might have some ideas.
The text was updated successfully, but these errors were encountered: