Open MoroseCorpse opened 4 years ago
I have a new error:
2020-05-04 17:55:30.5455|ERROR||Plugin.StartInternal Plugin 'NowPlaying (BotPlugin)' failed to load: Could not load file or assembly 'System.Diagnostics.Debug, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.Debug, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Diagnostics.Debug, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(MetadataToken caCtorToken, MetadataImport& scope, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit)
at System.Reflection.RuntimeMethodInfo.GetCustomAttributes(Type attributeType, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](MemberInfo element)
at TS3AudioBot.CommandSystem.CommandManager.<>c__DisplayClass23_0.<<GetCommandMethods>g__GetCommandMethodsIterator|0>d.MoveNext()
at TS3AudioBot.CommandSystem.CommandManager.GetBotCommands(IEnumerable`1 methods)+MoveNext()
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
at TS3AudioBot.Plugins.PluginCommandBag..ctor(Object obj, Type t)
at TS3AudioBot.Plugins.Plugin.CreatePluginObjects(IInjector injector, Type type, Boolean isStatic)
at TS3AudioBot.Plugins.Plugin.StartInternal(Bot bot)
Check what you are targeting with your plugin. The develop branch currently target dotnet core 3.1
This means your plugin will need to target either netcoreapp3.1
or any netstandard like netstandard2.1
The plugins run under the latest netcoreapp3.1
Are you referencing the exact same TS3AudioBot.dll in your project?
<Reference Include="TS3AudioBot">
<HintPath>...\bin\Debug\netcoreapp3.1\TS3AudioBot.dll</HintPath>
</Reference>
What other references do you have?
Yes I refer to the current develop version.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NLog" Version="4.7.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="TS3AudioBot">
<HintPath>..\..\..\TS3AudioBot - 0.12\TS3AudioBot.dll</HintPath>
</Reference>
<Reference Include="TSLib">
<HintPath>..\..\..\TS3AudioBot - 0.12\TSLib.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
I'm sorry, but I can't reproduce this locally. If you want you can try to send me a zip of your projects.
Yeah, I can do that. What's the best way for me to send you the projects? Could I send them by email?
drag and drop into github, otherwise mail if you want
Ok so I was just about to send you the email, but then we noticed that if you want to test the plugins, there are a few things to prepare. We could try to explain it in the e-mail, but I think it would be an advantage if you would be okay with meeting on TeamSpeak and going through it together
Sorry, not responding sooner, I lost tracking here, If you have time you can get on my ts somewhen the next days and I can take some time to look into. Also you can also just send the zip inbefore and I can see I can get it running wihtout explanation
So I have now tried again a little bit with the new version. I have now used the brand new version of the develop version. At first I thought that it works, because there was no error, but then I noticed that the bot didn't react to anything, as soon as something like clientlist or something similar was called. I was able to fix this with async as explained in this issue: https://github.com/Splamy/TS3AudioBot/issues/797
But now I have the following problem again:
2020-05-27 21:48:10.4747|ERROR|0|Plugin.StartInternal Plugin 'SupportBot (BotPlugin)' failed to load: Could not load file or assembly 'System.Diagnostics.Debug, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Das System kann die angegebene Datei nicht finden..
System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.Debug, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Das System kann die angegebene Datei nicht finden.
File name: 'System.Diagnostics.Debug, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(MetadataToken caCtorToken, MetadataImport& scope, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit)
at System.Reflection.RuntimeMethodInfo.GetCustomAttributes(Type attributeType, Boolean inherit)
at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](MemberInfo element)
at TS3AudioBot.CommandSystem.CommandManager.<>c__DisplayClass23_0.<<GetCommandMethods>g__GetCommandMethodsIterator|0>d.MoveNext()
at TS3AudioBot.CommandSystem.CommandManager.GetBotCommands(IEnumerable`1 methods)+MoveNext()
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at TS3AudioBot.Plugins.PluginCommandBag..ctor(Object obj, Type t)
at TS3AudioBot.Plugins.Plugin.CreatePluginObjects(IInjector injector, Type type, Boolean isStatic)
at TS3AudioBot.Plugins.Plugin.StartInternal(Bot bot)
Unfortunately, I have not yet found the time to come to your TS. Besides, I don't know when you're gonna be there anyway. But I spontaneously came up with something how you can test the plugin. So at least the one plugin. If there are still bugs in other plugins, then you would probably have to prepare more.
In any case, in order to use it, you would have to create 4 channels, of which I need the channel IDs in advance, which the bot is allowed to edit. That would mean that the bot would need permissions as well. If you're not sure, we can also provide you with a test TeamSpeak.
I will send you the plugin as soon as possible via email as soon as you have replied.
Sure, send me and I'll take a look when I get to
Ok I have now sent you the project files and explained what you have to do to test the plugin properly
I haven't got anything yet, did you send it to the correct address?
Gmail apparently blocked the email because there were forbidden files in the attachment. I have now simply added a Google Drive Download link to the email
I was able to fix the bug myself by recompiling the TS3AudioBot again. I think the problem was because we both have different .NET Core versions on our PC. So I have the latest 3.1 .NET Core version (3.1.300). Maybe check if there is a new version available at your site
But now I don't have the file with the dotnet in it anymore, so it would be good if this would work normally again
I have a plugin that generates these errors:
I fixed the second bug temporarily by commenting out all thread things, but actually I need them. Actually they were just Thread.sleep functions, which I might not need or can be done differently, but still it would be good if I could work with threads
Version 0.12.0-alpha.33/develop/a6260c29
Platform Ubuntu 18.04.4
Both errors were not yet present in the current master version