The story:
I have had a peculiar problem for my existing NC production and testing environment.
From on day to the other no one was able to log in anymore. Every user got the error âwrong username or passwordâ. In the NC log I found errors pointing out that the library sodium.so couldnât be found and the timestamp corresponded with the first occurences of 401 unauthorized messages in the apache log.
As I am on a webspace and donât have access to the php config or the installation on the drive I opened a ticket with my hoster and asked them if they removed it (accidentally) during a maintenance or something. Iâm still in contact with them with no real progress.
As a test I installed a completely fresh NC instance in a new DB using completely separate users, passwords and a new subdomain.
While the new NC instace is for some reason slow as all hell, i was able to log in. At the same time, I suddenly was able to log in into the existing instances again too.
So letâs move on to the question:
Is the nextcloud installation routine installing sodium.so in the background if it isnât present?
Thank you for the answer, but Iâm not sure thatâs the same issue. It might be related though.
I couldnât log into the NC, so I wasnât able to check for any errors on the Overview.
Additionally I wasnât installing or upgrading any of my two existing NC instances when the error appeared. While the error was there, I took a look at the phpinfo page and sodium was mentioned at various places:
|sodium support |enabled|
|libsodium headers version |1.0.16|
|libsodium library version |1.0.16|
At the same time the NC log had this error though:
{âreqIdâ:âYqlgbMPyZoIAACrk7nwAAACIâ,âlevelâ:3,âtimeâ:â2022-06-15T04:30:37+00:00â,âremoteAddrâ:"",âuserâ:"â",âappâ:âPHPâ,âmethodâ:âGETâ,âurlâ:"/index.php/204",âmessageâ:âPHP Startup: Unable to load dynamic library âsodium.soâ (tried: /opt/plesk/php/7.4/lib/php/modules/sodium.so (/opt/plesk/php/7.4/lib/php/modules/sodium.so: cannot open shared object file: No such file or directory), /opt/plesk/php/7.4/lib/php/modules/sodium.so.so (/opt/plesk/php/7.4/lib/php/modules/sodium.so.so: cannot open shared object file: No such file or directory)) at Unknown#0â,âuserAgentâ:âMozilla/5.0 (Android) Nextcloud-android/3.20.2â,âversionâ:â24.0.0.12â}
With php.ini setting: extension_dir /opt/plesk/php/7.4/lib/php/modules
What confuses me, is that the error vanished the moment I installed a new NC instance on the same webspace with another base folder, subdomain, DB and own php config, so no relation whatsoever.
My working theory is, that the timing was a coincidence and my hoster fixed the issue on the server side and simply hasnât informed me yet.