Unknown function: updateChildZOrder

0
0

I am getting this error for no reason. Initially after app pool restart app works ok for some time. Then this error pops up to all clients.

Windows 2016, all updates installed
Microsoft.NETCore.App 8.0.12
Wisej 3.5.16

  • You must to post comments
0
0

Here are 2 screenshots from Web Browser console when error appears.

Also in the browser where this happens, if I disable cache, page reloads correctly.

  • You must to post comments
0
0

Here is update as it is randomly popping up so hard to trace

  • it only shows up if websocjets are enabled
  • when this error pops up, browser (Firefox, Chrome, Edge) keeps displaying error for some time
  • if I access same URL with different browser session opens normally

Could it be that some web sockets are cached or re-used so browser still thinks that app is not working. This continues with problematic browser despite WWW Service on server restarted or app pool recycled.

After one client bumps on this error, it spreads to all clients currently using app.

  • You must to post comments
0
0

Here s what I see in Application log when errors start to happend

Category: Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer

EventId: 2

SpanId: f8c5e4f5aa4314c1

TraceId: 718d4c1acc70e0ebb55480a27e6c46bf

ParentId: 0000000000000000

RequestId: 800021bf-0000-fb00-b63f-84710c7967bb

RequestPath: /xPortal/ws.wx

Connection ID “18086456105130533310”, Request ID “800021bf-0000-fb00-b63f-84710c7967bb”: An unhandled exception was thrown by the application.

Exception: 

System.Net.WebSockets.WebSocketException (0x80004005): The remote party closed the WebSocket connection without completing the close handshake.

   at System.Net.WebSockets.ManagedWebSocket.ThrowEOFUnexpected()

   at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, CancellationToken cancellationToken)

   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)

   at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TResult](Memory`1 payloadBuffer, CancellationToken cancellationToken)

   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)

   at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)

— End of stack trace from previous location —

   at Wisej.Core.HttpHandler.ProcessWebSocketRequest(HttpContext context)

   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)

   at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT`1.ProcessRequestAsync()

  • You must to post comments
0
0

Hi Dino,

did you try Application.StartTask()  as suggested by Luca? The code snippet you posted is incomplete.
We need a fully compilable test case to try to help you here.

Best regards
Frank

  • Dino Novak
    HI Frank, I did not try Application.StartTask(). I am using full fledged baskgroundService as all actions in the background are not requiring any UI update. I now commented out Application.Update part in BackgroundService_Message so will see during the day tomorrow if it will cause zorder errors. I am just wondering if maybe loading a wise app as user component could be the issue, I am loading main component from another wise app and placing in inside main panel Strangest thing is that app worked for few days after update to latest wise version, then suddenly breaks with zOrder error. This is then manifested to all users. This is code for loading subApp: private void nbiSubWisejApp1_Click(object sender, EventArgs e) { var rootDir = Path.GetDirectoryName(Application.ExecutablePath); String filePath = System.IO.Path.Combine(rootDir, “subwisejapp1.dll”); System.Reflection.Assembly asm = System.Reflection.Assembly.Load(File.ReadAllBytes(filePath)); Type type = asm.GetType(“subwisejapp.ucMain”); Wisej.Web.UserControl mainUC = (Wisej.Web.UserControl)Activator.CreateInstance(type); var container = this.mainPanel; container.Controls.Clear(true); mainUC.Dock = DockStyle.Fill; mainUC.Parent = container; }
  • You must to post comments
0
0

This solution was working OK until I moved to .net 8.0 and latest wisej version.

I am using a very simple background service that is sending mails in background (see attachement). Could it be the case that Application.Update is the problem?

The only interaction with GUI is by using service  event handlers for messaging to update txt field.

private void BackgroundService_Message(object sender, BackgroundServiceEmailing.BackgroundServiceEmailingEventArgs e)
{
// Application.Update() can optionally call a code block in context before updating the UI.
Application.Update(this, () =>
{
this.txtSendLog.Text = DateTime.Now.ToString() + “: ” + e.Message + Environment.NewLine + txtSendLog.Text;
});
}

  • You must to post comments
0
0

If you can reproduce in a small test case, we can look into it in case it is a bug with Wisej and not your own code. However, it’s likely that this issue is not easy to reproduce in a small test case.

Unfortunately, debugging your application is something that is out of scope of this free support forum.

Your options are to downgrade your version of Wisej as that seems to fix the bug, or to purchase a premium support package here: https://wisej.com/services-packages/

  • You must to post comments
0
0

This error never popped out until I migrated from Wisej 3.1.12 on .net 6.0 to 3.5.16 and .net 8.0
In the whole codebase there is no call to Application.StartTask().

I am suing System.Threading for BackgroundService and  ThreadStart() but this was not a problem so far.

  • Luca
    • Luca
    • Feb 14, 2025 - 4:07 pm
    System.Threading for BackgroundService and ThreadStart() is the issue.Application.StartTask() is not the issue.
  • You must to post comments
0
0
This error indicates that you are “crossing” sessions probably by handling static events and not restoring the context properly. You are most likely pushing some update to all clients.
  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.