AntoineGa / Seq.App.Teams

Seq application for Microsoft Teams
MIT License
13 stars 10 forks source link

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

Open SeriousM opened 5 years ago

SeriousM commented 5 years ago

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!

AntoineGa commented 5 years ago

Thanks for reporting!

AntoineGa commented 5 years ago

The package contains the dependency.

Do you use a Linux or Windows docker image ?

SeriousM commented 5 years ago

The Linux image

AntoineGa commented 5 years ago

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

adamsmithkld commented 5 years ago

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

nblumhardt commented 5 years ago

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!

AntoineGa commented 5 years ago

thanks @adamsmithkld and @nblumhardt

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

SeriousM commented 5 years ago

image

I really want to use it :)

nblumhardt commented 5 years ago

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 :-)

SeriousM commented 5 years ago

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

image

nblumhardt commented 5 years ago

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

AntoineGa commented 5 years ago

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

nblumhardt commented 5 years ago

Yes, that's the intention 👍

AntoineGa commented 5 years ago

@SeriousM : do you agree to close the issue ?

SeriousM commented 5 years ago

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.

JonesAbramoff commented 3 years ago

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

nblumhardt commented 3 years ago

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

JonesAbramoff commented 3 years ago

Hi,

Seq 2021.2.6288

I may send you the nuget, and/or the source code of the app, that is based on Seq.App.DigestEmail.

With Newtonsoft 12.0 it works fine.

Best regards,

Jones Abramoff

De: Nicholas Blumhardt @.> Enviada em: terça-feira, 17 de agosto de 2021 01:53 Para: AntoineGa/Seq.App.Teams @.> Cc: JonesAbramoff @.>; Mention @.> Assunto: {Disarmed} Re: [AntoineGa/Seq.App.Teams] Could not load file or assembly Newtonsoft.Json, Version=11.0.0.0 (#5)

@JonesAbramoff https://github.com/JonesAbramoff Hi 👋 - which Seq version are you running?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AntoineGa/Seq.App.Teams/issues/5#issuecomment-899991735 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ADAEQOGUX4BYEPOGWHXM2O3T5HTKPANCNFSM4GKODUQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .