Unvanquished / updater

QML based updater to install, update and launch the Unvanquished game.
https://unvanquished.net/download
15 stars 7 forks source link

Error downloading 0.53.0 on the first try #102

Closed DolceTriade closed 1 year ago

DolceTriade commented 1 year ago
Git version: v0.1.0
4 stored settings:
 - "settings/commandLineParameters" = "%command%"
 - "settings/currentVersion" = ""
 - "settings/installFinished" = "true"
 - "settings/installPath" = "/home/modi/.local/share/unvanquished/base"
Testing exception handling...
Exception handling works
qrc:/Fluid/Material/Ripple.qml:71:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/splash.qml:31:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
CurrentVersionFetcher: fetched versions: updater = "v0.1.0" game = "0.53.0"
Previously-installed game version: ""
Game update menu requested
qrc:/Fluid/Material/Ripple.qml:71:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/Fluid/Material/Ripple.qml:71:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/Fluid/Material/Ripple.qml:71:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/DownloadInfo.qml:171:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/Fluid/Material/Ripple.qml:71:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/Fluid/Material/Ripple.qml:71:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/Fluid/Material/Ripple.qml:71:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/Fluid/Material/Ripple.qml:71:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qrc:/main.qml:20:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
qml: fetching posts json: https://unvanquished.net/api/get_recent_posts/
QmlDownloader::toggleDownload called
Selected install path: "/home/modi/.local/share/unvanquished/base"
qml: Download status: Installing to /home/modi/.local/share/unvanquished/base
aria2::addUri returned 0
onDownloadCallback event DOWNLOAD_START
qml: Download status: Download started
onDownloadCallback event DOWNLOAD_COMPLETE
DownloadWorker.state changed from DOWNLOADING_TORRENT to DOWNLOADING_UNVANQUISHED
qml: Download status: Torrent downloaded
onDownloadCallback event DOWNLOAD_START
qml: Download status: Download started
onDownloadCallback event BT_DOWNLOAD_COMPLETE
Clearing installed version prior to extraction
failed to open file: fn= ""  fd= "/home/modi/.local/share/unvanquished/base/crash_server"
couldn't extract file: fp= "/home/modi/.local/share/unvanquished/base/crash_server"  fc= "/home/modi/.local/share/unvanquished/base/linux-amd64.zip"  dir= "/home/modi/.local/share/unvanquished/base"
qml: Installation failed: Error extracting update
onDownloadCallback event DOWNLOAD_COMPLETE
final EVENT_ON_DOWNLOAD_COMPLETE
Stopping downloader thread

The issue is that linux-amd64.zip is corrupt.

❯ ls -l
-rw-r--r-- 1 modi users  5431995 Aug  1 00:01 linux-amd64.zip

The real file size is

-rw-r--r-- 1 modi users  5225878 Aug  1 00:12 linux-amd64.zip

Basically aria2c doesn't properly truncate the old file if the new file is smaller than the old file.

If I manually truncate the new file, it properly extracts.

slipher commented 1 year ago

After updating to 0.53 my linux-amd64.zip is 5486824 bytes so I guess I reproduced it.