winsmith / launch-pad

A Mod Manager for Kerbal Space Program on macOS
https://forum.kerbalspaceprogram.com/index.php?/topic/173587-mac-launch-pad-a-mod-manager-for-macos/
MIT License
21 stars 4 forks source link

Repository File not Found after First Download #23

Closed zwang20 closed 5 years ago

zwang20 commented 5 years ago

The application quits unexpectedly after downloading the files. After that, I attempted to run it in the terminal but it still did not work.

Terminal output:

Could not get repository from cache: Error Domain=NSCocoaErrorDomain Code=260 "The file “ckan_repository_cache.json” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/zwang20/Library/Application Support/Steam/steamapps/common/Kerbal Space Program/LaunchPad/ckan_repository_cache.json, NSUnderlyingError=0x7f926cc34b20 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
Success: 200
Nothing unpacked, file exists
count:  19630
Fatal error: The data couldn’t be read because it is missing.: file /Users/breakthesystem/Repositories/Launch Pad/CKANKit/CKANRepository.swift, line 163
Illegal instruction: 4

I have already tried to reinstall the application but it still returned the same output

winsmith commented 5 years ago

Seems you discovered a bug! Thanks for reporting. I'll investigate and see if I can release a fix!

winsmith commented 5 years ago

The issue seems to be that LaunchPad / CKANKit can't parse ScottManleyHeadPack-1.0.0.ckan, a recent addition to CKAN.

The author of ScottManleyHeadPack is using a depends variant called any_of, which I haven't heard about before. (It might be new, I'll have to check the spec) This throws an error in parsing and crashes the app.

Since original CKAN is parsing this file, I'll create a new issue #24 to support that format. In the meantime, I'll just skip unparseable CKAN files. (Which is sad, because who wouldn't want Scott Manley's head in their game?)

[Release 1a4] fixes this issue.