Errors running Laravel Dusk - laravel

I just discovered Laravel Dusk, and I was excited to use it in my project. However, it can't seem to get it to work. I followed the Laravel Documentation to install Dusk. When I run php artisan dusk in the terminal, I get
[Symfony\Component\Process\Exception\RuntimeException]
TTY mode is not supported on Windows platform.
I found this (https://github.com/laravel/dusk/pull/13/files) which is supposed to fix it I think, but I still get the error.
Also, I attempted to run the Dusk tests through PhpStorm following the accepted answer here (https://laracasts.com/discuss/channels/testing/dusk-via-phpstorm), but I get a Class config does not exist error. Many people said that this caused by a space in the .env file, but that is not my issue.
Can anyone help me figure out what is going on with Laravel Dusk in my setup? My Laravel project is 5.4 and I'm using Laravel Dusk 1.0 and PhpStorm is 2017.2.1

You can install chromedriver into windows on your own, and try not to use the version that is shipped with laravel dusk. Remember that, your chromedriver version needs to match your currently installed Chrome version, and when Chrome gets updated, then you need to update/reinstall chromedriver manually again. Hopefully it does not happen too often, and when there are updates, you benefit from using latest versions, which I find really nice :)
Download it here.
After installing chromedriver, you need to start it from command line (just issue command in your download/install directory chromedriver) or add it as service (which I do not prefer, cause I want to have control of which service is running on 9515 port).
Finally you need to comment out // static::startChromeDriver(); in your DuskTestCase.php, which tries to start laravel dusk included chromedriver, cause in this case, you are already running one.
Run dusk tests again and all should be working fine.
I don't know what your system setup is, but I am using this workaround on windows 10 with Laravel 5.5, dusk 2.0, which still causes problems, when chrome gets updated.
BTW. Just to mention. This also works with CI workflows using docker. You can read more about it here

Related

how can I avoid Package sebastian/resource-operations is abandoned, error while creating a new laravel application

I opened powershell and I run laravel new pp command to create a new application but I am unable to do so and this error occurs:
How can I solve it?
Make sure you have the latest Laravel installer installed, so see the documentation and install it again running composer global require laravel/installer as the documentation shows.
Edit
That is only a warning, it should not stop your Laravel build, and there is really nothing you can do about it (to hide it at least) as it is related to phpunit/phpunit, but it is just a warning.
Read this GitHub issue and you will see why it was abandoned and that it will be fixed when phpunit 10 is released (if you upgrade to it).

Class 'Illuminate\Routing\ControllerServiceProvider' not found While Upgrading from Laravel 5.1 to 5.2

I have a Laravel 5.1 install that I am upgrading. I meticulously followed the instructions available at https://laravel.com/docs/5.3/upgrade#upgrade-5.2.0 for the upgrade, including removing Illuminate\Foundation\Providers\ArtisanServiceProvider and Illuminate\Routing\ControllerServiceProvider from the config/app.php file (I am stressing this point, as googling for this issue has suggested this in every response).
Despite this, I am still getting this error when I run composer cache:clear
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Illuminate\Routing\ControllerServiceProvider' not found error
and see this error in my browser:
FatalThrowableError in ProviderRepository.php line 146:
Class 'Illuminate\Routing\ControllerServiceProvider' not found
Thinking that perhaps references to these classes were being cached, I checked bootstrap/cache/services.json and removed the references from there as well and then ran composer dump-autoload but I am still getting this error.
I also made sure to copy over example config/app.php from Laravel 5.2 clean install example here: https://raw.githubusercontent.com/ziyed/Laravel-5.2/master/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php
I have read through the similar threads on StackOverflow and Laracast and tried tried to use the advice contained inside, but nothing seems to work.
Any help would be greatly appreciated. For reference, my dev setup is running on a local XAMPP stack under a Windows 10 OS. The other environments are remote, using a traditional LAMP stack with Amazon Linux 2. I was trying to do the upgrade locally.
Illuminate\Routing\ControllerServiceProvider is not present anymore.
When I recently had to upgrade the same versions as you, I had to run composer update before and after removing Illuminate\Routing\ControllerServiceProvider::class and Illuminate\Foundation\Providers\ArtisanServiceProvider::class to make it work. Also worth to mention you need to clear bootstrap/cache. It worked for me.
Edit: i noticed now you tried the last step partially as well. You can remove all php files from cache.
I am closing this question, not because I found an answer, but because continuing down this path just didn't pass a cost/benefit analysis. After upgrading to 5.2, the next upgrade would be 5.3, and the breaking changes between 5.2 to 5.3 is a lot higher than between 5.1 to 5.2. After some thought, it was obvious that the better approach would be a fresh install on my target version, and then start porting over each module in my project by copying over the views, updating the routing, and making changes to the controllers and middleware as needed.
Or just using Laravel Shift.
Thank you to everyone who chimed in with suggestions!

IDN conversion failed

I built a system with laravel-admin and guzzle. I send api requests to Shopify with Guzzle and everything works fine on my local environment. However, when I try to create a product in production , it gives me this error.
IDN conversion failed
I looked into it on Google, and it seems Guzzle is giving me this error because I get the error only when I try to create the kinds of products that I sync with Shopify with guzzle.
There is not much information about the error on Google, and I am lost as to why it is happening. Has anyone experienced the same issue?
Could you please add PHP and Guzzle versions to the question? I'm one of the authors of this feature, and (unfortunately) there were some issues related in specific cases. But to say something I need more details.
Generally, try to upgrade to the latest version. Things probably should be fine with the latest Guzzle 6.5.2.
I've also suddenly started running into this issue. I have PHP version 7.2.30 running on the server and cURL version 7.19.7.
It worked fine yesterday, and wasn't working properly this morning. Nothing has changed, other than I upgraded Laravel and all dependencies. However, I think the particular code in the Guzzle Utils.php file where this error is being triggered has been around for quite a while. I tried downgrading Laravel to versions from much earlier this year, and Guzzle stayed the same.
We recently updated our web server, but that didn't make a difference to the PHP version nor should it have affected configuration.
This error I'm getting right now is baffling and I have no idea how to troubleshoot it.
EDIT: I found a simple work around for this problem through server configuration. After digging through the codebase in Laravel I noticed that Symfony provides polyfils if the intl extension is not installed. As such, I just disabled the intl extension on the server, which caused it to use the polyfils, which resolved the problem for me.
I checked first to see what version of ICU the intl was using, and it was an older version and hence the reason I got the errors.
So if you are running Laravel or anything else Symfony based and are having this problem, this could be a simple solution if you can't upgrade to a newer version of PHP for whatever reason. We are running a Plesk-based server, so we are dependent on them providing PHP and all the various extensions and we can't control their upgrade timing.
If you don't have that problem, then your other option would be to upgrade your PHP yourself and ensure the intl extension is up to date and compiled against a more current version of ICU.

ConfirmPasswordController doesn't exist after upgrade from Laravel 5.8 to 6.2

I am working on a project which is in Laravel 5.8, and recently, I upgraded it to Laravel 6.0 with its packages dependencies versions too. The project was running fine. But, today, I update the composer via composer update, and it upgraded to Laravel 6.2. After that, I faced an error:
App\Http\Controllers\Auth\ConfirmPasswordController does not exist
Then I installed a fresh Laravel-6.2 and generated basic scaffolding via php artisan ui vue, then, generated login/registration scaffolding via php artisan ui vue --auth. After that, I found ConfirmPasswordController.Then, I manually created ConfirmPasswordController in my running project and copied all of the codes from ConfirmPasswordController to my manually created ConfirmPasswordController. Then, the error has gone. Although I did not face any error related to this. But, I am confused about my approach. Is it right way what I did? Or it has a better way to solve this problem. I am confused about, If I face many issues for php artisan ui vue --auth in the next time. Would someone suggest me the right process, what should I do?
Laravel made the following additions and modifications from versions v6.0.0 to v6.2.0.
A app/Http/Controllers/Auth/ConfirmPasswordController.php
M app/Http/Controllers/Auth/ForgotPasswordController.php
M app/Http/Controllers/Auth/ResetPasswordController.php
M app/Http/Kernel.php
M config/auth.php
M resources/lang/en/validation.php
Please make sure these changes are in your Laravel instance though it sounds like they now are. You can see the diff of v6.0.0 to v6.2.0 here. If you need to see v5.8.0 changes through 6.2.0, please go here.
When upgrading, you will need to copy it from https://github.com/laravel/laravel/blob/master/app/Http/Controllers/Auth/ConfirmPasswordController.php
This is known, reference https://github.com/laravel/ui/pull/36#issuecomment-539921924.

is there a way to manually install laravelcollective? laravel 5.4

I have installed Laravel on shared hosting using softoculous. Now I am facing an issue. I have followed SO Answer which did not work for me. How can I manually install laravelcollective package. I also don't have SSH enabled. Therefore, I can't use composer. Everything except package is working fine. I also ran artisan commands using
\Artisan::call()
but sadly nothing has worked for me.
I see only one solution you should upload your vendor folder from your local computer to your server. Although its not a recommended way its probably your only option

Resources