the problem with determining my location turned out to be simple. Only in one city the coordinates were not registered.
I managed to determine this error only on version php7.4, which immediately, when searching for a location, determined only the city in which there were no registered coordinates. On the php8.0 version of the city, it simply did not determine any and there were no errors. By adding the coordinates everything worked.