Can't install flatpaks anymore, "too many open files"

Hi everyone!
It’s me again, having some issues.
My second PC is giving me this error when trying to install a flatpak, either from Gnome Software or Terminal:

{system/flatpak/flathub/org.freedesktop.Platform/24.08} Can't open system repo : While opening repository /var/lib/flatpak/repo: opening repo: openat(config): Too many open files

Anyone else having this kinds of problems with open file limits?
I tried repairing flatpak and I got no errors.

Thanks in advanced!

Did you try to restart your PC?

No, why? Do I need to restart my PC to install flatpak programs?

https://bugs.kde.org/show_bug.cgi?id=474231

But I’m running Gnome on this PC.
I updated my flatpaks and tried again and got the same error.

For anyone looking for answers in the future, this is the bug and workaround:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.