KSP-CKAN / CKAN

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

CKAN.ModuleNotFoundKraken: Cannot install <unrelated mod>, module not available #1864

Closed Commissar0617 closed 3 years ago

Commissar0617 commented 7 years ago

1.18.1

win 8.1 pro

i'm unable to install any mods, thrown something about exception detector being unavailable, however, there's no exception detector available to deselect. the apply changes is greyed out.

How to recreate this issue:

************** Exception Text **************
CKAN.ModuleNotFoundKraken: Cannot install ExceptionDetector, module not available
   at CKAN.CkanModule.FromIDandVersion(IRegistryQuerier registry, String mod, KspVersion ksp_version)
   at CKAN.RelationshipResolver.<RelationshipResolver>c__AnonStorey0.<>m__0(String name)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at CKAN.RelationshipResolver..ctor(IEnumerable`1 module_names, RelationshipResolverOptions options, IRegistryQuerier registry, KspVersion kspversion)
   at CKAN.MainModList.ComputeConflictsFromModList(IRegistryQuerier registry, IEnumerable`1 change_set, KspVersion ksp_version)
   at CKAN.Main.<UpdateChangeSetAndConflicts>c__async1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CKAN.Main.<ModList_CellValueChanged>c__async0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
ayan4m1 commented 7 years ago

Do you have an ExceptionDetector folder in your KSP GameData directory? What version of KSP are you using? Is it a clean install - have you ever modified the install of KSP before? The mod mentioned for what it's worth.

Commissar0617 commented 7 years ago

soo.. i think, for some reason, ckan was trying to install the mod, and it had been removed from repo for whatever reason.... i ended up having to remove it by command line

politas commented 7 years ago

We really need to track down what is causing this bug. The biggest issue is that the mod mentioned may not be installed or selected, and may not even have any relationship defined to any installed or selected mods. It's a red herring.

There is a workaround:

If you are seeing this this exception, follow these steps:

  1. Export your modlist to a CKAN favourites list.
  2. Uninstall all mods currently installed via CKAN
  3. Close CKAN
  4. Delete from your Gamedata all files other than the "Squad" directory (and any mods you have installed manually because they are not available through CKAN)
  5. Reopen CKAN and use the "Install from .ckan" option in the File Menu to reinstall all your CKAN mods (they should all be cached for you if you haven't done anything to clear the cache)
Commissar0617 commented 7 years ago

i was able to uninstall via commandline... so that works, at least. in fact, that also removed some other repo issues i'd been having too. (same username on ksp forums)

Dawnkeeper commented 7 years ago

The workaround didn't help for me. I get this error when trying to install StockVisualEnhancements even when no other mods are installed and the GameData folder is empty.

The mod I get this error for is ChuteSafetyIndicator.
Looking around a bit I noticed a file "installed-default.ckan" next to ckan.exe.
content:

{
    "kind": "metapackage",
    "abstract": "A list of modules installed on the default KSP instance",
    "name": "installed-default",
    "license": "unknown",
    "version": "2016.08.24.06.26.38",
    "identifier": "installed-default",
    "spec_version": "v1.6",
    "depends": [
        {
            "name": "ChuteSafetyIndicator",
            "version": "1.0.2"
        },
        {
            "name": "BananaForScale-small",
            "version": "1.0"
        },
        {
            "name": "EnvironmentalVisualEnhancements-HR",
            "version": "2:EVE-1.1-2-1"
        },
        {
            "name": "EnvironmentalVisualEnhancements",
            "version": "2:EVE-1.1-2-1"
        },
        {
            "name": "FinalFrontier",
            "version": "1.0.10-2467"
        }
    ]
}

Problem is that the file is recreated every startup and I didn't find out where the content came from.

Hope it helps.

Dawnkeeper commented 7 years ago

I found out that these mods were previously installed, but hidden from view by the filter (was set to compatible). After switching it to 'All' I could deinstall the mods that were alredy deleted and now can install new ones.

old-faraon commented 7 years ago

Some more info above Dawnkeepers findings. For me the mod displayed in the error is the first installed but but marked as incompatible mod in installed-default.ckan

For me the error was actually caused by installing scatterer. It depends on scatterer-sunflare which depends on stock visual enchancements: sunflare.

Now I have scatterer and stock visual enchancements: sunflare installed according to installed-default and scatterer and scatterer-sunflare installed according to the GUI

Doing this the other way around(selecting sve:sunflair instead if scatterer-sunflair shows the same in file and GUI but gives the same error.

Instaling SVE (which provides scatterer) and selecting the sve: sunflair ends with the same error.

Instaling scatterer with the astroniki sunflair ends with the same error.

There seams something strange in SVE dependencies but I can't really parse it.

politas commented 7 years ago

Anyone who has had Stock Visual Enhancements installed for some time is going to have some issues due to CKAN's problem with changed dependencies. Uninstall any of SVE, EVE, Scatterer and any scatterer-sunflare mod, refresh and restart CKAN, then reinstall SVE, which should prompt you to choose a sunflare.

old-faraon commented 7 years ago

I actually installed scatterer only yesterday. It prompts me to choose sunflare and installs it correctly and everything works in game.

The error as far as I can see happens when there are 2 conflicting mods selected like SVE conflicting with scatterer(since it now contains it) or any of the Half Scale real solar system texture mods. Just selecting them on the list when they conflict is enough.

rkagerer commented 7 years ago

Just cross-referencing some info from a KSP forum post that might be useful.

an3k commented 7 years ago

I have the exact same error. I thought it was my maybe incorrectly created .ckan file but since netkan says the .netkan file is 100% valid and here is an open issue I guess it's ckan.

In my case I get "CKAN.ModuleNotFoundKraken: Cannot install SVT-HighResolution, module not available". However SVT-HighResolution is actually installed and fully working.

I have a clean steam install of KSP 1.2.1 and all the mods (I just got a new computer at Nov-22 so everything got installed afterwards). I created my own CKAN repository for RasterPropMonitor dev builds (https://github.com/an3k/CKAN-meta-dev/tree/RasterPropMonitor/RasterPropMonitor). To test dependencies, etc. I told CKAN that I have KSP 1.1.3 (renaming buildID.txt/buildID64.txt and modifying readme.txt) and installed RPM 0.27.1 through CKAN. Everything is fine. No errors yet. Afterwards I changed the readme.txt back to it's original state (1.2.1).

With my .ckan files not using any "conflicts" stanza I do not get this error but then I could install RPM-dev over RPM because it doesn't conflicts. I added "conflicts": [ { "name": "RasterPropMonitor-Core", "max_version": "1:v0.27.1" } ], and netkan is absolutely fine with that. But now CKAN throws said error as soon as I just check the module that contains the above conflicts code.

Removing just the "max_version" thingy does not fix the error but removing the whole conflicts stanza does and everything works without an error. The module SVT-HighResolution has absolutely no relationship with RasterPropMonitor.

EDIT: The same happens with Sarbian's repo with MechJeb2 and MechJeb2-dev (having MechJeb2 2.5.8.0 installed and selecting MechJeb-dev 2.5.9.0-662 throws same error).

an3k commented 7 years ago

In my case it is SVT-HighResolution because that is the last mod listed in registry.json that contains a conflicts stanza that is not null.

Looks like CKAN GUI expects another conflict entry [MoveNext()] but is surprised that there isn't any and thus throws up.

CKAN CLI does not throw up. Instead it simply shows The following inconsistencies were found: MechJeb2-dev 2.5.9.0-662 conflicts with MechJeb2 2.5.8.0, can't install both. Install canceled. Your files have been returned to their initial state.

politas commented 7 years ago

@an3k, that was very helpful. MainModList isn't handling the InconsistentKraken being thrown by RelationshipResolver properly, and is trying to treat it as a ModuleNotFoundKraken.

HebaruSan commented 3 years ago

I think this got fixed along the way, too complicated to pin down exactly when.