-
Notifications
You must be signed in to change notification settings - Fork 48
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
node-webkit freez #9
Comments
I've created an NW.js app using the |
Part of the WiFi connection sequence involves waiting until the connection is complete. There are a couple edge cases I can think of where this can result in an infinite loop as written! Depending on your implementation, that could very easily introduce a dead stop. This project is not my first priority but I can look into adding a parameter that could attempt to implement a timeout to break those loops next week. |
but this problem appears on linux mint just to notify you |
The only way I can really get to the bottom of this is if you can post the log output up until the point that it freezes. Maybe you could try running the node app and dump its output to a file like WiFiControl.init({
debug: true
}); |
I have the same issue on my windows 10 machine using electron 0.36.4 (Node 5.1.1). Discovering networks works just fine but connecting to one does change the connection and freezes electron completely. There even remains a process after killing the application. My debug output for scanning for networks:
And connecting to an open network using the javascript console:
|
@cemrich I very much think your problem stems from the problem as @kilgaloon . Basically, the loop which checks the system's network state either (a) finds out the system is connected, but the loop livelocks or (b) the loop never gets a response regarding the system's network state. It could be both. I intend to rewrite this module to avoid A regardless, by implementing async looping with a configurable time out. But to understand why the loop never stops, can you tell me what the output of the following program is: WiFiControl.init({
debug: true
});
console.log( WiFiControl.getIfaceState() ); By analyzing the response from Windows 10 of the |
Thank you for your quick response. The output is
|
Yup, that |
@cemrich I recently released a version 2.0.0 of this package. I've replaced all of the offending loops with a better timeout system. Would be interested to know if it helps you in any way with this problem. |
Yes, the bug is gone with the latest release. Thank you! Windows now does connect fine to my (open) network. However, wifi-control does not recognize this fact:
But this seems to be another bug. |
Yeah, note that Then, secondly, I bet the problem is the same as in #9 (comment). Do you think you could post the results from your command prompt on the computer exhibiting that behaviour when you run the following command? netsh wlan show interface You may have to execute that with administrative privileges. It will show us exactly what |
I know, but the callback function is called with an error object as if the network has not been found.
Sorry, it's all German - i cannot convince windows to switch languages, but I can translate if needed. I think the error might hide in the last line: |
This answers everything. The output above is parsed by the package to determine network state, but it parses by matching keywords. These will obviously not work when the keywords are English but the output is in German! That's what causes the error. I will need to think about this. I need to find a way to force output in a known language (as in, I know in advance what language it will be) or else find a different mechanism of parsing (e.g. counting lines). |
BTW this line proves that you are connected: English output would read |
When i try to connect to wifi, it does connect, but also freeze aplication.
The text was updated successfully, but these errors were encountered: