KSP-CKAN / CKAN

The Comprehensive Kerbal Archive Network
https://forum.kerbalspaceprogram.com/index.php?/topic/197082-*
Other
1.99k stars 348 forks source link

[Bug]: NRE, Repository update failed #4000

Closed TunedRockets closed 10 months ago

TunedRockets commented 10 months ago

Is there an existing issue for this?

Operating System

Windows

CKAN Version

1.34.4

Games

KSP 1

Game Version

1.12.3.3173

Did you make any manual changes to your game folder (i.e., not via CKAN)?

not that i am aware of. (except insofar as trying to solve the problem, though nothing i haven't reset)

Describe the bug

When trying to open ckan, it tries to refresh, but only outputs this:

Scanning for DLCs and manually installed modules... Object reference not set to an instance of an object. Repository update failed!

no downloaded or possible to download mods show up. i have tried to reinstall a fresh ksp instance, and a fresh CKAN instance, but neither fix the problem.

Steps to reproduce

run the ckan.exe

Relevant log output

This code came form an error when trying to close the ckan window, though i have not encountered it again so it may be irrelevant:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at CKAN.GUI.Main.OnFormClosed(FormClosedEventArgs e)
   at System.Windows.Forms.Form.WmClose(Message& m)
   at CKAN.GUI.Main.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
HebaruSan commented 10 months ago

Hi @TunedRockets, thanks for the report! This log doesn't give us enough information to identify the cause of this problem, so we'll need to gather more information to figure it out.

If you unzip this log4net.xml file into the directory where your ckan.exe file lives and then run CKAN, it will generate a CKAN.log file that you can share here.

TunedRockets commented 10 months ago

Hi. While trying some more stuff i did a complete uninstall of KSP and CKAN and that fixed the problem. So unfortunately (or fortunately really) i don't get the bug anymore and cannot help track it down.

HebaruSan commented 10 months ago

A user on Discord reported the same issue and gathered logs for us:

    67 INFO  CKAN.CmdLine.MainClass  CKAN started.
   212 INFO  CKAN.CmdLine.MainClass  CKAN exiting.
   226 INFO  CKAN.CmdLine.MainClass  CKAN exiting.
   303 INFO  CKAN.GameInstanceManager  Loading KSP instances
   304 DEBUG CKAN.GameInstanceManager  Loading Auto KSP from c:/program files (x86)/steam/SteamApps/common/Kerbal Space Program
   316 DEBUG CKAN.Games.KerbalSpaceProgram.GameVersionProviders.KspBuildMap  Getting cached build map
   320 DEBUG CKAN.GameInstance  Found version 1.12.5.3190
   322 INFO  CKAN.GameInstance  Initialising c:/program files (x86)/steam/SteamApps/common/Kerbal Space Program/CKAN
   325 INFO  CKAN.GameInstance  Initialised c:/program files (x86)/steam/SteamApps/common/Kerbal Space Program/CKAN
   379 INFO  CKAN.GUI.Main  Starting the GUI
   731 DEBUG CKAN.GameInstance  Checking if KSP is in my current dir: C:\Users\blake\Desktop\Games Launchers Etc\Launchers
   731 DEBUG CKAN.GameInstance  Checking if KSP is in my exe dir: C:\Users\blake\Desktop\Games Launchers Etc\Launchers
   731 DEBUG CKAN.GameInstance  Checking if KSP2 is in my current dir: C:\Users\blake\Desktop\Games Launchers Etc\Launchers
   732 DEBUG CKAN.GameInstance  Checking if KSP2 is in my exe dir: C:\Users\blake\Desktop\Games Launchers Etc\Launchers
   753 DEBUG CKAN.GUI.Util  Found screen: {X=0,Y=0,Width=1536,Height=824}
   753 DEBUG CKAN.GUI.Util  Clamped location: {X=232,Y=0}
   786 INFO  CKAN.GUI.URLHandlers  Adding URL handler to registry
   786 INFO  CKAN.GUI.URLHandlers  URL handler already exists with the same path
   817 INFO  CKAN.GUI.Main  GUI started
   890 DEBUG CKAN.RegistryManager  Preparing to load registry at c:/program files (x86)/steam/SteamApps/common/Kerbal Space Program/CKAN
   892 DEBUG CKAN.RegistryManager  Checking for stale lock file at c:/program files (x86)/steam/SteamApps/common/Kerbal Space Program/CKAN\registry.locked
   892 DEBUG CKAN.RegistryManager  Trying to create lock file: c:/program files (x86)/steam/SteamApps/common/Kerbal Space Program/CKAN\registry.locked
   892 DEBUG CKAN.RegistryManager  Lock file created: c:/program files (x86)/steam/SteamApps/common/Kerbal Space Program/CKAN\registry.locked
   894 DEBUG CKAN.RegistryManager  Trying to load registry from c:/program files (x86)/steam/SteamApps/common/Kerbal Space Program/CKAN\registry.json
   989 DEBUG CKAN.RegistryManager  Registry JSON loaded; parsing...
  2520 DEBUG CKAN.RegistryManager  Registry loaded and parsed
  2521 INFO  CKAN.RegistryManager  Loaded CKAN registry at c:/program files (x86)/steam/SteamApps/common/Kerbal Space Program/CKAN\registry.json
  2576 INFO  CKAN.GUI.Main  Making auto-update call
  2577 DEBUG CKAN.Net  About to download https://api.github.com/repos/KSP-CKAN/CKAN/releases/latest
  2845 DEBUG CKAN.Net  Response from https://api.github.com/repos/KSP-CKAN/CKAN/releases/latest:

Vary: Accept, Accept-Encoding, Accept, X-Requested-With
X-GitHub-Media-Type: github.v3; format=json
x-github-api-version-selected: 2022-11-28
Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
Access-Control-Allow-Origin: *
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
Content-Security-Policy: default-src 'none'
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1705539588
X-RateLimit-Resource: core
X-RateLimit-Used: 2
Transfer-Encoding: chunked
X-GitHub-Request-Id: E761:4BE3:3DF8674:7F91F80:65A86A38
Accept-Ranges: bytes
Cache-Control: public, max-age=60, s-maxage=60
Content-Type: application/json; charset=utf-8
Date: Thu, 18 Jan 2024 00:00:56 GMT
ETag: W/"37e6dc99bb728dff5d04fa00416ac54508aaeecd369ee1955aed57b5dab411eb"
Last-Modified: Thu, 04 Jan 2024 18:38:40 GMT
Server: GitHub.com

{"url":"https://api.github.com/repos/KSP-CKAN/CKAN/releases/135871692","assets_url":"https://api.github.com/repos/KSP-CKAN/CKAN/releases/135871692/assets","upload_url":"https://uploads.github.com/repos/KSP-CKAN/CKAN/releases/135871692/assets{?name,label}","html_url":"https://github.com/KSP-CKAN/CKAN/releases/tag/v1.34.4","id":135871692,"author":{"login":"HebaruSan","id":1559108,"node_id":"MDQ6VXNlcjE1NTkxMDg=","avatar_url":"https://avatars.githubusercontent.com/u/1559108?v=4","gravatar_id":"","url":"https://api.github.com/users/HebaruSan","html_url":"https://github.com/HebaruSan","followers_url":"https://api.github.com/users/HebaruSan/followers","following_url":"https://api.github.com/users/HebaruSan/following{/other_user}","gists_url":"https://api.github.com/users/HebaruSan/gists{/gist_id}","starred_url":"https://api.github.com/users/HebaruSan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HebaruSan/subscriptions","organizations_url":"https://api.github.com/users/HebaruSan/orgs","repos_url":"https://api.github.com/users/HebaruSan/repos","events_url":"https://api.github.com/users/HebaruSan/events{/privacy}","received_events_url":"https://api.github.com/users/HebaruSan/received_events","type":"User","site_admin":false},"node_id":"RE_kwDOAV-5Ys4IGTzM","tag_name":"v1.34.4","target_commitish":"master","name":"Niven","draft":false,"prerelease":false,"created_at":"2024-01-04T18:27:52Z","published_at":"2024-01-04T18:35:53Z","assets":[{"url":"https://api.github.com/repos/KSP-CKAN/CKAN/releases/assets/143805739","id":143805739,"node_id":"RA_kwDOAV-5Ys4Ikk0r","name":"AutoUpdater.exe","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/vnd.microsoft.portable-executable","state":"uploaded","size":423936,"download_count":9861,"created_at":"2024-01-04T18:38:39Z","updated_at":"2024-01-04T18:38:40Z","browser_download_url":"https://github.com/KSP-CKAN/CKAN/releases/download/v1.34.4/AutoUpdater.exe"},{"url":"https://api.github.com/repos/KSP-CKAN/CKAN/releases/assets/143805736","id":143805736,"node_id":"RA_kwDOAV-5Ys4Ikk0o","name":"ckan-1.34.4-1.noarch.rpm","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/x-rpm","state":"uploaded","size":1529275,"download_count":207,"created_at":"2024-01-04T18:38:38Z","updated_at":"2024-01-04T18:38:39Z","browser_download_url":"https://github.com/KSP-CKAN/CKAN/releases/download/v1.34.4/ckan-1.34.4-1.noarch.rpm"},{"url":"https://api.github.com/repos/KSP-CKAN/CKAN/releases/assets/143805731","id":143805731,"node_id":"RA_kwDOAV-5Ys4Ikk0j","name":"CKAN.dmg","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/x-apple-diskimage","state":"uploaded","size":5013504,"download_count":434,"created_at":"2024-01-04T18:38:37Z","updated_at":"2024-01-04T18:38:37Z","browser_download_url":"https://github.com/KSP-CKAN/CKAN/releases/download/v1.34.4/CKAN.dmg"},{"url":"https://api.github.com/repos/KSP-CKAN/CKAN/releases/assets/143805726","id":143805726,"node_id":"RA_kwDOAV-5Ys4Ikk0e","name":"ckan.exe","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/vnd.microsoft.portable-executable","state":"uploaded","size":4875264,"download_count":17636,"created_at":"2024-01-04T18:38:36Z","updated_at":"2024-01-04T18:38:36Z","browser_download_url":"https://github.com/KSP-CKAN/CKAN/releases/download/v1.34.4/ckan.exe"},{"url":"https://api.github.com/repos/KSP-CKAN/CKAN/releases/assets/143805734","id":143805734,"node_id":"RA_kwDOAV-5Ys4Ikk0m","name":"ckan_1.34.4_all.deb","label":"","uploader":{"login":"github-actions[bot]","id":41898282,"node_id":"MDM6Qm90NDE4OTgyODI=","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4","gravatar_id":"","url":"https://api.github.com/users/github-actions%5Bbot%5D","html_url":"https://github.com/apps/github-actions","followers_url":"https://api.github.com/users/github-actions%5Bbot%5D/followers","following_url":"https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-actions%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/github-actions%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/github-actions%5Bbot%5D/repos","events_url":"https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/github-actions%5Bbot%5D/received_events","type":"Bot","site_admin":false},"content_type":"application/vnd.debian.binary-package","state":"uploaded","size":1052296,"download_count":200,"created_at":"2024-01-04T18:38:38Z","updated_at":"2024-01-04T18:38:38Z","browser_download_url":"https://github.com/KSP-CKAN/CKAN/releases/download/v1.34.4/ckan_1.34.4_all.deb"}],"tarball_url":"https://api.github.com/repos/KSP-CKAN/CKAN/tarball/v1.34.4","zipball_url":"https://api.github.com/repos/KSP-CKAN/CKAN/zipball/v1.34.4","body":"[![Niven ring](https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Ringworld_drawing.jpg/640px-Ringworld_drawing.jpg)](https://en.wikipedia.org/wiki/Known_Space)\r\n\r\n---\r\n\r\n## Changes since v1.34.2\r\n\r\n### Features\r\n\r\n- [CLI] Pause after administrator error message (#3966 by: HebaruSan; reviewed: techman83)\r\n- [Multiple] Put auto-installed mods in ignored modpack group by default (#3978 by: HebaruSan)\r\n- [GUI] Add links to hidden tags and labels below mod list (#3979, #3980 by: HebaruSan)\r\n- [Core] Detect and use Windows KSP2 executable on Linux (#3984 by: JackOfHertz; reviewed: HebaruSan)\r\n\r\n### Bugfixes\r\n\r\n- [Core] Oops, `HttpClient` actually sucks (#3960 by: HebaruSan; reviewed: techman83)\r\n- [Multiple] Usability improvements for adding game instance (#3964 by: HebaruSan; reviewed: JonnyOThan)\r\n- [Core] Fix NullReferenceException in csv/tsv export (#3967 by: HebaruSan)\r\n- [Core] Fix cache timestamp comparisons (#3974 by: HebaruSan)\r\n- [GUI] Fix compatible popup messing with max game version column (#3976 by: HebaruSan)\r\n- [Core] Fix Audit Recommendations option (#3988 by: HebaruSan)\r\n- [Multiple] Installation message usability improvements (#3989 by: HebaruSan)\r\n\r\n### Internal\r\n\r\n- [Netkan] Re-sort module properties after merging (#3957 by: HebaruSan)\r\n- [Netkan] Update and optimize meta tester and inflator images (#3958, #3968 by: HebaruSan; reviewed: techman83)\r\n- [Netkan] Generate schema compliant game versions from swinfo.json (#3969 by: HebaruSan)\r\n- [Core] Save and load game version for fake KSP2 instances (#3986 by: HebaruSan)\r\n- [Netkan] Resolve compatibility conflicts after multi-host merge (#3991 by: HebaruSan)\r\n\r\n## Notes\r\n\r\n- CKAN releases are built in clean-room conditions to protect against viruses. If your virus scanner reports a problem, it's almost certainly a false positive. Please report such problems to the company that produces your virus scanner so they can update their whitelisting.\r\n- This release of the CKAN has not been tested on Mono releases prior to 6.8. We highly recommend that Mac and Linux users upgrade to the latest stable release of Mono from [mono-project.com](http://www.mono-project.com/). You will need the equivalent of the mono-complete package for your OS.\r\n\r\n## How should I install?\r\n\r\nOS | Description\r\n:-- | :--\r\nWindows | Download **ckan.exe** and run it. Make sure you have [.NET 4.8](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net48) or later installed.\r\nmacOS | Get the **.dmg**, open it, copy **CKAN.app** somewhere and run it\r\nDebian, Ubuntu, Linux Mint | [Install from our APT repo for automated updates](https://github.com/KSP-CKAN/CKAN/blob/master/doc/apt-repo.md), or get the **.deb** file and install it with dpkg-install/apt-get/apt\r\nFedora, openSUSE | [Install from our RPM repo for automated updates](https://github.com/KSP-CKAN/CKAN/blob/master/doc/rpm-repo.md), or get the **.rpm** file and install it with rpm/yum/dnf/zypper\r\nArch, Manjaro | CKAN is in the [Arch User Repository](https://aur.archlinux.org/packages/ckan/). If Arch's MSBuild breaks again, get ckan.exe and run it with Mono.\r\nOther | Get **ckan.exe** and run it with Mono\r\n\r\n**Nobody** needs to download AutoUpdate.exe.\r\n\r\n---\r\n\r\nRelease image under CC-BY-3.0, [courtesy of Eric M. Jones](https://commons.wikimedia.org/wiki/File:Ringworld_drawing.jpg)\r\n"}
  3143 DEBUG CKAN.GUI.Main  Current instance updated, scanning
  3200 DEBUG CKAN.GUI.Main  Scanning before repo update
  3202 INFO  CKAN.RegistryManager  Scanning for installed mods...
  3203 DEBUG CKAN.CkanTransaction  Trying to set max timeout to 49:17:02:47.294
  3204 DEBUG CKAN.CkanTransaction  Failed to set s_cachedMaxTimeout
  3204 DEBUG CKAN.CkanTransaction  Failed to set s_maximumTimeout
  3205 DEBUG CKAN.CkanTransaction  Starting transaction with timeout 49:17:02:47.294
  3379 DEBUG CKAN.RegistryManager  Registering DLLs: GameData/ModuleManager.4.2.3.dll, GameData/000_ClickThroughBlocker/Plugins/ClickThroughBlocker.dll, GameData/000_Harmony/0Harmony.dll, GameData/000_Harmony/HarmonyInstallChecker.dll, GameData/000_Toolbar/Plugins/aaa_Toolbar.dll, GameData/001_ToolbarControl/Plugins/ToolbarControl.dll, GameData/B9PartSwitch/Plugins/B9PartSwitch.dll, GameData/BetterBurnTime/BetterBurnTime.dll, GameData/BetterTimeWarp/Plugins/BetterTimeWarpCont.dll, GameData/DistantObject/Plugins/DistantObject.dll, GameData/DistantObject/Plugins/KSPe.Light.DOE.dll, GameData/DistantObject/Plugins/PluginData/MeshEngine.dll, GameData/DistantObject/Plugins/PluginData/MeshEngineStock.dll, GameData/DistantObject/Plugins/PluginData/MeshEngineTweakScale.dll, GameData/EnvironmentalVisualEnhancements/Plugins/Atmosphere.dll, GameData/EnvironmentalVisualEnhancements/Plugins/CelestialShadows.dll, GameData/EnvironmentalVisualEnhancements/Plugins/CityLights.dll, GameData/EnvironmentalVisualEnhancements/Plugins/EVEManager.dll, GameData/EnvironmentalVisualEnhancements/Plugins/PartFX.dll, GameData/EnvironmentalVisualEnhancements/Plugins/PQSManager.dll, GameData/EnvironmentalVisualEnhancements/Plugins/ShaderLoader.dll, GameData/EnvironmentalVisualEnhancements/Plugins/Terrain.dll, GameData/EnvironmentalVisualEnhancements/Plugins/TextureConfig.dll, GameData/EnvironmentalVisualEnhancements/Plugins/Utils.dll, GameData/EnvironmentalVisualEnhancements/Plugins/_BuildManager.dll, GameData/KerbalEngineer/KerbalEngineer.dll, GameData/KerbalRenamer/plugins/Renamer.dll, GameData/Kopernicus/Plugins/Kopernicus.dll, GameData/KSPCommunityFixes/Plugins/0_MultipleModuleInPartAPI.dll, GameData/KSPCommunityFixes/Plugins/KSPCommunityFixes.dll, GameData/MechJeb2/Plugins/MechJeb2.dll, GameData/MechJeb2/Plugins/System.Buffers.dll, GameData/ModularFlightIntegrator/ModularFlightIntegrator.dll, GameData/PlanetShine/Plugins/PlanetShine.dll, GameData/RealSolarSystem/Plugins/RealSolarSystem.dll, GameData/ReStock/Plugins/Restock.dll, GameData/RocketSoundEnhancement/Plugins/RocketSoundEnhancement.dll, GameData/RSSDateTime/Plugins/RSSTimeFormatter.dll, GameData/RSSVE/Plugins/RSSVE.dll, GameData/Scatterer/Scatterer.dll, GameData/SpaceTuxLibrary/Plugins/ButtonManager.dll, GameData/SpaceTuxLibrary/Plugins/KSP_ColorPicker.dll, GameData/SpaceTuxLibrary/Plugins/KSP_Log.dll, GameData/SpaceTuxLibrary/Plugins/KSP_PartHighlighter.dll, GameData/SpaceTuxLibrary/Plugins/SpaceTuxUtility.dll, GameData/SpaceTuxLibrary/Plugins/VesselModuleSave.dll, GameData/TextureReplacer/Plugins/TextureReplacer.dll, GameData/TriggerTech/KerbalAlarmClock/KerbalAlarmClock.dll, GameData/TriggerTech/TransferWindowPlanner/TransferWindowPlanner.dll, GameData/Waterfall/Plugins/Waterfall.dll, GameData/[x]_Science!/Plugins/[x]_Science!.dll
  3393 ERROR CKAN.GUI.Main  Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at CKAN.Extensions.DictionaryExtensions.<>c__DisplayClass0_0`2.<DictionaryEquals>b__1(K k)
   at System.Linq.Enumerable.All[TSource](IEnumerable`1 source, Func`2 predicate)
   at CKAN.Registry.SetDlcs(Dictionary`2 dlcs)
   at CKAN.RegistryManager.ScanUnmanagedFiles()
   at CKAN.GUI.Main.UpdateRepo(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
HebaruSan commented 10 months ago

The user on Discord had disabled one of the DLCs in a menu in Steam:

image

This apparently deletes the files for that DLC but leaves behind all the folders:

image

Which makes the DLC detector's IsInstalled return true while leaving the version out param as null:

https://github.com/KSP-CKAN/CKAN/blob/1264e205d4e80e0395931305f621b5f50817780a/Core/Games/KerbalSpaceProgram/DLC/StandardDlcDetectorBase.cs#L59-L92

Our IsInstalled check should probably return false for the case where the user disabled the DLC in Steam.

alphaleadership commented 3 months ago
   751 INFO  CKAN.CmdLine.MainClass  CKAN started.
  2644 INFO  CKAN.CmdLine.MainClass  CKAN exiting.
  2761 INFO  CKAN.CmdLine.MainClass  CKAN exiting.
  3525 INFO  CKAN.GameInstanceManager  Loading KSP instances
  3541 DEBUG CKAN.GameInstanceManager  Loading French from D:/KerbalSpaceProgram/French
  3650 DEBUG CKAN.Games.KerbalSpaceProgram.GameVersionProviders.KspBuildMap  Getting cached build map
  3687 DEBUG CKAN.GameInstance  Found version 1.12.5.3190
  3694 INFO  CKAN.GameInstance  Initialising D:/KerbalSpaceProgram/French/CKAN
  3713 INFO  CKAN.GameInstance  Initialised D:/KerbalSpaceProgram/French/CKAN
  4275 INFO  CKAN.GUI.Main  Starting the GUI
  8048 DEBUG CKAN.GameInstance  Checking if KSP is in my current dir: D:\tri
  8053 DEBUG CKAN.GameInstance  Checking if KSP is in my exe dir: D:\tri
  8054 DEBUG CKAN.GameInstance  Checking if KSP2 is in my current dir: D:\tri
  8061 DEBUG CKAN.GameInstance  Checking if KSP2 is in my exe dir: D:\tri
  8456 DEBUG CKAN.GUI.Util  Found screen: {X=0,Y=0,Width=1366,Height=768}
  8459 DEBUG CKAN.GUI.Util  Clamped location: {X=188,Y=87}
  8522 INFO  CKAN.GUI.URLHandlers  Adding URL handler to registry
  8644 INFO  CKAN.GUI.Main  GUI started
  9091 DEBUG CKAN.RegistryManager  Preparing to load registry at D:/KerbalSpaceProgram/French/CKAN
  9102 DEBUG CKAN.RegistryManager  Checking for stale lock file at D:/KerbalSpaceProgram/French/CKAN\registry.locked
  9104 DEBUG CKAN.RegistryManager  Trying to create lock file: D:/KerbalSpaceProgram/French/CKAN\registry.locked
  9106 DEBUG CKAN.RegistryManager  Lock file created: D:/KerbalSpaceProgram/French/CKAN\registry.locked
  9111 DEBUG CKAN.RegistryManager  Trying to load registry from D:/KerbalSpaceProgram/French/CKAN\registry.json
  9120 DEBUG CKAN.RegistryManager  Registry JSON loaded; parsing...
 10968 DEBUG CKAN.RegistryManager  Registry loaded and parsed
 10970 INFO  CKAN.RegistryManager  Loaded CKAN registry at D:/KerbalSpaceProgram/French/CKAN\registry.json
 11244 INFO  CKAN.GUI.Main  Making auto-update call
 11260 DEBUG CKAN.Net  About to download https://api.github.com/repos/KSP-CKAN/CKAN/releases/latest
 13614 DEBUG CKAN.Net  Web request failed with non-protocol error, retrying in 0 milliseconds: Impossible de se connecter au serveur distant
 15954 DEBUG CKAN.Net  Web request failed with non-protocol error, retrying in 100 milliseconds: Impossible de se connecter au serveur distant
 18185 DEBUG CKAN.Net  Web request failed with non-protocol error, retrying in 200 milliseconds: Impossible de se connecter au serveur distant
 20766 ERROR CKAN.GUI.ErrorDialog  Erreur durant la mise à jour auto :
Impossible de se connecter au serveur distant
 51207 ERROR CKAN.GUI.Main  Error in auto-update
System.Net.WebException: Impossible de se connecter au serveur distant ---> System.Net.Sockets.SocketException: Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée 127.0.0.1:12888
   à System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   à System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- Fin de la trace de la pile d'exception interne ---
   à System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
   à System.Net.WebClient.DownloadString(Uri address)
   à CKAN.Net.DownloadText(Uri url, String authToken, String mimeType, Int32 timeout)
   à CKAN.AutoUpdate.FetchLatestReleaseInfo()
   à CKAN.GUI.Main.CheckForCKANUpdate()
 51341 DEBUG CKAN.GUI.Main  Current instance updated, scanning
 51550 DEBUG CKAN.GUI.Main  Scanning before repo update
 51559 INFO  CKAN.RegistryManager  Analyse des mods installés...
 51565 DEBUG CKAN.CkanTransaction  Trying to set max timeout to 49:17:02:47.294
 51585 DEBUG CKAN.CkanTransaction  Failed to set s_cachedMaxTimeout
 51587 DEBUG CKAN.CkanTransaction  Failed to set s_maximumTimeout
 51591 DEBUG CKAN.CkanTransaction  Starting transaction with timeout 49:17:02:47.294
 52620 DEBUG CKAN.RegistryManager  Registering DLLs: GameData/999_Scale_Redist.dll, GameData/ModuleManager.4.2.3.dll, GameData/000_ClickThroughBlocker/Plugins/ClickThroughBlocker.dll, GameData/000_Harmony/0Harmony.dll, GameData/000_Harmony/HarmonyInstallChecker.dll, GameData/000_Toolbar/Plugins/aaa_Toolbar.dll, GameData/001_ToolbarControl/Plugins/ToolbarControl.dll, GameData/999_KSP-Recall/Plugins/Attached.dll, GameData/999_KSP-Recall/Plugins/AttachedOnEditor.dll, GameData/999_KSP-Recall/Plugins/ChillingOut.dll, GameData/999_KSP-Recall/Plugins/Driftless.dll, GameData/999_KSP-Recall/Plugins/KSP-Recall.dll, GameData/999_KSP-Recall/Plugins/KSPe.Light.Recall.dll, GameData/999_KSP-Recall/Plugins/Refunding.dll, GameData/999_KSP-Recall/Plugins/Resourceful.dll, GameData/CactEye/Plugins/CactEye2.dll, GameData/CactEye/Plugins/DistantObjectHook.dll, GameData/CactEye/Plugins/PartWrapper.dll, GameData/CommunityCategoryKit/CCK.dll, GameData/CustomPreLaunchChecks/CustomPreLaunchChecks.dll, GameData/DistantObject/Plugins/DistantObject.dll, GameData/DistantObject/Plugins/PluginData/MeshEngine.dll, GameData/DistantObject/Plugins/PluginData/MeshEngineStock.dll, GameData/DistantObject/Plugins/PluginData/MeshEngineTweakScale.dll, GameData/DistantObject/Plugins/PluginData/SolarSystemKopernicus.dll, GameData/DistantObject/Plugins/PluginData/SolarSystemStock.dll, GameData/ExtraplanetaryLaunchpads/Plugins/Launchpad.dll, GameData/FMRS/Plugins/FMRSContinued.dll, GameData/KAS/Plugins/KAS-API-v2.dll, GameData/KAS/Plugins/KAS.dll, GameData/KAS/Plugins/KSPDev_Utils.2.7.dll, GameData/KerbalJointReinforcement/Plugin/KerbalJointReinforcement.dll, GameData/KerbalKonstructs/KerbalKonstructs.dll, GameData/KerbalLaunchVehicles/Plugins/KerbalLaunchVehicles.dll, GameData/KerbalReusabilityExpansion/DeployableAeroSurfaces.dll, GameData/Kethane/Plugins/GeodesicGrid.dll, GameData/Kethane/Plugins/Kethane.dll, GameData/Kethane/Plugins/KethaneParticles.dll, GameData/KIS/Plugins/KIS.dll, GameData/KIS/Plugins/MiniAVC-V2.dll, GameData/KSPCommunityFixes/Plugins/0_MultipleModuleInPartAPI.dll, GameData/KSPCommunityFixes/Plugins/0_System.Buffers.dll, GameData/KSPCommunityFixes/Plugins/KSPCommunityFixes.dll, GameData/KSPCommunityFixes/Plugins/System.Numerics.Vectors.dll, GameData/ProceduralFairings/Plugins/ProceduralFairings.dll, GameData/RecoveryController/Plugins/RecoveryController.dll, GameData/SpaceTuxLibrary/Plugins/ButtonManager.dll, GameData/SpaceTuxLibrary/Plugins/KSP_ColorPicker.dll, GameData/SpaceTuxLibrary/Plugins/KSP_Log.dll, GameData/SpaceTuxLibrary/Plugins/KSP_PartHighlighter.dll, GameData/SpaceTuxLibrary/Plugins/SpaceTuxUtility.dll, GameData/SpaceTuxLibrary/Plugins/VesselModuleSave.dll, GameData/SpaceY/SpaceYLifters/Plugins/SpaceY.Lifters.dll, GameData/ToadicusTools/Plugins/ToadicusTools.dll, GameData/TweakableEverything/Plugins/TweakableDeployablePanels.dll, GameData/TweakableEverything/Plugins/TweakableDockingNode.dll, GameData/TweakableEverything/Plugins/TweakableEVA.dll, GameData/TweakableEverything/Plugins/TweakableFuelPumps.dll, GameData/TweakableEverything/Plugins/TweakableGimbals.dll, GameData/TweakableEverything/Plugins/TweakableIntakes.dll, GameData/TweakableEverything/Plugins/TweakableParachutes.dll, GameData/TweakableEverything/Plugins/TweakableReactionWheels.dll, GameData/TweakableEverything/Plugins/TweakableSAS.dll, GameData/TweakScale/Plugins/Scale.dll, GameData/TweakScale/Plugins/TweakScale.WatchDog.dll, GameData/TweakScale/Plugins/PluginData/Scale_Sanitizer.dll
 52702 DEBUG CKAN.RegistryManager  Scan completed, committing transaction
 52757 DEBUG CKAN.RepositoryDataManager  Looking for data in C:\Users\MPA\AppData\Local\CKAN\repos\4A85405A-défaut.json
 52769 DEBUG CKAN.RepositoryData  Trying to load repository data from C:\Users\MPA\AppData\Local\CKAN\repos\4A85405A-défaut.json

127.0.0.1:12888 why

alphaleadership commented 3 months ago

forgot this