Laravel - Exception thrown at Guzzle function when running seeder - php

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?

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.

Please, try to upgrade to the latest stable version (6.5.2 at the moment). We did our best to consider all possible installation details, so you should not have this error anymore.
If the error still occurs, please report it as a bug here: https://github.com/guzzle/guzzle/issues.

Right now, the best solution is update, the lastest version works fine

Related

trying to run php artisan tinker returns error "file_exists(): Unable to find the wrapper "hoa" "

I'm trying to open tinker in a Laravel project, but when I run php artisan tinker I get this error:
ErrorException
file_exists(): Unable to find the wrapper "hoa" - did you forget to enable it when you configured PHP?
I can't find everything similar error online, I found only similar errors but with 'wrapper http' .
Does anyone have any suggestions? Thanks
Could this be due to custom code or a library you've imported?
I often find that if I add things to the ServiceProvider or Kernel, they run before many of the artisan commands, and if I've failed to perform the proper "if" checks first, it fails.
I suppose the question I would have in return would be; Is this a fresh Laravel install or have you got custom code and libraries running? I would check there, try removing libraries you've added, HOA from my searching doesn't appear to default to Laravel.
— Happy to revise my answer should more detail be provided
Solved with this command founded on github:
composer require psy/psysh:0.11.2 --dev

Logger does not work anymore after upgrade from Laravel 5.5

Since I've upgraded to Laravel version 5.6 from Laravel version 5.5 my Logger doesn't work properly anymore.
At first I got the following error stack :
laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [] is not defined. at /home/vagrant/Code/grotesmurf/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:181)
which was solved by simply adding the new config/logging.php file that is provided by Laravel 5.6.
But now I'm getting no output from the Logger! I'm simply running \Log::info('hello!') as a tinker command, but it doesn't generate any log output anymore (same for scripts calling the \Log() method).
I've tried different LOG_CHANNEL settings (daily, single, stack), but none of these work.
Hope anyone has ran into this error already and is able to provide me with some suggestions. I have followed the upgrade guide and it doesn't help unfortunately.
Thanks in advance.
P.S. I'm running php version 7.1 & am on ubuntu.
P.P.S. I have cleared all cached config using artisan.
Well I have found the actual problem, we use an adjusted storage_path() method in our application and the new Logger is now using the storage_path() method to generate its path - this caused the log file to be created in a different directory than storage/logs.
i had the same issue, deleting the files in bootstrap/cache solved it.

Class 'Spatie\Analytics\AnalyticsServiceProvider' not found

This is duplicate question, I am trying to use spatie/laravel-analytics but in localhost it does not throw this error but on server it shows this error, I'm using shared hosting. Also I've tried other solutions. My versions are:
Laravel 5.4
Analytics 3
PHP 7.1.5
Error :
Class 'Spatie\Analytics\AnalyticsServiceProvider' not found
I've deleted and re-uploaded all files, it does not show this error now!

Codeception Bootstrap Error - Given expression is not a regex

I just pulled in the latest version of Codeception using Composer and ran vendor/bin/codecept bootstrap and received the error when it tried to the Build Inital Guy Classes:
PHP InvalidArgumentException: Given expression is not a regex. In:
vendor/symfony/finder/Symfony/Component/Finder/Expression/Regex.php on line 77
It actually does seem to complete, but whenever I run vendor/bin/codecept run I also get this same error.
For reference i'm using:
Laravel Latest
Composter Latest
PHP 5.4.25
Thanks for the assistance.
As a workaround, you can disable xdebug for php5-cli.

Configuring MongoDB + doctrine in Symfony

I was trying to install MongoDB doctrine bundle as written in here
But when I ran the command
$ php bin/vendors install
It throws up the following error:
Fatal error: Call to undefined method
Doctrine\ODM\MongoDB\Configuration::setLoggerCallable()in
C:\wamp\www\Symfony\app\cache\dev\appDevDebugProjectContainer.php on line 245
I have followed the installation instructions to the word (which has not been much anyways...) and i have also double checked my installation... Is there something I am missing here?
Update : A similar problem is mentioned here, but even after following the answer there, i could not successfully configure DoctrineMongoDBBundle.
The latest changes in the Doctrine MongoDB repo have introduces this problem. To stick to a version before this happened, add this line to deps.lock:
doctrine-mongodb 5ccb18231218ce92c9d72295f69bebfe172ef5fb
Well, finally I managed to solve it by adding this to the deps file:
[DoctrineMongoDBBundle]
git=http://github.com/symfony/DoctrineMongoDBBundle.git
target=/bundles/Symfony/Bundle/DoctrineMongoDBBundle
version=origin/2.0
** note the
version=**origin**/2.0
which is different from the previously suggested simple
version=2.0.0 or something similar...
I have a hunch that this problem occurs only on Windows, I hope someone could kindly confirm this.

Categories