Error when copying a large amount of data from FTP to Nextcloud

I integrated an external FTP-Server to migrate the data from FTP to Nextcloud. It’s 10300 files, 2900 folders and almost 32 GB of data. During that operation Nextloud logs the following errors:

Update: I figured out my problem: It stopped on some files with the German letter ß in the file name. I tried to rename it with Filezilla on the source, logged in by SFTP. It wasn’t possible. The error was that the source file didn’t exist. After I logged in with unsecured FTP I was able to change the filename. It seems to be a problem with special characters and SFTP. But it was not every file with ß inside, only some of them.

[/details]

Nextcloud version: 18.0.4
Operating system and version: unknown (managed server)
Apache or nginx version: unknown (managed server)
PHP version: 7.4

The issue you are facing:
Copying a large amount of data from SFTP (as external storage) to Nextcloud.

Is this the first time you’ve seen this error? Y (but also first time I did this)

Steps to replicate it:

  1. Implement SFTP server with a lot of data as external storage
  2. Copy them inside Nextcloud from SFTP to Nextcloud

The output of your Nextcloud log in Admin > Logging:

Trying to access array offset on value of type bool at /usr/www/users/oetticlo/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php#332
Trying to access array offset on value of type bool at /usr/www/users/oetticlo/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php#328

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

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => 'xxx.de',
    1 => '123.123.123.123',
  ),
  'datadirectory' => '/usr/www/users/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '18.0.4.2',
  'overwrite.cli.url' => 'http://xxx.de/nextcloud',
  'dbname' => 'nextclouddb',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'webmaster',
  'mail_domain' => 'xxx.de',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'localhost',
  'mail_smtpport' => '25',
  'mail_smtpname' => 'webmaster@xxx.de',
  'mail_smtppassword' => 'xxx',
  'default_language' => 'de',
  'default_locale' => 'de',
  'updater.release.channel' => 'stable',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'remember_login_cookie_lifetime' => 1296000,
  'session_lifetime' => 3600,
  'session_keepalive' => false,
);