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

Internet connectivity warning on load #17

Closed
valefar-on-discord opened this issue Apr 19, 2024 · 3 comments · Fixed by #43
Closed

Internet connectivity warning on load #17

valefar-on-discord opened this issue Apr 19, 2024 · 3 comments · Fixed by #43

Comments

@valefar-on-discord
Copy link
Collaborator

There should be a check when loading the CLI application for an internet connection and warn the user if so.

Few thoughts:

  • A ping to google.com would probably be sufficient for a test
  • Not 100% on the UX but my initial idea is if a connection is detected a warning explaining the concerns would be presentend and the user would be required to press a key to continue
  • An optional argument should be accepted to ignore this check for user who know what they are doing. This will also help with resolving unit test failures
@remyroy
Copy link
Member

remyroy commented May 2, 2024

There are a few pitfalls when testing or detecting an internet connection. Some countries block connections to various website and it might show as offline even though that person could be online. There is some exploration to be done and one of them could be to check how we do it with Wagyu Key Gen or if we are using a library how that library does it.

@remyroy
Copy link
Member

remyroy commented May 2, 2024

Here is some documentation on how browsers do it: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/onLine

@remyroy
Copy link
Member

remyroy commented May 2, 2024

The By using an IP address/By using socket package section from https://www.codespeedy.com/how-to-check-the-internet-connection-in-python/ might be useful.

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

Successfully merging a pull request may close this issue.

2 participants