TechnicPack / TechnicSolder

PHP web app that brings differential updates to the Technic Launcher and Technic Platform
https://docs.solder.io/
Other
169 stars 167 forks source link

Technic Launcher unable to download solder pack #637

Closed mjra007 closed 5 years ago

mjra007 commented 7 years ago

I have set solder with nginx and it seemed to be working fine. I was able to add all the mods I wanted, create a modpack and succefully link the solder modpack to the technic launcher modpack. I have also looked at the api endpoints and all of them seem to be working fine:

Although technic always gives me an error whenever I try to download the modpack.

[B#349] net.technicpack.rest.RestfulAPIException: Invalid URL [192.99.59.1/api/modpack/] [B#349] at net.technicpack.rest.RestObject.getRestObject(RestObject.java:153) [B#349] at net.technicpack.solder.http.HttpSolderApi.getMirrorUrl(HttpSolderApi.java:59) [B#349] at net.technicpack.solder.cache.CachedSolderApi.getMirrorUrl(CachedSolderApi.java:134) [B#349] at net.technicpack.platform.PlatformPackInfoRepository.getInfoFromPlatformInfo(PlatformPackInfoRepository.java:72) [B#349] at net.technicpack.platform.PlatformPackInfoRepository.getPlatformPackInfo(PlatformPackInfoRepository.java:60) [B#349] at net.technicpack.platform.PlatformPackInfoRepository.getPackInfo(PlatformPackInfoRepository.java:46) [B#349] at net.technicpack.launchercore.modpacks.PackLoadJob$5.run(PackLoadJob.java:180) [B#349] at java.lang.Thread.run(Unknown Source) [B#349] Caused by: java.net.MalformedURLException: no protocol: 192.99.59.1/api/modpack/ [B#349] at java.net.URL.<init>(Unknown Source) [B#349] at java.net.URL.<init>(Unknown Source) [B#349] at java.net.URL.<init>(Unknown Source) [B#349] at net.technicpack.rest.RestObject.getRestObject(RestObject.java:132) [B#349] ... 7 more [B#349] net.technicpack.rest.RestfulAPIException: Invalid URL [192.99.59.1/api/modpack/] [B#349] at net.technicpack.rest.RestObject.getRestObject(RestObject.java:153) [B#349] at net.technicpack.solder.http.HttpSolderApi.getMirrorUrl(HttpSolderApi.java:59) [B#349] at net.technicpack.solder.cache.CachedSolderApi.getMirrorUrl(CachedSolderApi.java:134) [B#349] at net.technicpack.platform.PlatformPackInfoRepository.getInfoFromPlatformInfo(PlatformPackInfoRepository.java:72) [B#349] at net.technicpack.platform.PlatformPackInfoRepository.getPlatformPackInfo(PlatformPackInfoRepository.java:60) [B#349] at net.technicpack.platform.PlatformPackInfoRepository.getPackInfo(PlatformPackInfoRepository.java:46) [B#349] at net.technicpack.launchercore.modpacks.PackLoadJob$5.run(PackLoadJob.java:180) [B#349] at java.lang.Thread.run(Unknown Source) [B#349] Caused by: java.net.MalformedURLException: no protocol: 192.99.59.1/api/modpack/ [B#349] at java.net.URL.<init>(Unknown Source) [B#349] at java.net.URL.<init>(Unknown Source) [B#349] at java.net.URL.<init>(Unknown Source) [B#349] at net.technicpack.rest.RestObject.getRestObject(RestObject.java:132) [B#349] ... 7 more

skwerlman commented 7 years ago

image is not the same address as image

mjra007 commented 7 years ago

I just made a mistake while typing it, I meant to write 192.

skwerlman commented 7 years ago

Looks like you're missing the protocol and a trailing slash in your config:

{"name":"animationapi","version":"1.2.4","md5":"45a805381001e529197acba4462fdce0","filesize":"13427","url":"192.99.59.1mods\/animationapi\/animationapi-1.2.4.zip"}

Note the url: 192.99.59.1mods

Try setting repo_location to http://192.99.59.1/.

mjra007 commented 7 years ago

Just fixed that, It doesn't seem to be working still. What do you mean by protocol?

skwerlman commented 7 years ago

the protocol is the http:// bit. It looks like you might have forgot that on technicpack.net as well, judging by the client error

mjra007 commented 7 years ago

Just changed it. It doesn't seem to have fixed the problem but the technic launcher console doesn't give the error that It used to anymore, but it still fails to download it. Maybe it is also important to note that although it shows up as a solder modpack on technicpack.net in the launcher it never showed the tag.

[B#349] Starting download of http://192.99.59.1/api/modpack/enchanted-world-oasis, with 2 tries remaining [B#349] Starting download of http://192.99.59.1/api/modpack/enchanted-world-oasis, with 1 tries remaining [B#349] Starting download of http://cdn.technicpack.net/platform2/pack-icons/437620.png?1491729721, with 3 tries remaining [B#349] Starting download of http://192.99.59.1/api/modpack/enchanted-world-oasis, with 3 tries remaining [B#349] Starting download of http://cdn.technicpack.net/platform2/pack-icons/437620.png?1491729721, with 3 tries remaining [B#349] Starting download of http://192.99.59.1/api/modpack/enchanted-world-oasis, with 2 tries remaining [B#349] Starting download of http://192.99.59.1/api/modpack/enchanted-world-oasis, with 1 tries remaining [B#349] Starting download of http://cdn.technicpack.net/platform2/pack-icons/437620.png?1491729721, with 3 tries remaining [B#349] Starting download of http://192.99.59.1/api/modpack/enchanted-world-oasis, with 3 tries remaining [B#349] Starting download of http://192.99.59.1/api/modpack/enchanted-world-oasis, with 2 tries remaining [B#349] Starting download of http://cdn.technicpack.net/platform2/pack-icons/437620.png?1491729721, with 3 tries remaining [B#349] Starting download of http://192.99.59.1/api/modpack/enchanted-world-oasis, with 1 tries remaining [B#349] Starting download of http://cdn.technicpack.net/platform2/pack-icons/437620.png?1491729721, with 3 tries remaining [B#349] Starting download of http://192.99.59.1/api/modpack/enchanted-world-oasis, with 3 tries remaining [B#349] Starting download of http://cdn.technicpack.net/platform2/pack-icons/437620.png?1491729721, with 3 tries remaining [B#349] Starting download of http://192.99.59.1/api/modpack/enchanted-world-oasis, with 2 tries remaining [B#349] Starting download of http://192.99.59.1/api/modpack/enchanted-world-oasis, with 1 tries remaining [B#349] Starting download of http://cdn.technicpack.net/platform2/pack-icons/437620.png?1491729721, with 3 tries remaining

mjra007 commented 7 years ago

image image

Just because I am doubting everything, are those alright?

skwerlman commented 7 years ago

Your configs look fine. 👌

It looks like you have a download url set for your modpack. The download url is really only for non-solder modpacks, and its confusing the launcher, which thinks it can grab the full modpack as a .zip from http://192.99.59.1/api/modpack/enchanted-world-oasis.

What do you see for this option in Modpack Settings on the platform? image

mjra007 commented 7 years ago

It shows the same thing in the Modpack Settings when I have solder linked but if I unlink Solder it shows http://192.99.59.1/api/modpack/enchanted-world-oasis . I just removed it and linked solder again. It still thinks I am not using solder but I think the changes don't have immediate effect so I'll just wait a bit. Thank you for the help

skwerlman commented 7 years ago

It seems like you stumbled onto 2 bugs here, which combined to break downloads:

  1. The platform was still serving the .zip url even though solder is enabled
  2. The launcher tries the .zip url before trying solder

@GenPage This seems like a pretty easy trap to fall into, especially for users who are migrating to solder from the .zip method. Maybe the platform should act as though url is null even when it isn't, as long as solder is enabled and working?

mjra007 commented 7 years ago

That does seem to be the problem. It works now :D It recognizes the modpack as a solder modpack. Thank you.

skwerlman commented 7 years ago

Glad you got it sorted!

I'd leave this issue open for now, since the platform issue still exists.

mjra007 commented 7 years ago

I wont close it

Shmeeb commented 5 years ago

Yup, still have users experiencing this bug, even though "Modpack Location" shows "Modpack is linked to Solder"

Pyker commented 5 years ago

Closing this since the Platform issue is resolved.

Shmeeb commented 5 years ago

How is this resolved when I literally just said it's not?

Pyker commented 5 years ago

Because I literally just resolved it.