cannot browse online content with 5.6.0
cannot browse online content with 5.6.0
Using the latest 5.6.0 on a Mac, I cannot browse online content. When I click that button, I get the mesage "No packages could be retrieved". It's not the computer, as I can browse content using 5.4.1 on the same computer. (I've kept that to be able to install and update mods.) It's not the operating system, as I've also tried on Windows, and it's not my ISP, as I've also tried on a mobile hotspot. Does the content DB need to be adjusted to allow connections from 5.6.0?
Re: cannot browse online content with 5.6.0
Are you able to connect to online servers from 5.6?
"Only in Christ do we find real love, and the fullness of life. And so I invite you today to look to Christ." - St. John Paul II
Re: cannot browse online content with 5.6.0
Yes. I can see a list of public servers, and I was able to register and connect to one of them.
Using Little Snitch I determined that when I try to browse content, the client is trying to connect to content.minetest.net. I downloaded the source code to try to figure out the full URL it's using. Some web searching after checking that led me to Minetest's use of the API. I modified the sample URL there to check if the content DB server would return anything for it:
https://content.minetest.net/api/packag ... op_default
That worked just fine. The data returned is a bit different than if I use 5.3.0 as shown in the sample, so the content DB server does seem to react properly to a request from 5.6.0. (Just to test I tried setting the version to 5.9.0, and that returned identical data to the 5.6.0 download.)
Poking around in the source code more led me to builtin/mainmenu/dlg_contentstore.lua, which contains the error string "No packages could be retrieved". Here's the relevant code section:
Without delving more into how the code parses the downloaded JSON I don't know exactly what's causing the error, but either the JSON downloaded isn't in the exact format that the code expects, or the code isn't parsing it properly. Either way, I hope this info helps someone else replicate the problem and hopefully fix it.
Using Little Snitch I determined that when I try to browse content, the client is trying to connect to content.minetest.net. I downloaded the source code to try to figure out the full URL it's using. Some web searching after checking that led me to Minetest's use of the API. I modified the sample URL there to check if the content DB server would return anything for it:
https://content.minetest.net/api/packag ... op_default
That worked just fine. The data returned is a bit different than if I use 5.3.0 as shown in the sample, so the content DB server does seem to react properly to a request from 5.6.0. (Just to test I tried setting the version to 5.9.0, and that returned identical data to the 5.6.0 download.)
Poking around in the source code more led me to builtin/mainmenu/dlg_contentstore.lua, which contains the error string "No packages could be retrieved". Here's the relevant code section:
Code: Select all
function store.get_formspec(dlgdata)
store.update_paths()
dlgdata.pagemax = math.max(math.ceil(#store.packages / num_per_page), 1)
if cur_page > dlgdata.pagemax then
cur_page = 1
end
local W = 15.75
local H = 9.5
local formspec
if #store.packages_full > 0 then
[...]
else
formspec = {
"size[12,7]",
"position[0.5,0.55]",
"label[4,3;", fgettext("No packages could be retrieved"), "]",
"container[0,", H - 0.8 - 0.375, "]",
"button[0,0;4,0.8;back;", fgettext("Back to Main Menu"), "]",
"container_end[]",
}
end
Re: cannot browse online content with 5.6.0
Make sure your builtin/ folder matches the binary you're using, if you've compiled 5.6.0 but later did, for example, a git checkout of 5.3.0, you can end up with a 5.6.0 binary running with a 5.3.0 builtin/ folder. (There are other ways to arrive at this situation.) This can cause weird errors and break things.
Lead dev of Exile, git repo: https://codeberg.org/Mantar/Exile
Re: cannot browse online content with 5.6.0
I did not compile 5.6.0 myself; I downloaded the binaries available at minetest.net. I downloaded the code to try to pin down the source of the error.
Your post made me wonder if something in my library folder might be causing a conflict, since I've been using the same folder since when I first downloaded Minetest. I renamed that folder so Minetest would create a new one, but Minetest still gave the same error message when trying to browse content.
Can anybody else browse content online with the 5.6.0 client, using the versions downloaded from minetest.net?
Your post made me wonder if something in my library folder might be causing a conflict, since I've been using the same folder since when I first downloaded Minetest. I renamed that folder so Minetest would create a new one, but Minetest still gave the same error message when trying to browse content.
Can anybody else browse content online with the 5.6.0 client, using the versions downloaded from minetest.net?
Re: cannot browse online content with 5.6.0
I tried Minetest 5.6 from minetest.net on Windows 10 and I was able to download a mod.
Try disabling any antivirus application or special firewall if you have it.
"Only in Christ do we find real love, and the fullness of life. And so I invite you today to look to Christ." - St. John Paul II
Re: cannot browse online content with 5.6.0
Success! I have fixed the problem. Thanks to everyone who replied. The cause was subtle and non-obvious, so I'll document it here in case anybody has a similar problem.
I checked again on Windows 10 and I was able to browse and download mods, so I may have been mistaken before. When checking again on my Mac I noticed debug.txt in the Minetest library folder, which I'd never looked at before. That file indicated the problem.
It seemed the Mac build of Minetest didn't have the proper certificate authority info to be able to verify the SSL certificate for minetest.net or content.minetest.net (they're two different certs). Both certs are from Let's Encrypt. I can view both of those URLs without problems in any web browser I try.
I searched the source code for "HTTPFetch" and found src/httpfetch.cpp, and found the code that generates the error listed in debug.txt. The fetching seems to use curl. I'm able to download the URLs above without difficulty using curl, but I remembered that I have Macports installed, and I use that version of curl (/opt/local/bin/curl) by default. When I tried the built-in version of curl (/usr/bin/curl) with those URLs I got a certificate error. So, the problem wasn't with Minetest itself, but with the version of curl that it uses to download stuff.
A little websearching turned up this Stackexchange post which explains the problem with curl and how to fix it. I followed those steps, and now Minetest can browse content (and check the version number) without any difficulty.
I checked again on Windows 10 and I was able to browse and download mods, so I may have been mistaken before. When checking again on my Mac I noticed debug.txt in the Minetest library folder, which I'd never looked at before. That file indicated the problem.
Code: Select all
2022-08-19 09:03:18: ERROR[AsyncWorker-0]: HTTPFetch for https://www.minetest.net/release_info.json failed (Peer certificate cannot be authenticated with given CA certificates)
[...]
2022-08-19 09:03:49: ERROR[Main]: HTTPFetch for https://content.minetest.net/api/packages/?type=mod&type=game&type=txp&protocol_version=41&engine_version=5.6.0&hide=nonfree&hide=desktop_default failed (Peer certificate cannot be authenticated with given CA certificates)
I searched the source code for "HTTPFetch" and found src/httpfetch.cpp, and found the code that generates the error listed in debug.txt. The fetching seems to use curl. I'm able to download the URLs above without difficulty using curl, but I remembered that I have Macports installed, and I use that version of curl (/opt/local/bin/curl) by default. When I tried the built-in version of curl (/usr/bin/curl) with those URLs I got a certificate error. So, the problem wasn't with Minetest itself, but with the version of curl that it uses to download stuff.
A little websearching turned up this Stackexchange post which explains the problem with curl and how to fix it. I followed those steps, and now Minetest can browse content (and check the version number) without any difficulty.
- Blockhead
- Member
- Posts: 1622
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: cannot browse online content with 5.6.0
So the issue turned out to be a problem with macOS' built in certificates again (previous thread)... Maybe we need a sticky like "Content tab not working on macOS? - see this" which describes the fix.Tesseract wrote: ↑Fri Aug 19, 2022 16:37A little websearching turned up this Stackexchange post which explains the problem with curl and how to fix it. I followed those steps, and now Minetest can browse content (and check the version number) without any difficulty.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
Who is online
Users browsing this forum: No registered users and 5 guests