Deleting the function and redeploying it again fixes the problem. I was quite desperately trying to resolve it for a few hours. I had a problem with NextJS dynamic routes and SSR. It turned out to be this exact issue. I deleted the function and redeployed it from scratch - all works well now. Phew. I thought after updating NextJS to 15+ messed something up. No, the new AppRouter and Firebase Hosting (not App Hosting) works fine, it's just the annoying cloudrun permission that was holding me.