I'm trying to introduce MFA into an existing project that uses Sphinx. I've changed TWO_FACTOR_REQUIRED on the user in the database to TRUE, and the process runs smoothly until the OTP is entered under the QR code, then I get this error:
What is confusing, is that I've seen the demo work on other developers machines within the organization. It seems like an environment issue, but having reinstalled TMS components (Biz Core, Sparkle, Aurelius, XData and Sphinx), I'm running out of ideas.
Do you have any browser extension installed in that specific machine?
Are you using the same browser are the other machines?
Please try to identify what is different in your environment, OS, browser settings that is different from the other ones.
Also, if possible, try to run the XData server in two different machines (the one that is failing, and another one), and then try to connect to the server from the two different machines to try to tell if the problem is when the server is running on your machine, or if the browser is running on your machine.
I can confirm that moving the XData server to another machine makes no difference, also creating a new user makes no difference, the WebApp still returns the same error.
Browser: Microsoft Edge Version 136.0.3240.92 (Official build) (64-bit)
OS: Microsoft Windows 11 Enterprise Version 10.0.26100 Build 26100
TMS: Aurelius 5.21.0.0, Business Core Library 1.44.0.0, Data Modeler 3.13.0.0, Sparkle 3.31.0.0, Sphinx 1.14.0.0, XData 5.20.0.0
Fails with XData server and WebApp on the same machine or on separate machines, with the existing database or a clean one, regardless of the selected user.
Works on another development machine, but not on my VM, or with the server on a laptop.
I get the 'Missing required parameter: tid' error if:-
The XData server and WebApp are running on my local VM, with my original database on the VM.
The XData server and WebApp are running on my local VM, with a clean database created from the XData server on the VM.
The XData server is running on my laptop, while the WebApp is running on my local VM, with my original database on my laptop.
The XData server is running on my laptop, while the WebApp is running on my local VM, with a clean database created from the XData server on my laptop.
The same code works perfectly fine on another developers VM, using a clean database created from the XData server running on their VM.
Like I said, it seems to be purely environmental, but I can't pin it down.
The steps to reproduce are simply to build and run the SphinxSimpleDemo project, and attempt to login as Hans. I'm doing nothing different.
I appreciate that there's very little to go on, which is why this is so frustrating.
What happens if you run the XData server is running on your local VM, while the WebApp is running on your laptop (or any other computer)?
Right before you take an action in your web app that causes the error, can you try press F12 to open the developer tool, then perform the action that raises the error, and then check in the console and/or the network requests to see if there is any additional information there?
If I clear the local storage and run again, I get exactly the same thing.
It's all very perplexing. This is a completely new VM, fresh everything.
The Smart Setup program managed to screw things up (paths didn't work with Delphi 12.3 for some reason), so I had to uninstall all that and use the Subscription Manager program instead.
In this instance, the previous reply only caters for the demo project being run. I haven't pulled the repo down for the other issues. If the demo project doesn't work, then it's not likely that my own code will...
This is already suspicious per se. How Smart Setup failed in your clean, Delphi install? Why you didn't report it right away? Why not send the logs.zip files so we can inspect the problem before you proceed further?