LotroCompanion / lotro-companion

A graphical tool to manage your Lotro Characters (including gear/stats simulation)
28 stars 3 forks source link

Failure of the update process on Un*x #575

Open dmorcellet opened 7 months ago

dmorcellet commented 7 months ago

From Sagarmatha, Discord PM 15/07/2023:

[main] INFO PackagesWorkspace - Downloaded package: 'patch20.9.36', version ID: 1, name:1.0 11404 [main] INFO PackagesWorkspace - Downloaded package: 'patch20.10.36.1', version ID: 1, name:1.0 14559 [main] INFO PackagesWorkspace - Downloaded package: 'patch20.10.36.1.1', version ID: 1, name:1.0 14569 [main] INFO FileUtils - Moved 'tmp/packages/expanded/26/data/config/params.txt' to './data/config/params.txt'. 14570 [main] WARN FileUtils - Could not move 'tmp/packages/expanded/26/data/lore/barters.xml' to './data/lore/barters.xml'! java.nio.file.NoSuchFileException: tmp/packages/expanded/26/data/lore/barters.xml at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:409) at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262) at java.nio.file.Files.move(Files.java:1395) at delta.updates.utils.FileUtils.move(FileUtils.java:34) at delta.updates.engine.PackageIntegrator.apply(PackageIntegrator.java:108) at delta.updates.engine.PackageIntegrator.apply(PackageIntegrator.java:132) at delta.updates.engine.PackageIntegrator.apply(PackageIntegrator.java:132) at delta.updates.engine.PackageIntegrator.applyUpdates(PackageIntegrator.java:92) at delta.updates.engine.PackageIntegrator.writePackage(PackageIntegrator.java:73) at delta.updates.engine.PackageIntegrator.doIt(PackageIntegrator.java:48) at delta.updates.engine.UpdateEngine.integratePackage(UpdateEngine.java:178) at delta.updates.engine.UpdateController.performUpdate(UpdateController.java:84) at delta.updates.engine.UpdateController.doIt(UpdateController.java:56) at delta.kickstarter.Kickstarter.checkForUpdates(Kickstarter.java:25) at delta.kickstarter.Kickstarter.main(Kickstarter.java:44) 14571 [main] WARN PackageIntegrator - Could not integrate package 'patch20.9.36', version ID: 1, name:1.0 java.lang.IllegalStateException: Cannot move file tmp/packages/expanded/26/data/lore/barters.xml to ./data/lore/barters.xml at delta.updates.engine.PackageIntegrator.apply(PackageIntegrator.java:112) at delta.updates.engine.PackageIntegrator.apply(PackageIntegrator.java:132) at delta.updates.engine.PackageIntegrator.apply(PackageIntegrator.java:132) at delta.updates.engine.PackageIntegrator.applyUpdates(PackageIntegrator.java:92) at delta.updates.engine.PackageIntegrator.writePackage(PackageIntegrator.java:73) at delta.updates.engine.PackageIntegrator.doIt(PackageIntegrator.java:48) at delta.updates.engine.UpdateEngine.integratePackage(UpdateEngine.java:178) at delta.updates.engine.UpdateController.performUpdate(UpdateController.java:84) at delta.updates.engine.UpdateController.doIt(UpdateController.java:56) at delta.kickstarter.Kickstarter.checkForUpdates(Kickstarter.java:25) at delta.kickstarter.Kickstarter.main(Kickstarter.java:44) Caused by: java.nio.file.NoSuchFileException: __tmp/packages/expanded/26/data/lore/barters.xml at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:409) at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262) at java.nio.file.Files.move(Files.java:1395) at delta.updates.utils.FileUtils.move(FileUtils.java:34) at delta.updates.engine.PackageIntegrator.apply(PackageIntegrator.java:108) ... 10 more

Lotro Companion: Hi! Thanks for these logs. We progress. Seems that the download is OK, but the archive expansion fails (I found an unprotected path in the code in which the process could continue even if files are not decompressed. That can explain the exception that comes later. The __tmp directory is created by the updates system. So it shall not exist/be created manually.

I've been working on the updates system today. Seems that sometimes, the download of files from SourceForge does not complete. In that case, the update never finishes. I started to implement the "Cancel" button.

Lotro Companion: All that shows that unit testing is too weak for these parts.

11/11/2023 Lotro Companion: The update process has not been updated, so it still fails for you on Un*x (Linux or mac?). I have some ... updates for it, but those are not released yet.