Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Reloading Plugin: Unable to Load SQLitePCLRaw.core Assembly #245

Open
drakin003 opened this issue Nov 12, 2024 · 0 comments
Open

Error Reloading Plugin: Unable to Load SQLitePCLRaw.core Assembly #245

drakin003 opened this issue Nov 12, 2024 · 0 comments

Comments

@drakin003
Copy link

Hi, i am getting this Error when server stays idle for few hours and tries to reload all plugins automatically.

2024-11-11 12:29:23.622 +00:00 [INFO] (cssharp:PluginContext) Reloading plugin MatchZy
2024-11-11 12:29:23.622 +00:00 [INFO] (cssharp:PluginContext) Unloading plugin MatchZy
2024-11-11 12:29:23.623 +00:00 [INFO] (cssharp:PluginContext) Finished unloading plugin MatchZy
2024-11-11 12:29:23.652 +00:00 [EROR] (cssharp:Core) Error invoking callback
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'SQLitePCLRaw.core, Version=2.1.4.1835, Culture=neutral, PublicKeyToken=1488e028ca7ab535'. An operation is not legal in the current state. (0x80131509)
Could not load file or assembly 'SQLitePCLRaw.core, Version=2.1.4.1835, Culture=neutral, PublicKeyToken=1488e028ca7ab535'. An operation is not legal in the current state. (0x80131509)
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.ToArray()
   at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 167
   at CounterStrikeSharp.API.Core.Plugin.PluginContext.<>c__DisplayClass29_0.<OnReloadedAsync>b__0() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 113
   at InvokeStub_Action.Invoke(Object, Object, IntPtr*)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
System.IO.FileLoadException: Could not load file or assembly 'SQLitePCLRaw.core, Version=2.1.4.1835, Culture=neutral, PublicKeyToken=1488e028ca7ab535'. An operation is not legal in the current state. (0x80131509)
File name: 'SQLitePCLRaw.core, Version=2.1.4.1835, Culture=neutral, PublicKeyToken=1488e028ca7ab535'
 ---> System.InvalidOperationException: AssemblyLoadContext is unloading or was already unloaded.
   at System.Runtime.Loader.AssemblyLoadContext.VerifyIsAlive()
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromStream(Stream assembly, Stream assemblySymbols)
   at McMaster.NETCore.Plugins.Loader.ManagedLoadContext.LoadAssemblyFromFilePath(String path)
   at McMaster.NETCore.Plugins.Loader.ManagedLoadContext.Load(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
System.IO.FileLoadException: Could not load file or assembly 'SQLitePCLRaw.core, Version=2.1.4.1835, Culture=neutral, PublicKeyToken=1488e028ca7ab535'. An operation is not legal in the current state. (0x80131509)
File name: 'SQLitePCLRaw.core, Version=2.1.4.1835, Culture=neutral, PublicKeyToken=1488e028ca7ab535'
 ---> System.InvalidOperationException: AssemblyLoadContext is unloading or was already unloaded.
   at System.Runtime.Loader.AssemblyLoadContext.VerifyIsAlive()
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromStream(Stream assembly, Stream assemblySymbols)
   at McMaster.NETCore.Plugins.Loader.ManagedLoadContext.LoadAssemblyFromFilePath(String path)
   at McMaster.NETCore.Plugins.Loader.ManagedLoadContext.Load(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at CounterStrikeSharp.API.Core.FunctionReference.<CreateWrappedCallback>b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 100

CSSharp: v286
MatchZy: 0.8.6
OS: Ubuntu 22.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant