Openbravo Issue Tracking System - POS2
View Issue Details
0050358POS2Corepublic2022-09-27 18:202022-09-28 16:13
adrianromero 
Triage Platform Base 
normalmajorhave not tried
newopen 
5
 
 
No
0050358: OnLoginActions do not manage properly errors
If an exception is raised during a OnLoginAction a message showing the error is displayed but after the cashier taps on OK the application enters in an infinite loop where the error is diplayed. For example the Fiscalization API should prevent to login into the application if there is the event fired during the inicialiation fails. See attached image.
Register a OnLoginAction like this and login into the application.

import OB from 'org.openbravo.core2/src/core/OB';
import OnLoginActions from 'org.openbravo.core2/src/core/authentication/OnLoginActions';
import './assets/style/main.scss';

export async function register() {
  OnLoginActions.registerAction(OB.EVTFIS.fiscalizationLogin);

  OnLoginActions.registerAction(async () => {
    throw new Error('Error Message');
  });
}

export async function init() {
  // Nothing
}
Logout the POS and go to the login window if an exception is raised during OnLoginActions.

No tags attached.
png Screenshot from 2022-09-27 18-16-03.png (192,248) 2022-09-27 18:21
https://issues.openbravo.com/file_download.php?file_id=17565&type=bug
png
Issue History
2022-09-27 18:20adrianromeroNew Issue
2022-09-27 18:20adrianromeroAssigned To => Retail
2022-09-27 18:20adrianromeroTriggers an Emergency Pack => No
2022-09-27 18:21adrianromeroFile Added: Screenshot from 2022-09-27 18-16-03.png
2022-09-27 18:22adrianromeroAssigned ToRetail => Triage Platform Base
2022-09-27 18:22adrianromeroCategoryPOS => Core
2022-09-28 16:12adrianromeroDescription Updatedbug_revision_view_page.php?rev_id=24790#r24790
2022-09-28 16:13adrianromeroNote Added: 0141449

Notes
(0141449)
adrianromero   
2022-09-28 16:13   
Linked Jira ticket: https://openbravo.atlassian.net/browse/RM-3116 [^]