Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver won't download with Telescope enabled #1049

Closed
MSnoeren opened this issue Jul 28, 2023 · 8 comments · Fixed by #1050
Closed

Driver won't download with Telescope enabled #1049

MSnoeren opened this issue Jul 28, 2023 · 8 comments · Fixed by #1050

Comments

@MSnoeren
Copy link

MSnoeren commented Jul 28, 2023

Dusk Version

7.9.1

Laravel Version

10.16.1

PHP Version

8.2

PHPUnit Version

10.2.6

Database Driver & Version

No response

Description

When Laravel Telescope is enabled the Chrome driver won't download. A RuntimeException is thrown with the message Cannot read from non-readable stream. Disabling Telescope (using TELESCOPE_ENABLED) fixes it. I've had the issue on both Github Actions and local (using Sail).

The issue appeared after upgrading to Telescope 4.15.2.

Steps To Reproduce

  1. Install and enable Laravel Telescope.
  2. Run php artisan dusk:chrome-driver --detect
  3. RuntimeException is thrown.
  4. Disable Telescope.
  5. Run php artisan dusk:chrome-driver --detect again.
  6. Driver installs succesfully.
@crynobone
Copy link
Member

I believe this is due to https://github.com/laravel/telescope/blob/4.x/src/Watchers/ClientRequestWatcher.php as the latest version uses Laravel HTTP Client.

@driesvints
Copy link
Member

Heya. Why are you using Telescope on CI?

@MSnoeren
Copy link
Author

It was enabled by accident. I never noticed it being enabled because all tests my succeeded. I found the issue after upgrading Telescope today and then tried it locally where it failed too :)

@driesvints
Copy link
Member

@crynobone what are your thoughts? Should we get HTTP client out of that command again?

@crynobone
Copy link
Member

There few options we can do:

Other solutions that feel too complex to solve a small issue:

  • Disable Telescope recording for downloading requests. Request checking if Telescope is installed.
  • Update Telescope to skip handling such requests, this may be useful for other use cases too.

@wesselstam
Copy link

Could you please create a new tag for this fix? I cant install this fix without using "dev-master".

Thanks!

@CamKem
Copy link

CamKem commented Jul 31, 2023

Has this fix been published? I am still getting this error locally running 7.9.1. @taylorotwell
Screenshot 2023-08-01 at 8 25 14 am

@crynobone
Copy link
Member

v7.9.2 has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants