Cities: Skylines

Cities: Skylines

Harmony 2.2.2-0 (Mod Dependency)
 This topic has been pinned, so it's probably important
boformer  [developer] Jan 31, 2021 @ 6:06pm
Problems with Harmony? Here are some solutions!
Network Extensions 2"

In the past issues occurred with Network Extensions 2. These issues have been fixed.

Users who used my custom version of NExt 2 can return to the workshop version.

Conflicting Harmony 2 provider mod
You can only use one Harmony provider mod at the same time.
Make sure you are not subscribed to "Harmony (redesigned)", an alternative provider mod that is known to cause issues.

Experimental Channel
You can unsubscribe the Harmony mod and subscribe to the experimental channel instead. The experimental version might contain additional fixes that are not yet available on the stable channel:
https://steamcommunity.com/sharedfiles/filedetails/?id=2399204842

Local mods
if you have any mods installed in your local AppData directory, please make sure that they are up to date! I recommend to use the workshop versions whenever possible!

Further support
If there are still errors once you've tried everything above, please upload your output_log.txt and post it here.

Windows: <SteamFolder>\SteamApps\common\Cities_Skylines\Cities_Data\output_log.txt

Mac: Users/<username>/Library/Logs/Unity/Player.log

Linux: ~/.config/unity3d/Colossal Order/Cities: Skylines/Player.log

Tip: To open the game install folder, right click your game in the Steam library, select Properties, go to the Local Files tab and select Browse local files.

"Technical Advice" from other people
Solutions given to you by other people are probably outdated, wrong or incomplete. If they work for you, that's great, but usually they only work randomly.

You can ask in this thread if those other solutions are feasible or not. I advice you to try the solutions above first.
Last edited by boformer; May 5, 2021 @ 2:05am
< >
Showing 196-210 of 230 comments
boformer  [developer] Jan 31, 2022 @ 3:37pm 
@b.rense one of your mods (network/road related) is outdated and is causing the error.
I would recommend disabling all of your mods and then slowly enable them again until you find the broken mod.

It might also be that Steam didn't download the latest update for all of your mods. It might happen to unsub and resub those mods.
Mr.Kampleng Feb 4, 2022 @ 9:09am 
there is my problem

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

The class CitiesHarmony.Harmony1StateTransfer could not be loaded, used in CitiesHarmony, Version=1.0.7795.18609, Culture=neutral, PublicKeyToken=null
ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetExportedTypes () [0x00000] in <filename unknown>:0
at ColossalFramework.Plugins.PluginManager+PluginInfo.get_userModInstance () [0x00000] in <filename unknown>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
ColossalFramework.Plugins.PluginInfo:get_userModInstance()
MoveIt.MoveItTool:GetAssembly(String, String, String)
MoveIt.NS_Manager:getVersionText()
MoveIt.ModInfo:OnSettingsUI(UIHelperBase)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
OptionsMainPanel:AddUserMods()
OptionsMainPanel:CreateCategories()
OptionsMainPanel:RefreshPlugins()
ColossalFramework.Plugins.PluginManager:TriggerEventPluginsStateChanged()
ColossalFramework.Plugins.PluginInfo:set_isEnabled(Boolean)
EntryData:SetActive(Boolean)
PackageEntry:OnCheckedChanged(UIComponent, Boolean)
ColossalFramework.UI.UICheckBox:OnCheckChanged()
ColossalFramework.UI.UICheckBox:set_isChecked(Boolean)
ColossalFramework.UI.UICheckBox:OnClick(UIMouseEventParameter)
ColossalFramework.UI.UIComponent:OnClick(UIMouseEventParameter)
ColossalFramework.UI.MouseHandler:ProcessInput(IInputTranslator, Ray, UIComponent, Boolean)
ColossalFramework.UI.UIInput:ProcessMouseInput()
ColossalFramework.UI.UIInput:Update()
TheNJDevils30 Feb 5, 2022 @ 8:04am 
Boformer, do you know why when I load my old city from before the Airports dlc, the game cannot be unpaused? I get a harmony error on start up and when I enter the game, it says some airplane paths are not working. I've unsubscribed to everything flagged by the incompatability report generator and unsubscribed/resubscribed to the others to redownload them.

A Mod caused an error [System.Exception]

Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: Ambiguous match for HarmonyMethod[(class=NetManager, methodname=CreateSegment, type=Normal, args=undefined)] ---> System.Reflection.AmbiguousMatchException: Ambiguous matching in method resolution
at System.Reflection.Binder.FindMostDerivedMatch (System.Reflection.MethodBase[] match) [0x00000] in <filename unknown>:0
at System.MonoType.GetMethodImpl (System.String name, BindingFlags bindingAttr, System.Reflection.Binder binder, CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) [0x00000] in <filename unknown>:0
at System.Type.GetMethod (System.String name, BindingFlags bindingAttr) [0x00000] in <filename unknown>:0
at HarmonyLib.AccessTools.DeclaredMethod (System.Type type, System.String name, System.Type[] parameters, System.Type[] generics) [0x00000] in <filename unknown>:0
at HarmonyLib.PatchTools.GetOriginalMethod (HarmonyLib.HarmonyMethod attr) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at HarmonyLib.PatchTools.GetOriginalMethod (HarmonyLib.HarmonyMethod attr) [0x00000] in <filename unknown>:0
at HarmonyLib.PatchClassProcessor.PatchWithAttributes (System.Reflection.MethodBase
boformer  [developer] Feb 7, 2022 @ 7:43pm 
one of your mods (network/road related) is outdated and is causing the error.
I would recommend disabling all of your mods and then slowly enable them again until you find the broken mod.

It might also be that Steam didn't download the latest update for all of your mods. It might happen to unsub and resub those mods.
boformer  [developer] Feb 26, 2022 @ 11:07am 
There seems to be a problem with the latest update of NetworkExtensions2. I am in contact with the author to fix those problems.
Neophlegm Mar 12, 2022 @ 8:09am 
As of today, I'm getting a crash (inv kernel) if I start the game with Harmony active. All other mods can be activated and the game starts fine, only Harmony causes a crash. The log file in Unity is a bit wordy, but here's the stacktrace if that helps?

Stacktrace:

at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0x00079>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0x00079>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x001aa>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x0002d>
at CitiesHarmony.API.HarmonyHelper.InvokeHarmonyInstaller () <0x00095>
at CitiesHarmony.API.HarmonyHelper.get_IsHarmonyInstalled () <0x00010>
at CitiesHarmony.API.HarmonyHelper.EnsureHarmonyInstalled () <0x00010>
at TrafficManager.Lifecycle.TMPELifecycle.Awake () <0x00143>
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0x0005e>
at (wrapper managed-to-native) UnityEngine.GameObject.Internal_AddComponentWithType (System.Type) <0x00074>
at (wrapper managed-to-native) UnityEngine.GameObject.Internal_AddComponentWithType (System.Type) <0x00074>
at UnityEngine.GameObject.AddComponent (System.Type) <0x0001e>
at UnityEngine.GameObject..ctor (string,System.Type[]) <0x0005f>
at TrafficManager.Lifecycle.TMPELifecycle.StartMod () <0x000a9>
at TrafficManager.Lifecycle.TrafficManagerMod.OnEnabled () <0x00010>
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0x0005e>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0x00079>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0x00079>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x001aa>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x0002d>
at ColossalFramework.Plugins.PluginManager.AddPlugins (System.Collections.Generic.Dictionary`2<string, ColossalFramework.Plugins.PluginManager/PluginInfo>) <0x002da>
at ColossalFramework.Plugins.PluginManager.LoadPlugins () <0x0010f>
at Starter.Awake () <0x02ef3>
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0x0005e>
boformer  [developer] Mar 13, 2022 @ 12:28am 
hmmm that's weird. Harmony mod doesn't need to be enabled in content manager, so if it works being disabled, maybe go with that for now.
vincentkanin May 11, 2022 @ 6:04am 
Harmony patching error please fix
Wart-Hero Sep 7, 2022 @ 6:09am 
bug report
A Mod caused an error [System.Exception]

Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: Patching exception in method System.Void NetNode::RenderInstance(CameraInfo cameraInfo, System.UInt16 nodeID, NetInfo info, System.Int32 iter, Flags flags, System.UInt32
incomplete78 Sep 14, 2022 @ 12:31pm 
System.Exception: A Mod caused an error ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: Patching exception in method null ---> System.ArgumentException: Undefined target method for patch method static System.Void FindIt.CreateButtonPatch::Postfix(ColossalFramework.UI.UIButton __result, GeneratedScrollPanel __instance, System.String name, System.String tooltip, System.String baseIconName, System.Int32 index, ColossalFramework.UI.UITextureAtlas atlas, ColossalFramework.UI.UIComponent tooltipBox, System.Boolean enabled)
at HarmonyLib.PatchClassProcessor.PatchWithAttributes (System.Reflection.MethodBase+ lastOriginal) [0x00000] in <filename unknown>:0
at HarmonyLib.PatchClassProcessor.Patch () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x00000] in <filename unknown>:0
at HarmonyLib.PatchClassProcessor.Patch () [0x00000] in <filename unknown>:0
at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00000] in <filename unknown>:0
at HarmonyLib.CollectionExtensions.Do[Type] (IEnumerable`1 sequence, System.Action`1 action) [0x00000] in <filename unknown>:0
at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00000] in <filename unknown>:0
at HarmonyLib.Harmony.PatchAll () [0x00000] in <filename unknown>:0
at FindIt.Patcher.PatchAll () [0x00000] in <filename unknown>:0
at FindIt.ModInfo+<>c.<OnEnabled>b__9_0 () [0x00000] in <filename unknown>:0
at CitiesHarmony.API.HarmonyHelper.DoOnHarmonyReady (System.Action action) [0x00000] in <filename unknown>:0
at FindIt.ModInfo.OnEnabled () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception+)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at ColossalFramework.Plugins.PluginManager.AddPlugins (System.Collections.Generic.Dictionary`2 plugins) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
Infrastructure_Nerd Sep 14, 2022 @ 12:48pm 
A Mod caused an error [System.Exception]

Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: Patching exception in method null ---> System.ArgumentException: Undefined target method for patch method static System.Void FindIt.CreateButtonPatch::Postfix(ColossalFramework.UI.UIButton __result, GeneratedScrollPanel __instance, System.String name, System.String tooltip, System.String baseIconName, System.Int32 index, ColossalFramework.UI.UITextureAtlas atlas, ColossalFramework.UI.UIComponent tooltipBox, System.Boolean enabled)
at HarmonyLib.PatchClassProcessor.PatchWithAttributes (System.Reflection.MethodBase
>|<oTTHbly_CyXaPb Sep 14, 2022 @ 12:48pm 
same one here:

System.Exception: A Mod caused an error ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: Patching exception in method null ---> System.ArgumentException: Undefined target method for patch method static System.Void FindIt.CreateButtonPatch::Postfix(ColossalFramework.UI.UIButton __result, GeneratedScrollPanel __instance, System.String name, System.String tooltip, System.String baseIconName, System.Int32 index, ColossalFramework.UI.UITextureAtlas atlas, ColossalFramework.UI.UIComponent tooltipBox, System.Boolean enabled)
at HarmonyLib.PatchClassProcessor.PatchWithAttributes (System.Reflection.MethodBase+ lastOriginal) [0x00000] in <filename unknown>:0
at HarmonyLib.PatchClassProcessor.Patch () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x00000] in <filename unknown>:0
at HarmonyLib.PatchClassProcessor.Patch () [0x00000] in <filename unknown>:0
at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00000] in <filename unknown>:0
at HarmonyLib.CollectionExtensions.Do[Type] (IEnumerable`1 sequence, System.Action`1 action) [0x00000] in <filename unknown>:0
at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00000] in <filename unknown>:0
at HarmonyLib.Harmony.PatchAll () [0x00000] in <filename unknown>:0
at FindIt.Patcher.PatchAll () [0x00000] in <filename unknown>:0
at FindIt.ModInfo+<>c.<OnEnabled>b__9_0 () [0x00000] in <filename unknown>:0
at CitiesHarmony.API.HarmonyHelper.DoOnHarmonyReady (System.Action action) [0x00000] in <filename unknown>:0
at FindIt.ModInfo.OnEnabled () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception+)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at ColossalFramework.Plugins.PluginManager.AddPlugins (System.Collections.Generic.Dictionary`2 plugins) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
brfadul Sep 14, 2022 @ 1:12pm 
Meu cities está dando essa mensagem ao abrir o jogo
>>>
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: Patching exception in method null ---> System.ArgumentException: Undefined target method for patch method static System.Void FindIt.CreateButtonPatch::Postfix(ColossalFramework.UI.UIButton __result, GeneratedScrollPanel __instance, System.String name, System.String tooltip, System.String baseIconName, System.Int32 index, ColossalFramework.UI.UITextureAtlas atlas, ColossalFramework.UI.UIComponent tooltipBox, System.Boolean enabled)
at HarmonyLib.PatchClassProcessor.PatchWithAttributes (System.Reflection.MethodBase
laces2214 Sep 14, 2022 @ 1:37pm 
Throwing an error at the main menu, here is the log file:

https://drive.google.com/file/d/1iQ6JEn5h_uY7MUIPLr9dWlMpFxFdH24v/view?usp=sharing
MISSchievious Sep 29, 2022 @ 12:19am 
So I recently had to reinstall windows and all my games (boo), and now I'm getting this error:

The Mod D:\SteamLibrary\steamapps\workshop\content\255710\576327847 [CitiesHarmony.API.dll, EightyOne.dll] has caused an error [ModException]

Details:
System.NullReferenceException: Object reference not set to an instance of an object
at EightyOne.RedirectionFramework.RedirectionHelper.RedirectCalls (System.Reflection.MethodInfo from, System.Reflection.MethodInfo to) [0x00000] in <filename unknown>:0
at EightyOne.RedirectionFramework.RedirectionUtil.RedirectMethod (System.Type targetType, System.Reflection.MethodInfo detour, Boolean reverse) [0x00000] in <filename unknown>:0
at EightyOne.RedirectionFramework.RedirectionUtil.RedirectMethod (System.Type targetType, System.Reflection.MethodInfo method, System.Collections.Generic.Dictionary`2 redirects, Boolean reverse) [0x00000] in <filename unknown>:0
at EightyOne.RedirectionFramework.RedirectionUtil.RedirectReverse (System.Type type, System.Type targetType, System.Collections.Generic.Dictionary`2 redirects, Boolean onCreated) [0x00000] in <filename unknown>:0
at EightyOne.RedirectionFramework.RedirectionUtil.RedirectType (System.Type type, Boolean onCreated) [0x00000] in <filename unknown>:0
at EightyOne.Detours.Redirect (Boolean onCreated) [0x00000] in <filename unknown>:0
at EightyOne.Detours.SetUp () [0x00000] in <filename unknown>:0
at EightyOne.LoadingExtension.OnCreated (ILoading loading) [0x00000] in <filename unknown>:0
at LoadingWrapper.OnLoadingExtensionsCreated () [0x00000] in <filename unknown>:0
< >
Showing 196-210 of 230 comments
Per page: 1530 50