Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Timeout with mobile devices
Timeout with mobile devices [message #1838131] Wed, 17 February 2021 07:17 Go to next message
Nils Israel is currently offline Nils IsraelFriend
Messages: 72
Registered: May 2010
Member
Hi all,
we are having a Scout 8.0 application in production use. The clients are Zebra mobile devices (MC33, Android) with the Zebra Enterprise Browser which is based an Chromium.
The applications is used for logistics. In the app there is a form with a StringField. An id is entered into this field using the barcode scanner.
In the 'execChangedValue'-method of the field a tunneled service is called. If the id is valid some not enabled fields in the form are filled with information about the id, the focus changes to another StringField and it is possible to scan a location barcode. Depending on the user setting another service is called after the value changed on the location field or after pressing a button. If the service call is successful then the form is cleared and the user is able to scan another id. In general this works quite well.

The problem occurs when the scanner is not used for some time and is going to sleep. The wifi connection is closed and the scanner is not reachable with ping.
Most of the time the scanner wakes up and the user is able to use it again without problems. But sometimes the scanner wakes up, is reachable with ping and the user is able to scan a bar code and it is entered in the id field but then a Please wait popup appears and the application is locked for some minutes until a timeout occurs.

I am still trying to figure out where the problem is:
a) Browser to Scout UI Client
b) Scout Client to Scout Server
c) Scout Server to Backend

The maxUserIdleTime is set to 3600s (scout.ui.maxUserIdleTime=3600).

Of course it would be best to find the problem and fix it. As a workaround it would even be ok to reduce the timeout from some minutes to some seconds.
Any help would be appreciated.
Kind regards
Nils
Re: Timeout with mobile devices [message #1838146 is a reply to message #1838131] Wed, 17 February 2021 12:54 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 256
Registered: March 2010
Senior Member
Hi Nils,

first of all, thank you for sharing your use case. A Scout app running on a barcode scanner sounds interesting :)

If I were you I would try to increase the log level and also add some more log output to trace the request. If you set the log level of the org.eclipse.scout.rt.ui.html module to debug, the requests processed by the UIServlet will be logged.

According to your description the request to send the value of the string field to the UI server is blocked. Every request initiated by the Scout UI has a unique correlation id that will be included in the requests from the UI server to the backend as well. With some well placed log statements you should be able to see how far the request goes.

You should also check the http session timeouts which are usually set in the web.xml of the .war modules. Maybe it can help to use the same timeout for the backend server as for the UI server. What timeouts do you currently use?

If the http session timeout of the UI server expires, the user will be logged out. To make sure inactive users are not logged out too early, the poller keeps the session alive until scout.ui.maxUserIdleTime is reached. In your case, since the device is going to sleep, the poller won't be active anymore so the session won't be kept alive actively. But if the http session of the UI server expires, a session timeout message should appear rather than a "please wait popup".

Best regards
Claudio
Re: Timeout with mobile devices [message #1838215 is a reply to message #1838146] Thu, 18 February 2021 16:18 Go to previous messageGo to next message
Nils Israel is currently offline Nils IsraelFriend
Messages: 72
Registered: May 2010
Member
Dear Claudio,
thanks for your answer.
I think you are right that the problem is that the js in the browser can't send the value to the ui server. I was able to connect one of the mobile devices with usb, enable debug mode on the enterprise browser and connect with the chrome dev tools on my notebook. To simulate the sleep mode/connection loss I disconnected the mobile device from the access point . It takes some seconds for the scanner to reconnect to the wifi network. During that time I entered the data into the field and voila the Please wait screen appears. Most of the time it doesn't disappear even when whe device is connected again. Instead it takes some time and then two errors appear in the debug console of my local chrome:
index.php/fa/40011/0/

Regarding your other suggestions:
- the http session timeout is 30 minutes and the problem often occurs before that time
- okay, now I understand the maxUserIdleTime setting better

Do you have an idea where I can look for the ajax call to reduce the timeout? Is this handled the same way in Scout 10/11?

Thanks
Nils
  • Attachment: matscan.png
    (Size: 27.96KB, Downloaded 222 times)
Re: Timeout with mobile devices [message #1838236 is a reply to message #1838215] Fri, 19 February 2021 08:16 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 256
Registered: March 2010
Senior Member
Are you sure that the request is not being processed by the UI server when the please wait popup appears? Normally, if there is a connection loss, Scout goes into offline mode and starts a Reconnector that regularly pings the UI server trying to reconnect. During that time the reconnect notification is shown.
index.php/fa/40017/0/

In your case, the browser either does not notice the connection loss or the request is stuck in the UI server. Can you reproduce this behavior with a regular smart phone? If I disable the wifi or put my smartphone on flight mode it correctly goes into offline mode and reconnects as soon as I enable regular mode again.

Scout does not use a timeout for regular requests because they could possibly last very long (e.g. if the processing really takes some time). If you want you can change it by adjusting the default ajax options. To do so you need to extend the Session.js class and override the method defaultAjaxOptions. Please see the technical guide to learn how to replace the default Session class using the object factory: https://eclipsescout.github.io/8.0/technical-guide-js.html#object-factory

This behavior has not been changed for Scout 10 and 11.
Re: Timeout with mobile devices [message #1838254 is a reply to message #1838236] Fri, 19 February 2021 14:43 Go to previous message
Nils Israel is currently offline Nils IsraelFriend
Messages: 72
Registered: May 2010
Member
Not 100%. I will check that on monday and also try setting the defaultAjaxOptions.

Would it make a differences if I would implement this field as a SmartField and the call to the backend as LookupCall instead of a normal service call in the execChangedValue method?
Nils
Previous Topic:Error running helloworld application in Linux
Next Topic:Add error message into LoginDialog/LoginForm
Goto Forum:
  


Current Time: Fri Apr 26 13:01:57 GMT 2024

Powered by FUDForum. Page generated in 0.03901 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top