lutris / agora

Public discussion space for the community
11 stars 0 forks source link

Runtime fails to download if .netrc is present #82

Open aufau opened 4 years ago

aufau commented 4 years ago

Describe the bug

Lutris 0.5.6 fails to download any runtime package from https://lutris.nyc3.digitaloceanspaces.com/runtime/lib32.tar.bz2 and they can't be used in runners. The file can be downloaded using wget or in browser. I've had this for a long time with previous versions of Lutris/Fedora.

Expected behavior

Lutris should be able to download runtime packages so that they can be used with runners

Current behavior

Downloading any package from https://lutris.nyc3.digitaloceanspaces.com/runtime/lib32.tar.bz2 fails with error 400

Steps to reproduce

Lutris debugging output

INFO 2020-04-30 20:00:40,976 [application.do_command_line:245]:Running Lutris 0.5.6 INFO 2020-04-30 20:00:40,976 [startup.check_driver:62]:Using Intel INFO 2020-04-30 20:00:40,976 [startup.check_driver:64]:Running Mesa driver 20.0.5 on Mesa Intel(R) Iris(R) Graphics 6100 (BDW GT3) (0x162b) INFO 2020-04-30 20:00:40,977 [startup.check_driver:77]:GPU: 8086:162B 106B:013F using i915 drivers INFO 2020-04-30 20:00:41,021 [startup.check_vulkan:132]:Vulkan is supported INFO 2020-04-30 20:00:41,022 [dxvk.get_dxvk_versions:22]:Updating DXVK versions DEBUG 2020-04-30 20:00:41,229 [http.get:65]:GET https://lutris.net/api/runtime DEBUG 2020-04-30 20:00:41,237 [store.get_missing_media:212]:Requesting missing icons from API for diablo-ii-lord-of-destruction DEBUG 2020-04-30 20:00:41,237 [http.get:65]:GET https://lutris.net/api/games WARNING 2020-04-30 20:00:41,508 [runtime.should_update:48]:Runtime lib32 is not available locally DEBUG 2020-04-30 20:00:41,509 [downloader.start:55]:Starting download of: https://lutris.nyc3.digitaloceanspaces.com/runtime/lib32.tar.bz2 DEBUG 2020-04-30 20:00:41,548 [api.get_game_api_page:132]:Loaded 1 games from page 1 INFO 2020-04-30 20:00:42,006 [downloader.async_download:117]:https://lutris.nyc3.digitaloceanspaces.com/runtime/lib32.tar.bz2 returned a 400 error ERROR 2020-04-30 20:00:42,007 [jobs.target:32]:Error while completing task <bound method Downloader.async_download of <lutris.util.downloader.Downloader object at 0x7f324a771d60>>: 400 Client Error: Bad Request for url: https://lutris.nyc3.digitaloceanspaces.com/runtime/lib32.tar.bz2 <class 'requests.exceptions.HTTPError'> 400 Client Error: Bad Request for url: https://lutris.nyc3.digitaloceanspaces.com/runtime/lib32.tar.bz2 File "/usr/lib/python3.8/site-packages/lutris/util/jobs.py", line 30, in target result = self.function(*args, **kwargs) File "/usr/lib/python3.8/site-packages/lutris/util/downloader.py", line 118, in async_download response.raise_for_status() File "/usr/lib/python3.8/site-packages/requests/models.py", line 940, in raise_for_status raise HTTPError(http_error_msg, response=self) ERROR 2020-04-30 20:00:42,009 [downloader.on_done:86]:Download failed: 400 Client Error: Bad Request for url: https://lutris.nyc3.digitaloceanspaces.com/runtime/lib32.tar.bz2 DEBUG 2020-04-30 20:00:42,064 [runtime.check_download_progress:84]:Runtime update interrupted

System information

lutris-issue-report.zip

aufau commented 4 years ago

I've tried on a new, clean user account and it worked. I removed all lutris files from ~/.local/lutris, ~/.cache/lutrs, ~/.share/lutris and it failed with the same error. There must be some environment configuration error but I can't see what it may be, don't have these problems with other applications. I don't use any HTTP proxy or VPN.

aufau commented 4 years ago

I went through my home directory and found out it was caused by following entry in ~/.netrc file:

default login anonymous password user@site

I don't understand why it would cause a problem with http file transfer. Login anonymous and a password is required to access some public ftp servers, this is why people sometimes set it as default. I'm not closing the issue because it may cause issues for other people so it's up to you how to handle it. For myself I have a workaround.

Let me attach following sources:

hogren commented 4 years ago

Hello, I am on Gentoo, I download Lutris 0.5.7.1 with a «git clone» and with portage (the package manager). I had the same problem. I moved the .netrc file and the download works. Thanks for your workaround aufau :)

I can't give all the content of the .netrc file, but the end of it is : default login anonymous password cmdftp@example.com

Bye

strycore commented 3 years ago

The community is welcome to find a solution to this problem.