Re-add federated share not working; "already added", but not showing up

Nextcloud version: 24.0.7
Operating system and version: Linux 5.4.0-131-generic x86_64
Apache or nginx version (eg, Apache 2.4.25):
PHP version: 7.4.30

The issue you are facing:

I recently had to do a fresh install of my Nextcloud.
Before the reinstall, I had received a shared link to a folder on another person’s Nextcloud. I had added that to my own NC with the “add to your own Nextcloud” link. It synced fine.

Now, after the reinstall, if I try to add the folder, I get the error message saying that link is already shared with me, but it is not showing up.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Re-install Nextcloud
  2. Click on a federated share in order to add it to own Nextcloud
  3. nope

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => ‚xxxxx‘,
  'passwordsalt' => ‚xxxxx‘,
  'secret' => ‚xxxxx‘,
  'trusted_domains' => 
  array (
    0 => ‚xxxxx‘,
    1 => ‚xxxxx‘,
    2 => ‚xxxxx‘,
    3 => ‚xxxxx‘,
  ),
  'datadirectory' => 'xxxxxxx‘,
  'dbtype' => 'mysql',
  'version' => '24.0.7.1',
  'overwrite.cli.url' => ‚xxxxx‘,
  'dbname' => ‚xxxxx‘,
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => ‚xxxxxx‘,
  'mysql.utf8mb4' => true,
  'dbuser' => ‚xxxxx‘,
  'dbpassword' => ‚xxxxx‘,
  'installed' => true,
  'tempdirectory' => ‚xxxxxxxxxxx‘,
  'mail_smtpmode' => 'sendmail',
  'mail_sendmailmode' => 'pipe',
  'mail_from_address' => 'mail',
  'mail_domain' => ‚xxxxx‘,
  'default_phone_region' => 'DE',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'app_install_overwrite' => 
  array (
    0 => 'occweb',
  ),
  'updater.release.channel' => 'stable',
  'updater.secret' => ‚xxxxxxxxxxxxxxx,
);