archfan7411 / discordmt

An easy-to-use Discord-Minetest relay with login support.
MIT License
14 stars 9 forks source link

minetest.request_http_api() returns nil, despite the mod being trusted. #11

Open LandonAConway opened 2 years ago

LandonAConway commented 2 years ago

This mod does not run in MT 5.6.0 and above. I got the following error.

2022-08-30 19:47:03: ERROR[Main]: ModError: Failed to load and run script from /root/programs/minetest_lss/bin/../games/minetest_game/mods/discordmt/init.lua: 2022-08-30 19:47:03: ERROR[Main]: ...t_lss/bin/../games/minetest_game/mods/discordmt/init.lua:117: attempt to index upvalue 'http' (a nil value) 2022-08-30 19:47:03: ERROR[Main]: stack traceback: 2022-08-30 19:47:03: ERROR[Main]: ...t_lss/bin/../games/minetest_game/mods/discordmt/init.lua:117: in function 'send' 2022-08-30 19:47:03: ERROR[Main]: ...t_lss/bin/../games/minetest_game/mods/discordmt/init.lua:162: in main chunk

And to answer the question, yes... minetest's .conf file has [discordmt] listed as a trusted mod for http requests

debagos commented 2 years ago

This mod does not run in MT 5.6.0 and above

It does.

discordmt/init.lua:162: in main chunk Line 162 ? The init.lua was never longer than 153 lines... So you made changes and broke it yourself.

@archfan7411 You can close this issue.

rinzler100 commented 1 month ago

Actually, I got the same error but on line 113 @debagos

debagos commented 1 month ago

@rinzler100 Did you add the mod to the secure.http_mods setting like explained in the setup guide?