guzzle: IDN conversion failed (errors: IDNA_ERROR_EMPTY_LABEL)

Guzzle version(s) affected:“guzzlehttp/guzzle”: “^6.3”, PHP version: x.y.z (hint: php --version): 7.4.2 cURL version: x.y.z (hint: php -i | grep cURL): 7.68.0

Description

Error message when installing Scout (Searchable) and Algolia. The error message is “IDN conversion failed (errors: IDNA_ERROR_EMPTY_LABEL) at vendor/guzzlehttp/guzzle/src/functions.php:384.” Saw on Stack Overflow that it works to revert to Guzzle 6.2, but know you prefer we use the most recently updated/stable version.

Additional context
Using Laravel 7.1.3.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

I am facing this issue to. I found #2448 which looks similar. I updated to guzzle 6.5.2 but I am still facing this issue. (Problem occurs only on Mittwald servers)

PHP-FPM: 7.2.10
intl: 1.1.0
ICU version: 4.4.1
ICU Data version: 4.4.0.1
ICU TZData version: 2010i
ICU Unicode version: 5.2

@Wei102193 That did it for me. I made the following change to me .env file within my CI integration and it worked:

SCOUT_DRIVER=null

In my case, It was because of “Laravel\Scout\Searchable”. If you haven’t set up Scout properly or you don’t need them, remove trait Searchable from your model might fix this problem.

Sorry for the delay. This worked for me as it appears the issue was due to incompatibilities between versions (Laravel Scout/Algolia/Guzzle) and not Guzzle itself:

1.	composer remove algolia/scout-extended
2.	composer remove algolia/algoliasearch-client-php:^2.2
3.	composer remove laravel/scout
4.	composer clearcache
5.	composer update
6.	composer require algolia/scout-extended 
⁃	*This time, it used version ^1.9 for algolia/scout-extended
7.	php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
8.	composer require guzzlehttp/guzzle:6.4.1
⁃	*Add your Algolia info to the .env file then run:
9.	php artisan scout:import "App\Post"

Same problem with TYPO3 9.5.15 and guzzle 6.5.2 also on a Mittwald hosting!

Uncaught TYPO3 Exception: IDN conversion failed | GuzzleHttp\Exception\InvalidArgumentException