Sonarr does not automatically import downloads

Sonarr version (exact version):
Mono version (if Sonarr is not running on Windows):
OS: Debian Linux
Debug logs:
Description of issue:
Sonarr paired with Deluge does not import downloaded files automatically. Searching works and the download is started correctly, but sonarr doesn’t import the file after it finishes downloading. I can import the file manually, but it is not done automatically.

The debug log is spammed with this message after the file starts downloading:

2024-04-23 04:53:46.8|Error|EventAggregator|DownloadEventHub failed while processing [DownloadCanBeRemovedEvent]

[v4.0.4.1491] System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at NzbDrone.Core.Download.DownloadClientProvider.Get(Int32 id) in ./Sonarr.Core/Download/DownloadClientProvider.cs:line 126
   at NzbDrone.Core.Download.DownloadEventHub.Handle(DownloadCanBeRemovedEvent message) in ./Sonarr.Core/Download/DownloadEventHub.cs:line 81
   at NzbDrone.Core.Messaging.Events.EventAggregator.PublishEvent[TEvent](TEvent event)

I am unsure if this is a configuration issue on my end or a sonarr bug. Permissions seem to be fine, I can import the file manually. I do also have completed download handling enabled. Any help would be appreciated. Thanks!

Can you provide trace logs that include this error, or at least debug logs?