It happend to me as well…
I notice that the error occurs because of polylang change the url of the search results page.
So, in order to fix that, you need to go at the polylang settings and open the “settings of URL modifications” and check the checkbox on the bottom right that change the homepage URL to have the language code instead of the page ID.
I hope that this help you.