Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035609Retail ModulesWeb POSpublic2017-03-23 18:512017-03-30 16:41
rbianchini 
guilleaer 
urgentmajoralways
closedfixed 
30
RR16Q4.2 
RR17Q2 
marvintm
OBPS
46023
No
0035609: Sometimes with chrome The preference Terminal Authentication is not working properly
If you eneble the preference Terminal authentication and try to log in a terminal using chrome Versión 56.0.2924.87 (64-bit) in ubuntu, the Terminal Selection pop up sometimes doesn't show (Not OK). Also, when the preference is with 'N' value, sometimes the the Terminal Selection pop up is shown (Not OK).
This issue is not always reproducible.

If you use Chromium Versión 56.0.2924.76 Built on Ubuntu , running on Ubuntu 16.10 (64-bit) the issue is not reproducible.

See the attached video

Also i couldn't reproduce this with 16Q3.5
Updated steps to reproduce after analyse
Here a video (https://www.dropbox.com/s/axue2zjcsf6vbyh/term_auth.mp4?dl=0 [^])

- Open and incognito window pointing to ERP
- Login in the ERP using openbravo/openbravo
- Ensure that your current role is "The white valley admin" If not, change role to "The white valley admin"
- In preferences window search for "Terminal authentication" using the field "property"
- 2 items should appear.
- Select the one which is not related to a module and change the value to "Y".
- Then, open "pos terminal" window (in the ERP, using the menu)) and search for VBS-1. Open that line and fill the field "Terminal key identifier" with value "VBS1"
- In other browser, having a clean cache, insert the URL of web POS in your browser
- In the login page terminal authentication dialog will be shown
- Fill data and confirm
  VBS1 / vallblanca / openbravo
-Log in web POS using vallblanca (vallblanca/openbravo)

- Once you are logged in, move back to incognito window and change the value of the preference again to "N"
- Return to web POS and logout
Now in the login page, terminal authentication is not being shown, because it is not enebaled (OK)
- Move back again to incognito window, and enable again the terminal authentication
- Return to web POS and refresh the browser.
Now terminal authentication popup will not be shown.
why? Because the data inserted previously in the popup is already in the cache, so it is still valid. That's why the popup is not shown.

If at this moment you open other incognito window and you navigate to the web pos login page, you will see that authentication popup is shown because that cache does not have the data, so the system ask for it.



Update after analyse:
The problem happens when the terminal authentication is disabled and then enabled again. If the terminal which is being used to log in has been authenticated in the past (without remove cache) then the popup will not appear, because the data which is being required in the popup is already in the cache.
The data stored in the cache is still valid if the terminal is still linked, thats why dialog is not shown.
If the user wants to see the terminal authentication dialog, then terminal should be unlinked (from the ERP). Then popup will appear.
No tags attached.
? Terminal Authentication.mkv (3,214,073) 2017-03-23 18:51
https://issues.openbravo.com/file_download.php?file_id=10606&type=bug
diff fixIssue35609.diff (1,853) 2017-03-27 17:21
https://issues.openbravo.com/file_download.php?file_id=10609&type=bug
Issue History
2017-03-23 18:51rbianchiniNew Issue
2017-03-23 18:51rbianchiniAssigned To => Retail
2017-03-23 18:51rbianchiniFile Added: Terminal Authentication.mkv
2017-03-23 18:51rbianchiniOBNetwork customer => Yes
2017-03-23 18:51rbianchiniSupport ticket => 46023
2017-03-23 18:51rbianchiniResolution time => 1460516400
2017-03-23 18:51rbianchiniRegression level => Production - Confirmed Stable
2017-03-23 18:51rbianchiniRegression introduced in release => RR16Q4
2017-03-23 18:51rbianchiniTriggers an Emergency Pack => No
2017-03-24 12:14marvintmResolution time1460516400 => 1492034400
2017-03-27 13:38guilleaerRegression levelProduction - Confirmed Stable =>
2017-03-27 13:38guilleaerRegression introduced in releaseRR16Q4 =>
2017-03-27 13:38guilleaerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14886#r14886
2017-03-27 13:38guilleaerProposed Solution updated
2017-03-27 15:51guilleaerReproducibilitysometimes => always
2017-03-27 15:51guilleaerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14887#r14887
2017-03-27 15:52guilleaerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14888#r14888
2017-03-27 16:07guilleaerProposed Solution updated
2017-03-27 16:15guilleaerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14889#r14889
2017-03-27 17:21guilleaerFile Added: fixIssue35609.diff
2017-03-27 17:21guilleaerNote Added: 0095593
2017-03-29 16:05hgbotCheckin
2017-03-29 16:05hgbotNote Added: 0095662
2017-03-29 16:05hgbotStatusnew => resolved
2017-03-29 16:05hgbotResolutionopen => fixed
2017-03-29 16:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0acd68c89811ec2e6adf93dd44f5ec37c011528a [^]
2017-03-29 17:04marvintmAssigned ToRetail => guilleaer
2017-03-30 16:41marvintmReview Assigned To => marvintm
2017-03-30 16:41marvintmStatusresolved => closed
2017-03-30 16:41marvintmFixed in Version => RR17Q2

Notes
(0095593)
guilleaer   
2017-03-27 17:21   
Attached possible fix
(0095662)
hgbot   
2017-03-29 16:05   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 0acd68c89811ec2e6adf93dd44f5ec37c011528a
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Wed Mar 29 16:04:54 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0acd68c89811ec2e6adf93dd44f5ec37c011528a [^]

Fixed issue 35609: Terminals will detect that terminal authentication preference have been disabled.

If one terminal which is linked detect that the terminal authentication have been disabled, then information related to terminal authentication stored in the localstorage is removed. Apart from that, the process to link terminals has been evolved. Now it detects when a device which is already linked with an specific terminal is trying to do the same link. In this case no error will be raised.

---
M src/org/openbravo/retail/posterminal/LoginUtilsServlet.java
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---