Search code examples
phplaravelvagrantguzzlehomestead

Laravel - Exception thrown at Guzzle function when running seeder


Running php artisan db:seed throws the following error: GuzzleHttp\Exception\InvalidArgumentException : IDN conversion failed (errors: IDNA_ERROR_EMPTY_LABEL) at vendor/guzzlehttp/guzzle/src/functions.php:384

Never seen this error before and it doesn't appear to be an issue with my seeder syntax.

The partial exception trace is:

1   GuzzleHttp\_idn_uri_convert()
      /home/vagrant/code/companion-2.0/vendor/guzzlehttp/guzzle/src/Client.php:220

2   GuzzleHttp\Client::buildUri()
      /home/vagrant/code/companion-2.0/vendor/guzzlehttp/guzzle/src/Client.php:113

I'm running commands within a vagrant/homestead environment. Could this be a version incompatibility?


Solution

  • This is an issue with guzzle 6.5.0. See more info here: https://github.com/guzzle/guzzle/issues/2448

    Solution: downgrade to version 6.4.1.