-
Notifications
You must be signed in to change notification settings - Fork 38
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
Not being connected to the internet results in a crash #234
Comments
Thanks for reporting this. Do you mind retesting at #235. If possible, under the same network conditions. |
To be clear, I cannot reproduce this on my end, and it's not really clear to me how we can create reliable and reproducible tests in the CI to reproduce all network-related errors. Not really a fan of blindly catching all socket address-related errors like this either. Instead, I believe the most robust and decisive solution to handle all class of network-related cases like this would be to use an external network library (e.g., requests, httpx). They would handle it better, are better tested, and would save us a lot of code. See #134 for related issue. |
Can confirm that with #235 applied, umu-run doesn't crash anymore when offline. This is what gets printed now on stdout:
|
Yeah, that's both expected and intended. I don't want errors like that to pass silently as I cannot reproduce them in my end. Furthermore, I think knowing the error details may be helpful for debugging purposes in the future until we use an external network library for more robust handling of them. |
Going to go ahead and merge the fix as you're able to launch your game now. The point is that users with your network conditions will be able to run their game now. If you think I'm wrong and umu-launcher is better off suppressing that error instead, I would like to know why and you'll need to make a PR for it too. And in the future, more robust handling of network-related errors will be implemented. |
The issue:
Launching umu-run offline (after the initial setup) crashes the program.
Setting UMU_RUNTIME_UPDATE=0 successfully works around it.
Error -2 (Name or service not known) seems to be left unhandled in umu_run.py.
Possible solution:
In umu/umu_run.py (main), change
if e.errno != -3 and e.errno != ENETUNREACH:
to
if e.errno != -2 and e.errno != -3 and e.errno != ENETUNREACH:
I tested both 1.1.2 and latest git on Arch Linux (Kernel 6.6.56-1-lts, Python 3.12.7).
The text was updated successfully, but these errors were encountered: