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

error: Net::ReadTimeout #258

Closed
4 tasks done
stelcheck opened this issue Mar 5, 2018 · 8 comments
Closed
4 tasks done

error: Net::ReadTimeout #258

stelcheck opened this issue Mar 5, 2018 · 8 comments

Comments

@stelcheck
Copy link

Issue Checklist

  • I'm using the latest u3d version
  • I ran u3d --help
  • I read the README
  • I made sure that a similar issue doesn't exit

Issue Description

ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]

Trying to install a Unity version on Linux, but I always end up with the following:

Root privileges are required
Password for censored:
****************
No credentials storage available
--------------------------------------------
--- Downloading Unity version 2017.1.2f1 ---
--------------------------------------------
Downloading from http://beta.unity3d.com/download/7598623e6ed6/./unity-editor-installer-2017.1.2f1.sh
Download will be found at /home/censored/Downloads/Unity_Packages/2017.1.2f1/unity-editor-installer-2017.1.2f1.sh
[=====>..............] 849.95 MiB/2.63 GiB (31.6% at 7.94 MiB/s)     error: Net::ReadTimeout. Use --trace to view backtrace

The network appears to be perfectly fine, so I am not sure what might be the issue. It would be nice if we could have the tool resume past download so that I may eventually be able to complete the download.

@lacostej
Copy link
Member

lacostej commented Mar 5, 2018

Thanks @stelcheck we will look into adding retries.

@lacostej
Copy link
Member

lacostej commented Mar 5, 2018

@stelcheck could you try the version I uploaded on my repo?

after installing it, the default timeout should be now 5 min instead of 1. You can also modify it using environment variables

U3D_HTTP_MAX_RETRIES=5 U3D_HTTP_READ_TIMEOUT=600 u3d install --no-install 2018.1.0b9 --verbose

@lacostej
Copy link
Member

lacostej commented Mar 5, 2018

If you need help on how to install that particular version, let us know. I will make a release based on this in a few days.

@stelcheck
Copy link
Author

I'll try to test this in the upcoming days. However, if I may make one recommendation, it may be wiser to lower the default timeout value and increase the number of retries.

I also couldn't find any documentation regarding Net:HTTP.start, is max_retries trying to continue the download from where we are at or will it restart the download from the beginning?

@stelcheck
Copy link
Author

Quick update: timeout does seem to work properly, but I don't have a good test case for testing retries. Any suggestions?

@lacostej
Copy link
Member

lacostej commented Mar 6, 2018

@lacostej
Copy link
Member

lacostej commented Mar 6, 2018

Note that max_retries is ruby 2.5+ so we may want to add a mechanism to do the same thing in u3d itself for ruby < 2.5.

@stelcheck
Copy link
Author

TBH I don't see any down sides requiring 2.5+. I know of a few bugs in fastlane where the solution was to use 2.5, and I'd expect this tool will be heavily used with that.

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

No branches or pull requests

2 participants