Get client log

0
0

Hello,

we have background thread to check the changes in the data and push them back to GUI by using

Application.Update(grid, () =>
{

});

and sometimes it raises exception like below:

2021-08-15 13:14:20,109 ERROR Program on_ThreadException – System.ApplicationException: Unknown function: reloadData
at Wisej.Web.Application.ProcessCallbackWebEvent(WisejEventArgs e)
at Wisej.Web.Application.ProcessWebEvent(WisejEventArgs e)
at Wisej.Web.Application.OnWebEvent(WisejEventArgs e)
at Wisej.Web.Application.Wisej.Core.IWisejComponent.Event(WisejEventArgs e)
at Wisej.Core.ComponentManager.DispatchEvents(Session session, ICollection events)
at CallSite.Target(Closure , CallSite , ComponentManager , Session , Object )
at Wisej.Core.ResponseManager.<>c__DisplayClass25_0.<OnEvent>b__0()
at Wisej.Core.IWisejSynchronizedImplementation.Lock(IWisejSynchronized target, Action action)
at Wisej.Core.ResponseManager.OnEvent(Session session, Object message)
at CallSite.Target(Closure , CallSite , ResponseManager , Session , Object )
at Wisej.Core.ResponseManager.ProcessRequest(ServiceType service, Object message)

My question is how to get the client log, I mean javascript, browser (console, callstack…) for this kind of exception? The application runs on mobile, so we can not press F12 to see what is behind browser and most of the time it happens in production environment and we have no access to it.

Thank you for your help,

Page

  • You must to post comments
0
0

It’s strange, the client calls “reloadData” on the wisej.web.DataGrid js widget and the method is there for sure. The only way it fails like that is if it’s out of context. In the browser console all you see is the same “Unknown function: reloadData” error since that’s where the error comes from.

Is it possible that the grid is disposed when the push update kicks in?

For the browser console on mobile and logging: Wisej has a custom console system that you can show or hide using Ctrl+F7. It’s disabled when the deployed is not in debug mode. Since there is no way to do Ctrl+F7 on mobile you can show the console programmatically using Application.ShowConsole = true.

You can also install a console handler with the qx.log.Logger like this, in a .js file that you can run in Default.html or using the JavaScript component:

 

qx.Class.define("myLogger",
{
  statics: {
    init: function() {
      qx.log.Logger.register(this);
    },
    process: function(entry) {
       // entry is the line being logged.
    }
  }
});
myLogger.init();

 

 

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.