Sphinx MFA - Missing required parameter: tid

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:

{
"error": {
"code": "Exception",
"message": "Missing required parameter: tid"
}
}

Is there anything that I'm missing? The tid doesn't appear in the URL, which I've seen at some point, but not been able to reproduce.

If I set TWO_FACTOR_ENABLED to TRUE, everything works fine, it just seems to be the initial enrol that's the problem for me.

I have looked at the simple demo, but haven't figured out what's different.

Any suggestions?

Today, however, I'm actually getting the same error with the Sphinx server demo...

Only the Hans login is having the issue, which has TWO_FACTOR_REQUIRED = True in the database.

Can you please provide sample project and/or steps to reproduce the issue?

Demos (2).zip (2.3 MB)

I've uploaded the demo on my VM, which is still failing for me.

Since the users are reset when the project is run, all I have to do is run SimpleServer, launch the web application, and try to login as Hans

I have uninstalled TMS, and reinstalled the latest versions, rebuilt the SphinxSimpleDemo project group, and I still have the same results.

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.

Further to this, I've also reinstalled WebCore and all the other TMS components, with no change to the result.

I'm out of ideas; this works on other machines, but not mine, and I've no idea why.

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.

It's a pure vanilla Windows 11 install, with the same browser as other VMs in that state.

I'll have a go at putting the XData server on a different VM and seeing if that makes a difference.

Is there anything in the data that could cause the issue? Something not set in SX_USERS that should be?

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.

I can also confirm that I get the same issue with a clean database, then creating a new user and updating TWO_FACTOR_REQUIRED to TRUE.

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.

Additionally, I have had it work once today, with a new user, but it hasn't worked since, and I've no idea why.

Sorry but for me the above statements conflict with each other.

Please explain better what "fails...on the same machine or on separate machine" and "Works on another development machine" means, exactly.

I''m afraid I need pretty exact steps to reproduce the issue at our side, in a consistent way.

To clarify...

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?

Running the SphinxServer project on a new Windows 11, with a fresh Delphi 12.3 and TMS install, the IDE fails:

The Console tab shows a bad request error:

The Network tab just shows me a bad request:

Sources tells me nothing I didn't already know:

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?