gorilla-devs / GDLauncher

GDLauncher is a simple, yet powerful Minecraft custom launcher with a strong focus on the user experience
https://gdevs.io
GNU General Public License v3.0
1.22k stars 246 forks source link

v1.1.2 - Launcher doesn't load versions from a curseforge pack #870

Open FnordMan opened 3 years ago

FnordMan commented 3 years ago

Basically just open the Modpack and versions and watch it spin away forever. Tried it on multiple modpacks, the behavior is the same. (they're all curseforge packs)

edit: Forgot to mention, it does load the modpack versions fine on v1.1.1

atakangurel commented 3 years ago

Also it opens new loaded Modpack's version page. But it doesn't open if you download the pack in previous version of GDLauncher.

Anaerin commented 3 years ago

Can confirm. Worked fine in 1.1.1, but now the "loading versions" message just spins. Console has the message:

Modpack.js:58 Uncaught (in promise) TypeError: Cannot read property 'find' of undefined
    at Modpack.js:58
    at l (runtime.js:63)
    at Generator._invoke (runtime.js:293)
    at Generator.next (runtime.js:118)
    at n (asyncToGenerator.js:3)
    at s (asyncToGenerator.js:25)
atakangurel commented 3 years ago

I found a basic solution. If you download the pack in new version and copy new files to old version it works again. For time played option there is a file called "manifest.json" if you edit timePlayed part you can still have your played time without any loss. (Also I think this is happening because of the "manifest.json". Starting codes are different in two versions.

WindFox commented 3 years ago

Actually, it's config.json. and yes, it's because the older instances do not include the source tag in loader. I've just manually added that in from a newer installed instance. ....except for on pack I had installed where the project ID and file ID were swapped for some reason. (EDIT: It was ALL of my older packs that had this)

Bass2style commented 3 years ago

have you a example of this ? because i have a ton of modpacks, and i really don't want to delete all of them, and reinstall it one by one.

WindFox commented 3 years ago

Ok, here's what I did to fix the older packs. I used VSCode to do this, but any editor should do (but one with a code formatter command is preferred since the JSON file is one long line that really hard to parse through by hand. It's SHIFT+ALT+F in VSCode.)

I opened a pack downloaded with the newer version of the launcher to check the file. And that's when I discovered a few things:

To fix this yourself:

  1. Close GD Launcher (your changes will not take effect until GDL is restarted anyways)
  2. Make the code readable (optional but have fun with that. Fun fact: GDL will accept the edited file and just remove the formatting later)
  3. Scroll to the end of the file.
  4. Highlight the whole loader section. It'll look like this (The id's used are for my own modpack on CF)
    "loader": {
        "loaderType": "forge",
        "mcVersion": "1.16.5",
        "loaderVersion": "1.16.5-36.1.4",
        "fileID": 374896,
        "projectID": 3278573
    }
  5. Cut it and remove the comma before it. (Don't want no errors trying to load this file)
  6. Scroll back to the start of the file.
  7. Highlight the whole modloader section (but not that comma after the bracket, you wanna keep that):
    "modloader": [
        "forge",
        "1.16.5",
        "1.16.5-36.1.4",
        374896,
        3278573
    ]
  8. Paste the loader section overtop. You HAVE to replace the modloader section (or remove it) otherwise, when GDL restarts, it'll undo your work.
  9. Swap the numbers for fileID and projectID
    "fileID": 3278573,
    "projectID": 374896
  10. Add the following to a new line inside the loader section. (I put it between "loaderVersion" and "fileID" since that's where it is on newer instances) (This is assuming, of course, the pack is from CurseForge): "source": "curseforge",
  11. Save the file.
  12. Run GDLauncher.
  13. Right-click the pack you changed and click Manage.

EDIT: You can repeat 2~11 for every pack that needs fixed. It'll just take longer for GDL to startup in step 12 (it'll get there, just have paitence.)

If you did it right you should see the banner for the pack on the Overview section telling you the pack name and version. You should also now be able to go to the Modpack section and it'll work correctly now.

Technically you don't HAVE to move the loader section to the top of the file. You can just make the changes where it is and it'll still work. But you DO have to remove the modloader section (and that comma just after it) or GDL will keep overwriting your changes with the broken one. You still have to swap the numbers for projectID and fileID, as well as add the source line or it won't work at all.

If you're wondering why I just don't make a pull request myself.... I don't know electron. Hopefully, somebody who does can take this info and fix this. The code to update the file is still there and triggers if the modloader section exists, so someone should fix that. My theory is that by fixing that, it should fix all instances that still have that section automatically.

Bass2style commented 3 years ago

i tryed with ATM6 and it's not working.

i think i'm gonna copy my GDL folder, download all my modpacks, and only importing my settings and maps, because it's really annoying...

edit : it's seems working for most packs, but ATM6 won't, if i can fix all the other, it's a good begining.

Feky commented 3 years ago

Garbage update now I cant even update my mod pack why they even push this update without testing it first 😡

Feky commented 3 years ago

They released an update and still it's not fixed garbage client and update! 😡

Bass2style commented 3 years ago

you need to manually fix your instances like WindFox said, i takes a bit of time, but after that it's working. (and the vstudio shift+alt+F shortcut is sooo usefull.)

Feky commented 3 years ago

you need to manually fix your instances like WindFox said, i takes a bit of time, but after that it's working. (and the vstudio shift+alt+F shortcut is sooo usefull.)

I am just a simple man I don't know how to do all that stuff. They broke the thing that was working just fine and still after 1.1.5 update it's not working. Now I cant update my packs and I'm thinking to switch to multimc 😡

FnordMan commented 3 years ago

I am just a simple man I don't know how to do all that stuff. They broke the thing that was working just fine and still after 1.1.5 update it's not working. Now I cant update my packs and I'm thinking to switch to multimc 😡

Good luck with that, MultiMC doesn't do pack updates at all.

RemagOfficial commented 3 years ago

you need to manually fix your instances like WindFox said, i takes a bit of time, but after that it's working. (and the vstudio shift+alt+F shortcut is sooo usefull.)

I am just a simple man I don't know how to do all that stuff. They broke the thing that was working just fine and still after 1.1.5 update it's not working. Now I cant update my packs and I'm thinking to switch to multimc 😡

https://discord.com/channels/398091532881756161/423620014214479873/836730145905180733

WindFox commented 3 years ago

Just an update to this: I see that this issue was fixed as of 1.1.5.

I checked with a friend (since all of my instances were manually fixed). It seems to do the easier method of leaving the loader section at the bottom and deleting the modloader section. But it works without needing to manually fix the file now.