-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TOTP NullReferenceException #172
Comments
Hi @gtbuchanan I looked at your setup, it looks correct. You use a WID farm of 2 servers. The encryption keys are in RNG Format. You can check the format of the stored key for a user by checking the value of the ADDS attribute "MFA-TOTPKey". If it does not fit you can change the parameter in the configuration. regards |
@redhook62 It doesn't look like the format changed. Here is an example of a test user I created after I upgraded that exhibits the same problem: I'll try changing to the one of the other formats and see if that resolves the issue. |
Hi, @gtbuchanan In this case, check the passphrase that you entered during your configuration. the initial default is "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890". Obviously, we were unable to reproduce your problem. No NullReferenceException regards |
I used my own passphrase during setup. I just reset it to make sure it didn't get set back to the default at some point.
I just went through this too but it didn't seem to help.
Correct, no user is able to use TOTP. For the sake of completeness, I have been through the following steps trying to reset my encryption configuration:
At this point, the user has a new certificate and a new TOTP key but still receives the same error when trying to log in (Object reference not set to an instance of the object). Nothing shows up in the event log when the error occurs. I have also tried completing the steps in PowerShell only but it doesn't seem to make a difference. Is there anything from the above steps that might be missing or out of order? I'm trying to avoid complete settings reset so biometric devices don't need to be re-enrolled (they all still work). |
HI, The biometric part is not affected by the modification of the keys. Are your servers on time? You can find logs in the ADFS eventlog, this can give us the possible error stack. On our side this is seen as a user error (even if NullReferenceException ...) and it is not logged, only security alerts are logged (eg: key corruption) Last thing, do you have activated the password policy feature ? if yes, try to deactivate it. Can you send me a new export of configuration, i want to see if new properties are well provisionned. regards |
@redhook62 I doubled checked my servers are on the correct time and they are (NTP is working fine). I did have the password policy feature enabled but disabling it did not make a difference. I have tried just about everything I can think of at this point, including running Here are the AD attributes for a test user (non-sensitive) that receives the error: And here is the updated configuration (AFTER manually reconfiguring): adfsmfa.txt |
Hi @gtbuchanan First, Sorry, i was in holidays.... with not internet. Of sure, i was not able to reproduce your problem. With the current logs, I know in which procedure the error occurs. But that's not enough. regards |
Hi @gtbuchanan, @Martin-Gardner Install and test this build, I put some logs/traces in it, to understand your problem. regards |
Hi @redhook62 . Here is the event log: adfs-mfa-error.zip The last message before displaying the error seems to be: "STEP 06 : Identification HTML Gen - Checking NOCODE" |
Hi, @gtbuchanan Thank you ! The problem seems to occur when you have to test if one or more "Providers" are active, in order to display "I Have no code". regards |
Hi, Just one thing... Can you send me the logs after clicking on "Sign In" (STEPS starting at 11). We couldn't find any trace of the post-back. I think it's more of a javascript error (browser side). regards |
Hi @gtbuchanan Sorry to come back to you so late. but we have failed to reproduce your error. regards |
@redhook62 I have tested out the new build. Unfortunately, my issue persists... There is no JavaScript error on my end. There also aren't any cookies: I also tried |
@redhook62 is
SetLinkData js method is using this IdentificationForm value as object (frm) to do frm.submit() in code, frm could be not defined if IdentificationForm is not really an javascript/dom object |
Hi @apr-un , @gtbuchanan I think the form variable is described as well, and it's passed to the javascript function. moreover in debug, this value does exist. Can you confirm that the problem occurs after validating the TOTP code, and not while viewing the form. if this is the case, the logs show that post is never received (no call on the server side, no logs starting with # 11) We tested with your config file and found no issues (since we fixed a duplicate ID with Microsoft HTML, as well as a poorly formatted cookie option) The problem can come from the browser (which browser are you using?) Or from the environment (Antivirus program, Threat Prevention and others). Also check the ADFS logs, because if we have no traces on our side, it is in the ADFS code that the problem must occur. Interestingly in your screenshot, this is a SAML 2.0 (SAMLP) application. regards |
The error occurs after I click "Sign In" with the correct Code and PIN filled in. There are no logs past STEP 06.
The problem occurs on both Firefox and Chromium Edge. The browser doesn't seem to matter.
The environment didn't change. The only thing that changed was upgrading ADFS MFA.
I have. There are no warnings/errors logged there either when the error occurs.
I just tested with Open ID Connect and the same error occurs. However, I just tried the latest build you provided in this thread again in Firefox and now I see some warnings (these don't show up in Edge): |
Hi @gtbuchanan Thanks for these informations. So, no worries related to the themes. For Firefox, yes, these are warnings. However ADFS does not use the "SameSite" attribute. so I think we'll take it out ... because no real gain in using it. At the beginning of next week, I will send you a build, with logs and having removed this attribute on a cookie, which in fact is only used for asynchronous calls to the providers (return sms or approval). regards |
Hi @gtbuchanan In order to evacuate the problems one by one, I am attaching you a new build in which we have removed the "SameSite" attribute on the "showoptions" cookie although this does not occur in the totp process. regards |
@redhook62 I enabled the Email provider, set an email on my user, and set the user's default to "Email" but I don't receive the option to use email (not even biometrics even though I have devices configured): I'm not sure if this is a bug or what. I don't remember having this problem before. I'd think all 3 options I have available should show up (TOTP, Email, Biometrics). Yes, very strange ! regards |
@gtbuchanan I can be wrong but I think that there You'll see only options which were configured (present at moment of user registration). Please try to delete and register this user again (if possible). Edit: Clearing browser cache can help too! |
Hi @gtbuchanan, @apr-un Attached is a new build which includes Traces. However, I still do not understand your problem. Which version remains functional for you? Please save the logs and send them to us. regards |
Hi @gtbuchanan , @apr-un If you can't see the positioned traces, then the page postback is never received, having no exceptions in our code, this probably happens in ADFS code. But, I think that the cause of the problem could be upstream, for example a too intrusive firewall, analyzing the flows and modifying them. on the other hand, make sure that your secret key and your passwords are correct (encryption). you can export your configuration and enter this information in plain text, then import the modified configuration file. regards |
Hi, No news for me... really i don't know where your problem occurs. regards |
oops, commented on the wrong issue I've also started receiving these errors. They most commonly pop-up in Firefox. To get it to work, I need to clear my browsing history, restart my browser, and sometimes open a new tab. It can also happen in Chrome, and Chromium Deriviates(Opera,Vivaldi,Edge). But usually the Chrome based browsers are easier to recover without wiping browsing history. This started happening really frequently as of the latest update for me. |
Yes, I know that there are some JS errors reported by firefox in the MFA but also in ADFS ..., but with Edge there are none. All without causing me any problems of use (Edge, Chrome, Brave, FireFox) so logs why not, but I have already looked at them for a long time. regards |
Hi @gtbuchanan New version 3.1.2109.0. One of my clients seemed to have the same problem as you. diagnosed as a problem of configuration of the rights on their ADDS without being able to clearly identify their problem. regards |
I eventually found only one of my ADFS servers was throwing this error, so we had evicted it from the load balance group and just ran on the other one.
initial test still showed the error, so I tried a reinstall with a reboot in between steps
After this process, it seems to have resolved the issue for us. |
Hi, @Phfas, @gtbuchanan and all It still seems that there is a difference in the rights between your 2 servers. There is also an important difference depending on the configuration of adfs (SQLServer or WID). To simplify, a secondary server (WID) cannot access local information in its SQL Express database with powershell commands. the secondary servers therefore make requests to the primary servers. this remains true today. The modification made in last version, ensures that this "system.db" file will be correctly recreated each time by the "MFA Notification Hub" when the service (mfanotifhub) is started, and dispatch normally to the other servers. I think that the order of installation of the component (since the service starts at the end of the installation) must be, first to install on the Primary servers, and then only on the secondary servers. In principle, there is no need to restart the servers. restarting the "mfanotifhub" service on a primary server will suffice to dispatch this file to all the other servers (provided that the components are installed, that the firewalls are open (port 5987) and that the services are started (the mfanotifhub service stops and also restart ADFS services) On the other hand, as indicated, having never succeeded in observing this problem, the proposed evolution is more coherent and more reliable. without providing the reason for this malfunction. In October there will be an update regarding WebAuth regards |
Hi @parisarcane Your ADFS configuration does not seem correct! regards |
what is identifire? |
I'm encountering a NullReferenceException any time I try to log in with TOTP on the latest version. Unfortunately, the error is not getting logged on any server in my farm so I don't have much useful information to provide. It occurs on this page after I enter the code, PIN, and click "Sign In". It still occurs when I disable the PIN requirement.
Here's my exported configuration with sensitive information redacted:
adfsmfa.txt
The text was updated successfully, but these errors were encountered: