TerraFirmaCraft-The-Final-Frontier / FileDirector

Automated mod/file downloading.
https://www.curseforge.com/minecraft/mc-mods/filedirector
MIT License
8 stars 5 forks source link

Server failing to start due to 403 returned by StopModsRepost API #11

Closed TigerWalts closed 1 month ago

TigerWalts commented 10 months ago

FileDirector 1.7.0 Modpack Magiculture 2 - 0.8.7.3

Downloads are failing due to the request to https://api.stopmodreposts.org/sites.json returning a 403.

Adding the mods manually will prevent any download attempts and allows the server to start.

Error in server log ``` [12:14:03] [main/INFO] [ModDirector/ConfigurationController[CORE]]: Loading config config/mod-director/serializationisbad.url.json [12:14:03] [pool-2-thread-2/ERROR] [ModDirector/InstallController[CORE]]: Failed to install mod /dogboy21/serializationisbad/releases/download/1.3/serializationisbad-1.3.jar net.jan.moddirector.core.exception.ModDirectorException: Failed to retrieve StopModReposts database at net.jan.moddirector.core.manage.check.StopModReposts.initialize(StopModReposts.java:72) ~[StopModReposts.class:1.7.0-SNAPSHOT] at net.jan.moddirector.core.manage.check.StopModReposts.check(StopModReposts.java:28) ~[StopModReposts.class:1.7.0-SNAPSHOT] at net.jan.moddirector.core.configuration.type.UrlRemoteMod.performInstall(UrlRemoteMod.java:108) ~[UrlRemoteMod.class:1.7.0-SNAPSHOT] at net.jan.moddirector.core.manage.install.InstallableMod.performInstall(InstallableMod.java:36) ~[InstallableMod.class:1.7.0-SNAPSHOT] at net.jan.moddirector.core.manage.InstallController.handle(InstallController.java:282) ~[InstallController.class:1.7.0-SNAPSHOT] at net.jan.moddirector.core.manage.InstallController.lambda$createInstallTasks$1(InstallController.java:254) ~[InstallController.class:1.7.0-SNAPSHOT] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_312] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_312] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_312] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312] Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://api.stopmodreposts.org/sites.json at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_312] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_312] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_312] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1947) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1942) ~[?:1.8.0_312] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1941) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1511) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:92) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1487) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1485) ~[?:1.8.0_312] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_312] at java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:784) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1484) ~[?:1.8.0_312] at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268) ~[?:1.8.0_312] at net.jan.moddirector.core.util.WebClient.get(WebClient.java:58) ~[WebClient.class:1.7.0-SNAPSHOT] at net.jan.moddirector.core.manage.check.StopModReposts.initialize(StopModReposts.java:63) ~[StopModReposts.class:1.7.0-SNAPSHOT] ... 9 more Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://api.stopmodreposts.org/sites.json at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1897) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:92) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1487) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1485) ~[?:1.8.0_312] at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_312] at java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:784) ~[?:1.8.0_312] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1484) ~[?:1.8.0_312] at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[?:1.8.0_312] at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:352) ~[?:1.8.0_312] at net.jan.moddirector.core.util.WebClient.get(WebClient.java:24) ~[WebClient.class:1.7.0-SNAPSHOT] at net.jan.moddirector.core.manage.check.StopModReposts.initialize(StopModReposts.java:63) ~[StopModReposts.class:1.7.0-SNAPSHOT] ... 9 more ```

Modpack client downloads the sites.json OK.

[17:09:16] [main/INFO] [ModDirector/ConfigurationController[CORE]]: Loading config config\mod-director\serializationisbad.url.json
[17:09:18] [pool-2-thread-2/INFO] [ModDirector/InstallController[CORE]]: Installed mod file C:\Users\Stuart\curseforge\minecraft\Instances\Magiculture 2\mods\serializationisbad-1.3.jar
Downloading the file using cURL and a User-Agent responds with a page requiring javascript and cookies ```console # curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" https://api.stopmodreposts.org/sites.json Just a moment...
```
ACGaming commented 1 month ago

Should be fixed with 394f5d6017844571121ddbaa6876bb0d43a7df93