Hi all,
I am having an unexpected issue that has never come up before. When I run a specific screen action in my reactive web app I get the exception "Cannot read property 'then' of undefined".
I understand that this is caused by javascript but it seems to be the auto generated javascript as I am not running any custom scripts.
This seems to be the area in which the exception is thrown: " return controller._validate$Action(callContext).then( ".
All this action is supposed to do is to run a different screen action that does some validation, then run a server action to apply my data to an entity.
When debugging I can confirm that the validation is done correctly and finishes, but the exception is thrown when I reach the "end" of that action flow. Meaning the problem occurs between the two screen actions before I reach the server action.
If anyone has dealt with this issue before, some advise would be greatly appreciated.
Kind regards
Stefan
Hi Stefan,
It is really strange! If it is possible could you please share the sample oml here. Also please check the below post if it can help.
https://www.outsystems.com/forums/discussion/60684/cannot-read-property-data-of-undefined-in-react-web/
Sachin
Hi Sachin,
Unfortunately I cannot share the oml.
I did however changed it a bit in that I replaced the screen action with the contents of the screen action so that I am no longer calling the action from another action, but rather just executing the contents of it. This does not cause the exception. It also does not happen anywhere else so it seems to have been just a one time thing.
But thank you very much for the help!
Did you find any generic solution for this problem? I am getting the same problem, however the second client action is being called in multiple places in code (also bigger in size) so joining the second screen action to (all) first screen action is not looking great for me.
I have tried to join the second screen action to first screen action for one single case, thats working. But as I said this is not one off, looking something generic solution.
Hi Arunkumar,
Fortunately I have not run into the problem since, so I have not needed to find a more generic solution.
My first suggestion would just be to create a new action that works in precisely the same way and see if creating it from scratch fixes it (this has happened to me in the past).
Other than that I would suggest opening a support ticket with Outsystems as they can also run tests on your environment and suggest actions to be taken.