Symfony\Component\HttpFoundation\Response::setContent(): Argument #1 ($content) must be of type ?string
The above error may happen for many reasons. One of the reason is that your server .env file has wrong configuration.
The configuration could be about wrong
1.APP_URL set up
2. Database set up or wrong name
3. Wrong database password
For me it was the wrong database name and also the wrong APP_URL set up. I set them correctly and the error gone.