OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.41k stars 2.39k forks source link

ContentItem Publish throws an error occasionally [System.NullReferenceException] #9317

Closed lampersky closed 3 months ago

lampersky commented 3 years ago

Once in a while I'm getting this error while publishing ContentItem. ContentItem contains few TextField fields, and few DateTimeField fields, as shown below.

image

System.NullReferenceException:
   at OrchardCore.ContentManagement.Display.ContentItemDisplayManager+<UpdateEditorAsync>d__10.MoveNext (OrchardCore.ContentManagement.Display, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at OrchardCore.Contents.Controllers.AdminController+<EditPOST>d__28.MoveNext (OrchardCore.Contents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at OrchardCore.Contents.Controllers.AdminController+<EditAndPublishPOST>d__27.MoveNext (OrchardCore.Contents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor+TaskOfIActionResultExecutor+<Execute>d__0.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker+<<InvokeActionMethodAsync>g__Logged|12_1>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker+<<InvokeNextActionFilterAsync>g__Awaited|10_0>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow (Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next (Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker+<<InvokeInnerFilterAsync>g__Awaited|13_0>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker+<<InvokeNextResourceFilter>g__Awaited|24_0>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow (Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next (Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker+<<InvokeFilterPipelineAsync>g__Awaited|19_0>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker+<<InvokeAsync>g__Logged|17_1>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware+<<Invoke>g__AwaitRequestTask|6_0>d.MoveNext (Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware+<Invoke>d__17.MoveNext (SixLabors.ImageSharp.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at OrchardCore.Media.Services.MediaFileStoreResolverMiddleware+<Invoke>d__7.MoveNext (OrchardCore.Media, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware+<Invoke>d__6.MoveNext (Microsoft.AspNetCore.Authorization.Policy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at OrchardCore.Apis.GraphQL.GraphQLMiddleware+<Invoke>d__7.MoveNext (OrchardCore.Apis.GraphQL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+<Invoke>d__6.MoveNext (Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at OrchardCore.Diagnostics.DiagnosticsStartupFilter+<>c__DisplayClass3_0+<<Configure>b__1>d.MoveNext (OrchardCore.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware+<Invoke>d__3.MoveNext (Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware+<<Invoke>g__Awaited|6_0>d.MoveNext (Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)

image

jptissot commented 3 years ago

Which version are you using?

lampersky commented 3 years ago

latest nightly build 1.0.0-rc2-16154

deanmarcussen commented 3 years ago

There's not enough in these exception details to really try and understand or repro it.

Can you paste the log from the App_Data folder, rather than the exception you have from Azure.

It might contain a more useful stack trace.

It may also just be because it is running in release mode, so we might need to see something from a Debug build, if it is something you can reproduce locally.

lampersky commented 3 years ago

@deanmarcussen it's weird but I've downloaded all those logs, and for some reason, logs are collected from 2021-04-29 14:00:07.3412 :-O

Maybe there were some problems with file system access in Azure. Here is what I found inside internal-nlog.txt maybe this will shed some light on the problem.

2021-04-27 11:10:31.5625 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-27.log failed. Sleeping for 0ms
2021-04-28 13:28:14.1281 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-28.log failed. Sleeping for 0ms
2021-04-29 07:49:15.8516 Warn Flush completed with errors Exception: System.TimeoutException: Timeout when flushing all targets, after waiting 15 seconds.
2021-04-29 07:49:43.0764 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.FileNotFoundException: Could not find file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'.
File name: 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 07:49:43.1017 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 07:49:43.1076 Warn Attempt #1 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 1ms
2021-04-29 07:55:09.0472 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.IOException: The specified network name is no longer available. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 08:04:07.4452 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 08:05:33.9206 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 08:06:47.9923 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 08:09:57.8179 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 08:10:22.8223 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 08:21:30.5199 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 08:25:09.8305 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 08:35:22.4977 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 08:37:20.3380 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 08:37:40.6024 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:14:22.9910 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:15:01.2819 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.IOException: The network path was not found. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 09:18:21.6411 Error File Target[file]: Error has been raised. Exception: System.IO.IOException: The network path was not found. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
   at NLog.Targets.FileTarget.ProcessLogEvent(LogEventInfo logEvent, String fileName, ArraySegment`1 bytesToWrite)
   at NLog.Targets.FileTarget.Write(LogEventInfo logEvent)
   at NLog.Targets.Target.Write(AsyncLogEventInfo logEvent)
2021-04-29 09:27:24.3322 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:27:29.7236 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:28:47.3995 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:33:03.7069 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:35:10.6808 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:36:23.9699 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:36:23.9713 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:39:26.9820 Warn Attempt #1 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:39:28.4595 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:40:05.7026 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.IOException: The network path was not found. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 09:43:28.0052 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.FileNotFoundException: Could not find file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'.
File name: 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 09:43:58.6454 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:44:24.7031 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:44:24.7259 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:50:44.5707 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:51:03.7432 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:52:17.6290 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:52:29.6503 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:52:49.5092 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 09:52:49.5092 Warn Attempt #1 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 1ms
2021-04-29 10:03:47.1319 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.IOException: The network path was not found. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 10:06:23.6619 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:07:24.6450 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:08:04.6724 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:08:24.8291 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:09:06.9249 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:09:06.9319 Warn Attempt #1 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 1ms
2021-04-29 10:09:06.9488 Warn Attempt #2 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 3ms
2021-04-29 10:09:06.9643 Warn Attempt #3 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 7ms
2021-04-29 10:10:43.8421 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:11:47.9894 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:11:48.0327 Warn Attempt #1 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:12:58.3061 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.IOException: The network path was not found. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 10:27:09.0060 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:30:34.7224 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.IOException: The network path was not found. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 10:41:36.1365 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:44:43.1737 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:44:28.6858 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 10:51:09.7839 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.IOException: The specified network name is no longer available. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 11:03:05.0730 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:07:29.7822 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:13:03.0537 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:13:50.7099 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:19:41.6413 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:21:03.0085 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:22:42.3450 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:23:23.7131 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.IOException: An unexpected network error occurred. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 11:39:34.2027 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.IOException: The network path was not found. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 11:41:39.3848 Error File Target[file]: Error has been raised. Exception: System.IO.IOException: The network path was not found. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
   at NLog.Targets.FileTarget.ProcessLogEvent(LogEventInfo logEvent, String fileName, ArraySegment`1 bytesToWrite)
   at NLog.Targets.FileTarget.Write(LogEventInfo logEvent)
   at NLog.Targets.Target.Write(AsyncLogEventInfo logEvent)
2021-04-29 11:46:40.1417 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:51:23.0609 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:54:19.7898 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:57:22.1147 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:59:09.7307 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:59:21.6571 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 11:59:25.7387 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 12:03:42.1821 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.IOException: The network path was not found. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 12:11:11.5226 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.IOException: The specified network name is no longer available. : 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 12:14:19.9824 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 12:24:06.0375 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 12:25:46.6164 Error FileTarget(Name=file): Failed write to file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'. Exception: System.IO.FileNotFoundException: Could not find file 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'.
File name: 'C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log'
   at System.IO.FileStream.WriteCore(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write(Byte[] bytes, Int32 offset, Int32 count)
   at NLog.Targets.FileTarget.WriteToFile(String fileName, ArraySegment`1 bytes, Boolean initializedNewFile)
2021-04-29 12:25:46.6553 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 12:25:46.7086 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 12:25:46.7148 Warn Attempt #1 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 1ms
2021-04-29 12:25:46.7328 Warn Attempt #2 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 3ms
2021-04-29 12:27:06.7027 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 17:19:29.6746 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 17:36:00.0886 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 18:11:40.9722 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 20:23:00.9350 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 21:40:45.8718 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-29 21:46:15.9350 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-29.log failed. Sleeping for 0ms
2021-04-30 08:01:20.6617 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-30.log failed. Sleeping for 0ms
2021-04-30 08:44:43.4263 Warn Attempt #0 to open C:\home\site\wwwroot\App_Data\logs\orchard-log-2021-04-30.log failed. Sleeping for 0ms

I've found that 4 different ContentItems were edited and had same problems.

image

We are still storing Content Definition in a local file and as you can see above, during one save there was a problem with access ContentDefinition.json file.

Piedone commented 4 months ago

Do you still experience this?

lampersky commented 4 months ago

sorry @Piedone, I missed this comment, will check and let you know

Piedone commented 4 months ago

Thanks!

github-actions[bot] commented 3 months ago

It seems that this issue didn't really move for quite a while despite us asking the author for further feedback. Is this something you'd like to revisit any time soon or should we close? Please reply.

lampersky commented 3 months ago

@Piedone can't find similar errors anymore