Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

[BUG] Old version of mods still not being removed after updated #91

Closed
NaiNonTH opened this issue Oct 26, 2021 · 9 comments · Fixed by #93
Closed

[BUG] Old version of mods still not being removed after updated #91

NaiNonTH opened this issue Oct 26, 2021 · 9 comments · Fixed by #93
Assignees
Labels
bug Something isn't working
Projects

Comments

@NaiNonTH
Copy link

NaiNonTH commented Oct 26, 2021

Describe the bug
So I updated Ears mod then I restarted the game. But fabric just showed me this.
Duplicate versions for mod ID 'ears': [1.4.0 at /C:/Users/NoncanbeZaza/AppData/Roaming/.minecraft/mods/ears-fabric-1.17-1.4.0.jar], [1.3.0 at /C:/Users/NoncanbeZaza/AppData/Roaming/.minecraft/mods/ears-fabric-1.17-1.3.0.jar]
This means that the old version of the mod was still not being removed. I know this one is another one of #51, But this is still not being removed completely.

To Reproduce
Steps to reproduce the behavior:

  1. Install the old version of any mods (in modrinth)
  2. Launch the game and update the mods by going to 'Mods'
  3. Click on the 'Download Logo Button'
  4. Double Click the mod that you've just installed
  5. Click 'Update'
  6. After it's finished, Go back and restart the game.
  7. Launch the game again. You'll see that the fabric error will appear.

Expected behavior
The game launched normally with the new version of mods without showing the duplicated mod error.

Please complete the following information:

  • OS: Windows 10 Pro 64-bit
  • Minecraft version: 1.17.1
  • Version 1.1.1-alpha
@NaiNonTH NaiNonTH added the bug Something isn't working label Oct 26, 2021
@DeathsGun
Copy link
Member

Do you have a log file for me?

@DeathsGun DeathsGun added the log missing Log for this issue is missing label Oct 26, 2021
@DeathsGun DeathsGun added this to To do in Bugs via automation Oct 26, 2021
@DeathsGun DeathsGun added this to the v1.1.2-alpha+1.17 milestone Oct 26, 2021
@NaiNonTH
Copy link
Author

latest.log
Here's the log after you click restart (still not launching the game again because that would cause the same thing as I said above). It seems like there's some error in deleting the old mod version.

@NaiNonTH
Copy link
Author

latest_after.log
Anddd here is the one after you launch Minecraft again.

@DeathsGun DeathsGun removed the log missing Log for this issue is missing label Oct 27, 2021
@DeathsGun
Copy link
Member

That's a nasty bug. Looks like ModManager couldn't modify dynamic-fps-2.0.5.jar.

To bypass the Windows file lock, ModManager writes the text "MODMANAGER" into the jar so that fabric can't load it the next time. It looks like this hasn't worked here.

I will need to setup a Windows VM to debug this more.

Relevant log lines `latest.log`
[20:02:48] [DefaultDispatcher-worker-6/INFO]: Updating Dynamic FPS
[20:02:48] [DefaultDispatcher-worker-6/INFO]: Error while deleting C:\Users\NoncanbeZaza\AppData\Roaming\.minecraft\mods\dynamic-fps-2.0.5.jar trying on restart again

latest_after.log

[20:06:03] [main/FATAL]: A critical error occurred
net.fabricmc.loader.discovery.ModResolutionException: Duplicate versions for mod ID 'dynamicfps': [2.0.6 at /C:/Users/NoncanbeZaza/AppData/Roaming/.minecraft/mods/dynamic-fps-2.0.6.jar], [2.0.5 at /C:/Users/NoncanbeZaza/AppData/Roaming/.minecraft/mods/dynamic-fps-2.0.5.jar]
	at net.fabricmc.loader.discovery.ModCandidateSet.toSortedSet(ModCandidateSet.java:100) ~[fabric-loader-0.11.7.jar:?]
	at net.fabricmc.loader.discovery.ModResolver.findCompatibleSet(ModResolver.java:115) ~[fabric-loader-0.11.7.jar:?]
	at net.fabricmc.loader.discovery.ModResolver.resolve(ModResolver.java:832) ~[fabric-loader-0.11.7.jar:?]
	at net.fabricmc.loader.FabricLoader.setup(FabricLoader.java:195) ~[fabric-loader-0.11.7.jar:?]
	at net.fabricmc.loader.FabricLoader.load(FabricLoader.java:185) [fabric-loader-0.11.7.jar:?]
	at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:132) [fabric-loader-0.11.7.jar:?]
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28) [fabric-loader-0.11.7.jar:?]

@NaiNonTH
Copy link
Author

This also happens to the other mods. I forgot to tell you that I recreated that bug thing by using Dynamic FPS mod instead of Ears mod due to the game just crashed before launching for some reason

@DeathsGun
Copy link
Member

Yeah can't currently not say why that's happening because Windows should normally allow programs to write to which are open in other programs.

@DeathsGun
Copy link
Member

I cloud replicate it using the 1.1.1 version and the Minecraft launcher but not using the IDE. I need some further testing.

DeathsGun added a commit that referenced this issue Nov 2, 2021
Closes #91

Signed-off-by: DeathsGun <deathsgun@protonmail.com>
@DeathsGun DeathsGun moved this from To do to In progress in Bugs Nov 3, 2021
Bugs automation moved this from In progress to Done Nov 3, 2021
@DeathsGun
Copy link
Member

The PR didn't remove the problem completely

@DeathsGun DeathsGun reopened this Nov 3, 2021
Bugs automation moved this from Done to In progress Nov 3, 2021
@DeathsGun
Copy link
Member

When removing mods you may need to restart twice to get the mod to be not loaded again.
This will be needed to be fixed in the future

Bugs automation moved this from In progress to Done Nov 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
No open projects
Bugs
Done
Development

Successfully merging a pull request may close this issue.

2 participants