Collabora online not working when opened from public link share

Nextcloud version (eg, 20.0.5): 22
Operating system and version (eg, Ubuntu 20.04): Debian 10
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.4): 7.4

I click on the files opened from a shared link and collabora starts to load but never ends. If i enable editing for the share it asks for a user alias but the same happens.
Collabora white header without data and grey content.