AntoineGa / Seq.App.Teams

Seq application for Microsoft Teams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not load file or assembly Newtonsoft.Json, Version=11.0.0.0

SeriousM opened this issue · comments

Hi, the extension is throwing an error when it tries to send messages to Teams:

{
  "@t": "2018-12-14T07:33:39.3066813Z",
  "@mt": "The event {EventId} could not be sent to {AppInstanceTitle}.",
  "@m": "The event event-75f0bc30619608d6aa287c0000000000 could not be sent to Teams.",
  "@i": "e285b3dc",
  "@l": "Error",
  "@x": "System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)\nFile name: 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' ---> System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.\n   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)\n   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)\n   at System.Reflection.Assembly.LoadFrom(String assemblyFile)\n   at System.AppDomain.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)\n   at Seq.App.Teams.TeamsReactor.On(Event`1 evt)\n   at Seq.Apps.GenericHost.AppHost.SendAsync(String clef)\n\n",
  "EventId": "event-75f0bc30619608d6aa287c0000000000",
  "AppInstanceTitle": "Teams",
  "AppId": "hostedapp-161",
  "AppInstanceId": "appinstance-194"
}

We're using the extension version 1.0.16 with seq 5.0.2362 (docker image)

Do we have to add this missing dependency somewhere?

Thank you!

Thanks for reporting!

The package contains the dependency.

Do you use a Linux or Windows docker image ?

The Linux image

I have ported the code from .Net to .Net core 2.0 during the holidays.

the version 1.0.17 should solve your problem : https://www.nuget.org/packages/Seq.App.TeamsCore/1.0.17

I also ran into this issue when adding Seq.App.Teams, and can't add Seq.App.TeamsCore since it's not marked with the seq-app tag on nuget.org.

Could not install app
Package Seq.App.TeamsCore could not be interrogated for app configuration: no type marked with [SeqApp] could be found.

image

I think this is a Seq regression; on Windows, where we run apps under the full framework, the loader's quite happy to pull in the Newtonsoft.Json assembly that's included with Seq. On Linux under .NET Core for whatever reason we're not enabling this. I think it's something we should be able to fix and I'll raise a ticket on datalust/seq-tickets to cover it - thanks!

thanks @adamsmithkld and @nblumhardt

i though it was because the nuget package was flagged net45 and not netstandard2.0

image

I really want to use it :)

Should be able to get a fix out in the next 5.1 pre-release build, fingers crossed for some traction on it this week :-)

Hi @nblumhardt, is there any updates on the package?

image

Hi @SeriousM - I think the intention is that Seq.App.Teams will now work on core, so the "Core" package is probably unnecessary.

ok, so it means that using the linux docker image datalust/seq:preview it should work using Seq.App.Teams package ?

Yes, that's the intention 👍

@SeriousM : do you agree to close the issue ?

do you agree to close the issue ?

@AntoineGa The issue is still present as the nuget package isn't updated since the issue was opened.

Please upgrade to include Newtonsoft most recent version:
System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. Could not find or load a specific file. (0x80131621)
File name: 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
---> System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.
at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
at System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(RuntimeAssembly assembly, String assemblyFullName)
at Seq.App.DigestEmail.DigestEmailReactor.On(Event`1 evt)
at SeqCli.Apps.Hosting.AppContainer.SendTypedEventAsync(String clef) in C:\projects\seqcli\src\SeqCli\Apps\Hosting\AppContainer.cs:line 109

@JonesAbramoff Hi 👋 - which Seq version are you running?