Buggy JS Actions on iOS

I have a JS Action implementing react-native-biometrics simplePrompt function in a nanoflow. However, when I call this JS Action, the popup appears and disappears almost instantly without the user’s input on iOS only. However, putting a wait action before the JS Action fixes this behavior. I have also faced this issue in other parts of the project where iOS is troublesome but putting a wait/delay of 300ms fixes the buggy behavior. Is this a promise issue or has anyone faced a similar issue? Additionally, debugging the following snippet, the JS Action essentially does not reach the .then or the .catch part and the action does not end up returning anything. Furthermore, the nanoflow it is called from doesn’t complain or continue the sequence. // This file was generated by Mendix Studio Pro. // // WARNING: Only the following code will be retained when actions are regenerated: // - the import list // - the code between BEGIN USER CODE and END USER CODE // - the code between BEGIN EXTRA CODE and END EXTRA CODE // Other code you write will be lost the next time you deploy the project. import "mx-global"; import { Big } from "big.js"; import ReactNativeBiometrics from 'react-native-biometrics' // BEGIN EXTRA CODE // END EXTRA CODE /** * @returns {Promise.<boolean>} */ export async function JS_SimplePrompt() { // BEGIN USER CODE return ReactNativeBiometrics.simplePrompt({promptMessage: ' '}) .then((resultObject) => { const { success } = resultObject return success; }) .catch(() => { return false; }) // END USER CODE }  
0 answers