Re: XPA 4.7.2 RIA Android offline-aplication reconnect to Server not possible #android #xpa


Todd Baremore
 

Helmut,

In the Broker Monitor, if you double click on the failed request you will see the Broker return code  -271.

-271 RQMRI_ERR_UNSYNCHRONIZED_METADATA
One or more files previously cached from the server to the client are out-dated. The client should be restarted once with the server accessible and available, and with the ConnectOnStartup execution property set to Y. Since version: 2.4

Error -271 is also returned by ServerLastAccessStatus()

ServerLastAccessStatus
Returns the status of the last access to the server.
Syntax: ServerLastAccessStatus()
Parameters: None
Returns: Numeric:

0 – Success
1 – Metadata files are not synced (error -271). The client should be restarted once with the server accessible and available, and with the ConnectOnStartup execution property set to Y.
2 – The Web server was inaccessible.
3 – The Web server was accessible but the request could not be served, such as no Magic xpa server was available, or the request started processing in an Magic xpa server but had a fatal error during execution (error -156).
4 – The context is no longer available (such as due to ContextActivityTimeout) and the client could not recreate a new context in the Magic xpa server since there were non-Offline tasks in the execution call tree.
5 – The Studio cannot serve the request, when the Studio is opened in Online Deployment mode and the application was started in Offline mode (error -272)
6 – When the client skips the connection to the server because the ConnectOnStartup execution property is set to N  (Since version: 2.4b)

Usages: 
The function can be used:
    As part of the flow, for example to show a message after a failed Call operation.
    In the Unavailable Server event to notify the user about the problem.
Note:
The value will remain until the next server access.
If the metadata was not synced, the future server accesses are ignored, so the function will always return the same error code.


A guess:  Try clearing the app cache on the Android device and reconnecting to the server.

Todd
On 1/6/2022 4:43 AM, Helmut wrote:

[Edited Message Follows]

Hi Gábor,

thx, i assume you mean the mgrb.ini with the entry (parameter) /ApplicationPublicName = ... in the [APPLICATIONS_LIST]
This is the same and correct entry.

If i start the app with property key="ConnectOnStartup" val="Y" and the context is closed after ContextInactivityTimeout it is the same problem: it is no longer possible to re-establish a server connection via a main event (no context will be created) and in the broker monitor, only the number of 'Failed Req' increases.

I'm already in despair...

Join main@magicu-l.groups.io to automatically receive all group messages.