SKCraft / Launcher

🚀 Distribute your Minecraft modpacks with a custom launcher
Other
624 stars 437 forks source link

Problem with the list of modpacks not being downloaded #428

Closed PixelParallax closed 3 years ago

PixelParallax commented 3 years ago

I've tried to look at previous issue requests for a fix though I am quite confused on why mine is doing this.

all of my website files in theory work: news latest packages Error Code:

java.io.IOException: The list of modpacks could not be downloaded. at com.skcraft.launcher.InstanceList$Enumerator.call(InstanceList.java:191) at com.skcraft.launcher.InstanceList$Enumerator.call(InstanceList.java:102) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@74fe8bc2; line: 1, column: 2] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1524) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:557) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:475) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1415) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:679) at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3024) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2971) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2091) at com.skcraft.launcher.util.HttpRequest$BufferedResponse.asJson(HttpRequest.java:550) at com.skcraft.launcher.InstanceList$Enumerator.call(InstanceList.java:141) ... 5 more

hedgehog1029 commented 3 years ago
~ ➥ curl -v http://fluxsmp.rf.gd/launcherstuff/packages.php       
*   Trying 185.27.134.98:80...
* Connected to fluxsmp.rf.gd (185.27.134.98) port 80 (#0)
> GET /launcherstuff/packages.php HTTP/1.1
> Host: fluxsmp.rf.gd
> User-Agent: curl/7.76.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 403 Forbidden
< Server: nginx
< Date: Wed, 14 Jul 2021 00:50:27 GMT
< Content-Type: text/html
< Content-Length: 146
< Connection: keep-alive
< Vary: Accept-Encoding
< 
<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>

looks like your web server (nginx) is refusing access to non-browser user agents, and serving HTML in response

PixelParallax commented 3 years ago

Is there a clear way to try and fix that through my website or do I need to look for an alternative host

hedgehog1029 commented 3 years ago

If you're using shared hosting: there's probably an option somewhere in your control panel to disable this kind of filtering

hedgehog1029 commented 3 years ago

Possibly might be caused by ModSecurity? Sounds like that software does this kind of filtering, from some cursory research...

PixelParallax commented 3 years ago

Yea so the website hosting I'm using blocks everything except for web browsers. Looks like I'll be finding a new host. Thanks for making me look in the right place.

hedgehog1029 commented 3 years ago

We have a list of reputable web hosts on our wiki: https://github.com/SKCraft/Launcher/wiki/Website-Hosting :smile: