• Resolved Carl Gross

    (@carlgross)


    Hello. For many months I have had your plugin installed and login security enabled. There have been no issues until recently. But just this week I noticed an issue. I cannot login to WordPress. When I enter my valid login credentials, the page displays:

    ERROR: An error was encountered while trying to authenticate. Please try again.

    screenshot There are no errors in the JavaScript console. If I login to my site via FTP, navigate to the plugins folder, and rename the Wordfence directory, the issue goes away. Any ideas why this is occurring and how I can resolve it?

    I asked another admin on my site to try to login, and he experiences the same issue.

    I have Wordfence v7.4.5 installed.

    The site in-question is my live site. I have a separate staging site, which is a clone of my live site. It is on a sub-domain, and also has Wordfence + login security enabled. But the issue is not present on that site.

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hey @carlgross,

    Can you please try disabling Two-Factor and reCAPTCHA to see if it helps?

    If it does help, it sounds like there might be a conflict either with the theme or one of the plugins you’re using, could you try temporarily switching to a default theme if you’re not already using one and disabling all other plugins then reactivating them one by one to see if the issue persists?

    Please let me know what you find.

    Thanks,

    Gerroald

    Thread Starter Carl Gross

    (@carlgross)

    Hi @wfgerald,

    Thanks for the reply. Here are my follow-ups.

    >> Can you please try disabling Two-Factor and reCAPTCHA to see if it helps?

    reCAPTCHA has is already disabled (screenshot). 2FA was enabled. When I opened the login security page, there was a big blue ‘DEACTIVATE’ button for 2FA. I clicked it, but encountered an error (screenshot). Now, when I open Dashboard–>Wordfence–>Login Security–>Two-Factor Authentication, there is no ‘DEACTIVATE’ button–2FA seems to be enabled for my user (screenshot). If I open the ‘Settings’ tab, 2FA is enabled for admins, and I cannot untick it (screenshot). Thoughts on all that?

    >> If it does help, it sounds like there might be a conflict either with the theme or one of the plugins you’re using, could you try temporarily switching to a default theme if you’re not already using one and disabling all other plugins then reactivating them one by one to see if the issue persists?

    One thing I *can* say is that on the all admin pages (including the Wordfence admin pages), there are errors in the JavaScript console (screenshot).

    I would love to try these. But as mentioned, this is my live site. Bringing it down to test these is very undesirable. Unfortunately the issue does not occur on my dev site ??

    Thread Starter Carl Gross

    (@carlgross)

    Update: As I mentioned, there are JS console errors in the plugins admin page. Just as a test, I deactivated two of the plugins responsible for these errors. In doing so, I was able to remove both the uncaught (in promise) error and the 404 error. But that did not resolve the Wordfence login issue. So I’m not sure these JS console errors are related. Plus, on the WordPress *login* page, there are no JS console errors.

    Thread Starter Carl Gross

    (@carlgross)

    Hi guys. Any update on this? It’s getting a bit critical on my end unfortunately :-/

    Thread Starter Carl Gross

    (@carlgross)

    Issue resolved. I should first say that in addition to this Wordfence login error, there were many other small non-Wordfence errors across my site, e.g. non-descript error whenever I uploaded an image, could not search for new plugins, etc. It seemed to be related to some commented code in my child theme’s functions.php. When I deleted that code, all of those issues magically went away. I unfortunately didn’t save that commented code for analysis. But I *can* say that it included a <script> tag, e.g.

    $test = 'hello world';
    echo $test;
    ?>
    <script>
      .body {
        color; red;
      }
    </script>
    <?php
    $value = 10;
    echo $value;

    My educated guess is that the <script> tag didn’t get commented out in full, or something. But we’ll have to leave it there.

    We can consider this resolved.

    Similar problem here. The thread is assigned resolved but still I am not sure how to fix it.
    https://prnt.sc/rvkc33

    Thread Starter Carl Gross

    (@carlgross)

    I’d suggest creating a new post in these forums with your issue. I say that because:

    1. When you reply to a post that has already been ‘resolved,’ the moderators sometimes don’t see those (or possible don’t receive a notification).

    2. Your issue appears to be a slightly different issue than the issue indicated in this post. Yours has a specific JavaScript console error associated with it, while the issue in this post does not.

    Yes, thanks, I have already realise that I have created a new thread.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘ERROR: An error was encountered while trying to authenticate. Please try again.’ is closed to new replies.