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

Spurious behavior for software version check on networks without internet access #194

Closed
nitin710 opened this issue Apr 3, 2023 · 1 comment · Fixed by #199
Closed
Labels
EmotiBit Oscilloscope Issues relating to EmotiBit Oscilloscope

Comments

@nitin710
Copy link
Collaborator

nitin710 commented Apr 3, 2023

Describe the bug
The EmotiBit Oscilloscope softwareVersionChecker shows different behaviors on different networks (without internet access)

  • On 1 router, the version checker gets stuck (seems to be forever) on the versionChecker function
  • On another router (TP-LINK AC750 Model Archer C20),
    • sometimes it gets stuck for ~10 secs showing the following on the console
      • image
    • Other times, it goes through without any hitch (as expected)

To Reproduce
Steps to reproduce the behavior:

  1. Connect to a network without internet access
  2. Open EmotiBit Oscilloscope

Expected behavior
It should skip version checking if there is no internet access. (without any delay)
image

@nitin710 nitin710 added the EmotiBit Oscilloscope Issues relating to EmotiBit Oscilloscope label Apr 3, 2023
@nitin710
Copy link
Collaborator Author

nitin710 commented Apr 10, 2023

A possible solution is to set a timeout period in the system call to curl. We don't currently have a timeout on curl, but we could implement it as a part of a new release.

On further debugging, it looks like there was a bug in curl wrt timeout.

This issue here raises a similar problem: curl/curl#9272

which leads to the issue referenced in curl: curl/curl#9147 (they have solved this in a later version of curl, that im using)

Using curl on an older version (currently installed as the primary version on my dev machine) gives this output 👇🏽 . Although there is 3 second timeout, i get the error message after around 11seconds. The timeout is ignored.
image

However, when trying with the latest version on curl, v8.0.1 👇🏽 , i get the error message exactly after the timeout period
image

Looks like the bug on curl has been solved.
But, since we cannot guarantee all EmotiBit users will have the same curl installation, we need to probably add a timeout in Oscilloscope to not wait for curl "forever".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EmotiBit Oscilloscope Issues relating to EmotiBit Oscilloscope
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant