I assume you are talking about occweb-app (as you reported in Pb with OCC with Nextcloud Hub 26 Spring (34.0.0)) - which is not a “real” command line occ and unsupported since ages:
Deprecated
As nextcloudd has no native support for asynchronous operations, due to the use of php, this aplication is deprecated, and will no longer support the Nextcloud’ future versions (19+). I did not find a way to implemement true support for interactive and long running occ tasks in a web terminal whitout introducing addtional dependencies (through websockets, for example), the lack of true asynchronous occ operations can lead to serious alterations of voluminous instances. This issue may give some hints on why I decided to not support this application anymore.