Openbravo Issue Tracking System - POS2
View Issue Details
0046896POS2POSpublic2021-05-24 16:022021-06-21 13:58
jmelin 
caristu 
highminorsometimes
closedfixed 
30Openbravo Appliance 14.04
 
TAP 
No
0046896: JIRA 1730 - TerminalLogLoader - Error 401
On the POS, we have in console/network a 401 error on TerminalLogLoader

Request URL: https://agapes-test.cloud.openbravo.com/openbravo/org.openbravo.mobile.core.service.jsonrest/org.openbravo.mobile.core.TerminalLogLoader?$timeout=15000 [^]
Request Method: POST
Status Code: 401 401

Response:
{"response":{"status":-1,"error":{"message":"Request CSRF Token does not match with the one provided by Session","messageType":"Error","title":""},"totalRows":0}}



EDIT ggi:

* Summary:

Most probably the problem is related to the synchronization buffer starting to soon.

* Details:

When the login finish it is saved the csrf token, that is needed for all the requests to backend to work.

Looks like the synchronization buffer is trying to start sending messages to backend when we still don't have this csrf token.

It fails with the terminal log messages because they are the most common messages, also are generated while logout and when user is doing login, so is common to have terminal log messages waiting that the synchronization buffer starts after login to start synchronizing them

* Proposed fix:

Delay the start of the synchronization buffer till we have the csrf token.
1. Connect to POS
2. Start to create an order and wait sometimes

=> After sometimes, you have an error 401

In the log of the OB Central server:
2021-05-24 14:02:52,329 [http-6] ERROR org.openbravo.mobile.core.process.MobileService - CSRF token check failed. Request=/openbravo/org.openbravo.mobile.core.service.jsonrest/org.openbravo.mobile.core.TerminalLogLoader, SessionID=BD542A0BA4D64A1962BB9E9E9ECF8614, SessionToken=8FCA6897EF3E4F0AAD32EA39789DA5D2, RequestToken=3E07EB9164CC4D58AE6853F56C389079
No tags attached.
blocks defect 0046814 closed caristu JIRA 1730 - TerminalLogLoader - Error 401 
Issue History
2021-05-28 22:19guilleaerTypedefect => backport
2021-05-28 22:19guilleaerTarget Version => TAP
2021-06-10 17:56guilleaerAssigned Togorka_gil => caristu
2021-06-10 17:56guilleaerSeveritymajor => minor
2021-06-10 17:57guilleaerResolution time1623362400 => 1623967200
2021-06-10 18:00guilleaerResolution time1623967200 => 1623880800
2021-06-21 13:55alostaleStatusscheduled => resolved
2021-06-21 13:55alostaleResolutionopen => fixed
2021-06-21 13:55alostaleStatusresolved => closed

There are no notes attached to this issue.