Two-factor auth provider failed to load (NC 18.0.3)

For some (not all) users of my installation on sharing-web-hosting, the following message appears when logging in:
Unbenannt
If User click on “TOTP” he can enter the second Factor and log in:
Unbenannt1
On the NC-event-log I found the following entry:
“two-factor auth provider ‘twofactor_nextcloud_notification’ failed to load”
“1 two-factor auth providers failed to load”

What could be the cause of this?

1 Like

What is your loglevel set to?

Hi,

I do have the same problem (or annoyance should I say) here. Log Level in config.php is 0…

Running Nextcloud from the official Docker image ; 18.0.3.

Can you please provide the exact errors in the nextcloud.log?

tail -f /var/www/html/data/nextcloud.log, wait for errors to appear after trying to login. Copy/paste here.

Hi,

Thanks for the quick reply. Here are the logs :

{“reqId”:“PIvTOYXtwrrhttbjmTAS”,“level”:3,“time”:“2020-04-05T13:15:21+00:00”,“remoteAddr”:“172.31.0.32”,“user”:“JacquesB”,“app”:“core”,“method”:“POST”,“url”:"/login",“message”:“two-factor auth provider ‘twofactor_nextcloud_notification’ failed to load”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/80.0.3987.149 Chrome/80.0.3987.149 Safari/537.36”,“version”:“18.0.3.0”}
{“reqId”:“PIvTOYXtwrrhttbjmTAS”,“level”:3,“time”:“2020-04-05T13:15:21+00:00”,“remoteAddr”:“172.31.0.32”,“user”:“JacquesB”,“app”:“core”,“method”:“POST”,“url”:"/login",“message”:“1 two-factor auth providers failed to load”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/80.0.3987.149 Chrome/80.0.3987.149 Safari/537.36”,“version”:“18.0.3.0”}
{“reqId”:“Lo8GjbV9JE8pUVY2Gjci”,“level”:3,“time”:“2020-04-05T13:15:21+00:00”,“remoteAddr”:“172.31.0.32”,“user”:“JacquesB”,“app”:“core”,“method”:“GET”,“url”:"/login/selectchallenge",“message”:“two-factor auth provider ‘twofactor_nextcloud_notification’ failed to load”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/80.0.3987.149 Chrome/80.0.3987.149 Safari/537.36”,“version”:“18.0.3.0”}
{“reqId”:“Lo8GjbV9JE8pUVY2Gjci”,“level”:3,“time”:“2020-04-05T13:15:21+00:00”,“remoteAddr”:“172.31.0.32”,“user”:“JacquesB”,“app”:“core”,“method”:“GET”,“url”:"/login/selectchallenge",“message”:“1 two-factor auth providers failed to load”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/80.0.3987.149 Chrome/80.0.3987.149 Safari/537.36”,“version”:“18.0.3.0”}
{“reqId”:“16fK8o8bk9dY2ab1Qg9d”,“level”:3,“time”:“2020-04-05T13:15:21+00:00”,“remoteAddr”:“172.31.0.32”,“user”:“JacquesB”,“app”:“core”,“method”:“GET”,“url”:"/login/selectchallenge?redirect_url=/apps/accessibility/css/user-2ab3d735f5f38b77e7a5c4b6646dfbc6",“message”:“two-factor auth provider ‘twofactor_nextcloud_notification’ failed to load”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/80.0.3987.149 Chrome/80.0.3987.149 Safari/537.36”,“version”:“18.0.3.0”}
{“reqId”:“16fK8o8bk9dY2ab1Qg9d”,“level”:3,“time”:“2020-04-05T13:15:21+00:00”,“remoteAddr”:“172.31.0.32”,“user”:“JacquesB”,“app”:“core”,“method”:“GET”,“url”:"/login/selectchallenge?redirect_url=/apps/accessibility/css/user-2ab3d735f5f38b77e7a5c4b6646dfbc6",“message”:“1 two-factor auth providers failed to load”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/80.0.3987.149 Chrome/80.0.3987.149 Safari/537.36”,“version”:“18.0.3.0”}
{“reqId”:“RE6DxcwICnfmcA1TqOm9”,“level”:3,“time”:“2020-04-05T13:15:22+00:00”,“remoteAddr”:“172.31.0.32”,“user”:“JacquesB”,“app”:“core”,“method”:“GET”,“url”:"/login/selectchallenge?redirect_url=/apps/encryption/ajax/getStatus",“message”:“two-factor auth provider ‘twofactor_nextcloud_notification’ failed to load”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/80.0.3987.149 Chrome/80.0.3987.149 Safari/537.36”,“version”:“18.0.3.0”}
{“reqId”:“RE6DxcwICnfmcA1TqOm9”,“level”:3,“time”:“2020-04-05T13:15:22+00:00”,“remoteAddr”:“172.31.0.32”,“user”:“JacquesB”,“app”:“core”,“method”:“GET”,“url”:"/login/selectchallenge?redirect_url=/apps/encryption/ajax/getStatus",“message”:“1 two-factor auth providers failed to load”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/80.0.3987.149 Chrome/80.0.3987.149 Safari/537.36”,“version”:“18.0.3.0”}

Once I receive the same windows as posted above, all I need to do is to click on TOTP. I then receive the proper prompt, enter my TOTP code and the server let me in, no other problem. It is just that the TOTP box does not show by itself.

Should you need more, I will be happy to provide you with all you need.

Have a nice day,

Try downloading the master.zip from here, removing the existing app in your apps folder and replacing it. :https://github.com/nextcloud/twofactor_totp/archive/master.zip

Otherwise the best place to report this bug is here: https://github.com/nextcloud/twofactor_totp/issues

Edit: Actually you should save the old app just in case.

Here my log-excerpt:

{“reqId”:“XonNYNGiEI-043aJhp9RwQAAAAU”,“level”:3,“time”:“2020-04-05T12:21:53+00:00”,“remoteAddr”:“xxx.xxx.xxx.xxx”,“user”:“XXXXXX”,“app”:“core”,“method”:“POST”,“url”:"/index.php/login/challenge/totp",“message”:“two-factor auth provider ‘twofactor_nextcloud_notification’ failed to load”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:“18.0.3.0”}
{“reqId”:“XonNYNGiEI-043aJhp9RwQAAAAU”,“level”:3,“time”:“2020-04-05T12:21:53+00:00”,“remoteAddr”:“xxx.xxx.xxx.xxx”,“user”:“XXXXXX”,“app”:“core”,“method”:“POST”,“url”:"/index.php/login/challenge/totp",“message”:“1 two-factor auth providers failed to load”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:“18.0.3.0”}
{“reqId”:“XonNYNGiEI-043aJhp9RwQAAAAU”,“level”:3,“time”:“2020-04-05T12:21:53+00:00”,“remoteAddr”:“xxx.xxx.xxx.xxx”,“user”:“XXXXXX”,“app”:“core”,“method”:“POST”,“url”:"/index.php/login/challenge/totp",“message”:“two-factor auth provider ‘twofactor_nextcloud_notification’ failed to load”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:“18.0.3.0”}
{“reqId”:“XonNYNGiEI-043aJhp9RwQAAAAU”,“level”:3,“time”:“2020-04-05T12:21:53+00:00”,“remoteAddr”:“xxx.xxx.xxx.xxx”,“user”:“XXXXXX”,“app”:“core”,“method”:“POST”,“url”:"/index.php/login/challenge/totp",“message”:“1 two-factor auth providers failed to load”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0”,“version”:“18.0.3.0”}

Hi again,

Because it was more an annoyance than anything else, I did not search a lot about it. From the log, I see that it is the Nextcloud Notification 2nd Factor that failed to load. For a good reason! I removed the app! I re-installed it and now I am prompted to select which 2nd Factor I wish to use. It can be either Admin Code, Nextcloud Notification or TOTP.

I disabled Nextcloud Notification in my profile as a potential second factor. Still, I now have to choose manually which second factor I wish to use every time I log in.

Would it be possible to save the TOTP as a preferred method and have to switch manually to something else only when needed ?

That could also be the cause for me :wink: Some time ago I also installed “Two-Factor Authentication via Nextcloud notification”.

Have you seen this?

Yes, but “Solved by deactivating and activating the app " Two-Factor Admin Support” Have you tried to turn it off and on again" did not lead to the solution.

Thanks anyway for the hint.

The system will always show you ALL the 2FA options that are enabled on the account - admin, TOTP/HOTP, U2F, external (if installed), etc.
My understanding is the admin codes were introduced so 2FA can be forced on all accounts without logging into those accounts…

After every user enabled their preferred 2FA option, the admin codes can be removed.
If a user picked two options, they will be both shown…