Friendica - Login failed. Please check your credentials

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.11
What app is this about: Friendica

Describe your issue

Problem: Friendica, recently installed, does not allow me to enter, create and even less to administrate

Share relevant logs or error messages

$ sudo yunohost app install https://github.com/YunoHost-Apps/friendica_ynh/tree/testing --debug
...
175038 DEBUG   + sudo -u friendica php8.2 bin/console.php autoinstall -f /var/www/friendica/config/local.config.php
175229 DEBUG   Initializing setup...
175328 DEBUG    Complete!
175328 DEBUG   
175328 DEBUG   Checking environment...
177771 DEBUG    NOTICE: Not checking .htaccess/URL-Rewrite during CLI installation.
177771 DEBUG   
177771 DEBUG    Complete!
177771 DEBUG   
177771 DEBUG   Loading config file '/var/www/friendica/config/local.config.php'...
177771 DEBUG    Complete!
177771 DEBUG   
177772 DEBUG   Checking database...
177773 DEBUG    Complete!
177774 DEBUG   
177774 DEBUG   Inserting data into database...
177775 DEBUG   
213467 DEBUG   Copying config file...
213478 WARNING [Error] ERROR: Saving config file failed. Please copy '/var/www/friendica/config/local.config.php' to '/var/www/friendica'/config/local.config.php' manually.
...
214105 DEBUG   Checking that required services are up and running...
215780 SUCCESS InstalaciĆ³n finalizada
==========
You can now login to ...

Then

$ sudo yunohost app shell friendica
$ nano config/local.config.php
...
        'config' => [
                'php_path' => '/usr/bin/php8.2',
                'admin_email' => 'bla@bla.bla',
                'admin_nickname' => 'bla',
                'sitename' => 'Friendica Social Network',
                'register_policy' => \Friendica\Module\Register::OPEN,
                'max_import_size' => 200000,
                'register_text' => '',
        ],
...

Then

$ bin/console user list all                                       
+------+------+-----+--------+----------+-------+-----------+
| Nick | Name | URL | E-Mail | Register | Login | Last Item |
+------+------+-----+--------+----------+-------+-----------+
|      |      |     |        |          |       |           |
+------+------+-----+--------+----------+-------+-----------+

Finally, I restarted yunohost and when I rechecked that information, I got the same answer.

Apparently there is NO user created.

And when I try to log into friendica, it always responds with the same ā€œcredentialsā€ problem.

Maybe this is the ā€˜famousā€™ install error of YunoHost-Friendica againā€¦

The database is not initialised. Therefore, there is no user and a login is not possible.

Solution:

Switch to the Friendica environment in the console

sudo yunohost app shell friendica

Then use

bin/console dbstructure update

and initialise the DB.

Unfortunately, there is no user yet, but that can be quickly done with the consoleā€¦

bin/console user add <username> <nickname> <mail-address> <language-code>

IMPORTANT: The mail address must be exactly the one that was selected as the admin e-mail during the installation by YunoHost.

Then set the password:

bin/console user password <password>

After that, Friendica should be running.

I wonder why this bug, which effectively leads to an unusable installation, has not been fixed for an extremely long timeā€¦

2 Likes

Hi, thanks for this! This solution worked for me on a fresh install of Friendica. Wonder what we can do on our end to fix this issue, I am new to all of this.