Openbravo Issue Tracking System - POS2 |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0057253 | POS2 | POS | public | 2024-11-22 09:19 | 2024-11-28 15:18 |
|
Reporter | victor_perez | |
Assigned To | sreehari | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 25Q1 | |
Merge Request Status | approved |
Review Assigned To | |
OBNetwork customer | OBPS |
Support ticket | |
Regression level | Production - Confirmed Stable |
Regression date | 2024-07-19 |
Regression introduced in release | |
Regression introduced by commit | https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/3b98aafeeaa3a836d09bf8f5bc66c5be4879afeb [^] |
Triggers an Emergency Pack | No |
|
Summary | 0057253: Not possible to login to the POS with the offline mode |
Description | When you have a till loaded, if you activate the offline mode, you will not be able to login again.
The error is thrown from the funtion "loginInitActions", then the line of code "await initializeDocumentSequence();" and finally in the "doFetch" from the screenshot.
You can reproduce it in livebuilds. |
Steps To Reproduce | 1. Login a till with the online mode activated. IT MUST BE A TILL THAT HAS NOT DONE ANY ORDER (thus the "sequence" value of the main orders document type must have value "0")
2. Once the till is fully loaded, log out
3. Activate the offline mode using Chrome tools
4. Log in to the till
5. An error will appear with the message "This action is not allowed in offline mode" |
Proposed Solution | The problem seems to be in this line:
https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/3b98aafeeaa3a836d09bf8f5bc66c5be4879afeb#f4d041f0b1c18efe7cf1078a093ace355ae7efb7_141_145 [^]
The problem is that if sequenceNumber is 0, then the expression
if (!DocumentSequence?.lastassignednum?.sequenceNumber) {
I suppose we can instead check if sequenceNumber is undefined, and only then try to load the terminal. In any case, I think most probably still we need to surround that part with a try/catch, although most probably in the case it is undefined we are already screwed and even if we attempt to login offline, we will probably fail so this part must also be checked. |
Additional Information | |
Tags | No tags attached. |
Relationships | depends on | backport | 0057287 | 24Q4 | closed | sreehari | Not possible to login to the POS with the offline mode | depends on | backport | 0057288 | 24Q3.3 | closed | sreehari | Not possible to login to the POS with the offline mode | depends on | backport | 0057289 | 24Q2.5 | closed | sreehari | Not possible to login to the POS with the offline mode | caused by | defect | 0056070 | | closed | sreehari | When sequenceNumber is undefined we get it from terminal and we get DocumentNo duplicated |
|
Attached Files | Screenshot from 2024-11-22 09-06-13.png (237,120) 2024-11-22 09:19 https://issues.openbravo.com/file_download.php?file_id=20547&type=bug

|
|
Issue History |
Date Modified | Username | Field | Change |
2024-11-22 09:19 | victor_perez | New Issue | |
2024-11-22 09:19 | victor_perez | Assigned To | => Retail |
2024-11-22 09:19 | victor_perez | File Added: Screenshot from 2024-11-22 09-06-13.png | |
2024-11-22 09:19 | victor_perez | OBNetwork customer | => OBPS |
2024-11-22 09:19 | victor_perez | Triggers an Emergency Pack | => No |
2024-11-22 09:19 | victor_perez | Description Updated | bug_revision_view_page.php?rev_id=28813#r28813 |
2024-11-22 12:45 | marvintm | Type | design defect => defect |
2024-11-22 12:56 | dmitry_mezentsev | Issue Monitored: dmitry_mezentsev | |
2024-11-25 07:47 | marvintm | Note Added: 0172510 | |
2024-11-25 07:47 | marvintm | Status | new => feedback |
2024-11-25 08:40 | victor_perez | Note Added: 0172517 | |
2024-11-25 11:49 | alostale | Assigned To | Retail => Triage Platform Conn |
2024-11-25 11:49 | alostale | Assigned To | Triage Platform Conn => Triage Platform Base |
2024-11-25 17:08 | victor_perez | Note Added: 0172562 | |
2024-11-26 13:12 | javietxe | Issue Monitored: javietxe | |
2024-11-26 17:16 | marvintm | Assigned To | Triage Platform Base => sreehari |
2024-11-26 17:16 | marvintm | Status | feedback => new |
2024-11-26 17:17 | marvintm | Regression level | => Production - Confirmed Stable |
2024-11-26 17:17 | marvintm | Regression date | => 2024-07-19 |
2024-11-26 17:17 | marvintm | Regression introduced by commit | => https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/3b98aafeeaa3a836d09bf8f5bc66c5be4879afeb [^] |
2024-11-26 17:17 | marvintm | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=28825#r28825 |
2024-11-26 17:18 | marvintm | Note Added: 0172624 | |
2024-11-26 17:18 | marvintm | Status | new => scheduled |
2024-11-26 17:18 | marvintm | Severity | critical => major |
2024-11-26 17:18 | marvintm | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=28826#r28826 |
2024-11-26 17:21 | marvintm | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=28827#r28827 |
2024-11-26 17:21 | marvintm | Proposed Solution updated | |
2024-11-27 06:05 | sreehari | Relationship added | caused by 0056070 |
2024-11-27 12:24 | hgbot | Merge Request Status | => open |
2024-11-27 12:24 | hgbot | Note Added: 0172632 | |
2024-11-27 17:18 | hgbot | Merge Request Status | open => approved |
2024-11-27 17:19 | hgbot | Note Added: 0172644 | |
2024-11-27 17:19 | hgbot | Resolution | open => fixed |
2024-11-27 17:19 | hgbot | Status | scheduled => closed |
2024-11-27 17:19 | hgbot | Fixed in Version | => 25Q1 |
2024-11-27 17:19 | hgbot | Note Added: 0172645 | |
2024-11-27 18:00 | marvintm | Note Added: 0172653 | |
2024-11-27 18:00 | marvintm | Status | closed => new |
2024-11-27 18:00 | marvintm | Resolution | fixed => open |
2024-11-27 18:00 | marvintm | Fixed in Version | 25Q1 => |
2024-11-28 15:17 | marvintm | Note Added: 0172727 | |
2024-11-28 15:17 | marvintm | Status | new => scheduled |
2024-11-28 15:17 | marvintm | Status | scheduled => resolved |
2024-11-28 15:17 | marvintm | Fixed in Version | => 25Q1 |
2024-11-28 15:17 | marvintm | Resolution | open => fixed |
2024-11-28 15:18 | marvintm | Status | resolved => closed |
Notes |
|
|
Although it was initially reproducible, once I updated Chrome browser it seems it is not reproducing. Is it the same to you? |
|
|
|
Even with the update of Chrome browser, I continue to reproduce it (Not in livebuilds but yes in 24Q3) |
|
|
|
It seems that for NOZ (24Q4) they have the same issue. Steps to reproduce:
1- with the wifi on, log in with a user with admin credentials
2- log out
3- Toggle the wifi off
4- log in with a user with admin credentials -> ok
5- log out
6- toggle the wifi on
7- log in with a user with the role seller
8- log out
9- toggle the wifi off
10- log in with a user with the role seller -> ko |
|
|
|
In order to reproduce the issue, it must be tested in a terminal which hasn't yet done any order |
|
|
(0172632)
|
hgbot
|
2024-11-27 12:24
|
|
|
|
(0172644)
|
hgbot
|
2024-11-27 17:19
|
|
|
|
(0172645)
|
hgbot
|
2024-11-27 17:19
|
|
|
|
|
We need to adjust the fix as it doesn't work in some cases |
|
|
|
Finally we have confirmed that solution is correct |
|