Godot version:
Godot Engine v3.2.dev.custom_build.7126654ea
CORE API HASH: 2864405972004617357
EDITOR API HASH: -4062612966191217613
OS/device including version:
Linux 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Issue description:
When trying to download an asset from the AssetLib the download fails with the following error:

The "Got" sha256 string is empty.
Steps to reproduce:
The only way this can happen is when FileAccess::get_sha256 returns "":
https://github.com/godotengine/godot/blob/52cfb5f5799af38e4aa543417a76999b732c3a54/editor/plugins/asset_library_editor_plugin.cpp#L368-L373
Inspecting that function, it seems that this happens only when FileAccess::open return NULL:
https://github.com/godotengine/godot/blob/52cfb5f5799af38e4aa543417a76999b732c3a54/core/os/file_access.cpp#L694-L696
Checking there, it seems that FileAccess:_open (per-OS function) has to return an error:
https://github.com/godotengine/godot/blob/e9d624d7ce1d56cf134599a62deea1f5a0848019/core/os/file_access.cpp#L113-L117
Finally, looking at the unix version of _open, one can see that there are a few cases in which this might happen:
HTTPRequest returns RESULT_DOWNLOAD_FILE_CANT_OPEN instead of RESULT_SUCCESS due to not being able to open the file. Make sure that the editor cache directory is writeable.fopen fails, likely due to wrong permissions. Unlikely, since the file should have just been written by the HTTPRequest.It could also occur that HTTPRequest returns RESULT_DOWNLOAD_FILE_CANT_OPEN instead of RESULT_SUCCESS due to not being able to open the file. Make sure that the editor cache directory is writeable.
This was indeed the source of the problem. For some reason the cache directory was owned by root instead of the user running godot.
Solution was to run
sudo chown -R <username>:<username> ~/.cache/godot
Is there any documentation regarding where the cache files and other important system files are on a Linux system? Only found the cache directory by digging around through another issue report: https://github.com/godotengine/godot/issues/13064
Is there any documentation regarding where the cache files and other important system files are on a Linux system?
Godot follows the XDG Base Directory specification on Linux. By default:
$HOME/.local/share/godot/.$HOME/.config/godot/.$HOME/.cache/godot/.That makes sense.
Is this something that should be added to the documentation?
I'd be happy to help out in this, but would need a bit of guidance as to how to go about submitting updates to the documentation.
@nleehone I just opened https://github.com/godotengine/godot-docs/pull/2689 to this effect :smiley:
Note: Even if documented, please do not close this. RESULT_DOWNLOAD_FILE_CANT_OPEN has to show a different error message in the asset library.
Hi, I get this error when downloading templates.
Windows 10.
Godot 3.1.2 and Godot 3.2.
@isral Which template did you try to download?
@bojidar-bg I'm beginning to think we should remove the hash verification entirely, as GitHub ZIP hashes aren't guaranteed to be stable over time (even for a fixed tag or commit). We can make the API always send empty hashes and remove all hash-related logic in the current backend.
@Calinou
Platformer 2D by CesarLeon
@Calinou we could do it in the new / Laravel backend, indeed.
@bojidar-bg I already removed the hash support there; it's always sending empty hashes now. I was talking about doing this for the existing platform, as it'll take a while for the new platform to be deployed.
I get this error when attempting to download the 3D Material Testers demo (Win10 as well, newest Godot)
Get this error when downloading all light demos
It's seems like many assets have this checksum problem. I couldn't download the half of the assets listed on the first page. For example
Just to name some of them..
Same here 😢
Almost none of the assets can be downloaded without getting a hash error
@bojidar-bg Please remove the hash verification system already. It's clearly causing too much trouble at this point... We can remove the editor-side check afterwards, as it won't be necessary anymore.
I can open a PR if you don't want to do it right now.
@Calinou Alright, let's remove hash checks from the asset library -- feel free to open a PR there, I suppose.
Removing checks from the editor is not necessary, I think, especially considering that when other asset libraries come around, they might want to use them.
Just downloaded with success the asses:
Branch 3.2
Hash checks were removed from the asset library with https://github.com/godotengine/godot-asset-library/pull/209, which solves this issue. Closing.