laravel / telescope

An elegant debug assistant for the Laravel framework.
https://laravel.com/docs/telescope
MIT License
4.86k stars 581 forks source link

Laravel 6+ and Telescope incompatibility #746

Closed diegogallovich closed 4 years ago

diegogallovich commented 5 years ago

Description:

I have been trying to use Laravel Telescope for a while now with laravel 6.

No specific issue or error comes up but: -composer.json does not get modified ONLY composer.lock

meaning these do not get created: -app/Providers/TelescopeServiceProvider.php -config/telescope.php -public/vendor/

Steps To Reproduce:

I manually changed the version of laravel/framework in composer.json to 5.8, ran composer update and managed to install telescope successfully

THE ISSUE IS CLEARLY AN INCOMPATIBILITY BETWEEN LARAVEL 6 AND TELESCOPE

billriess commented 5 years ago

Strange, we're having no issues running Telescope on Laravel 6.

Are you sure your composer file has the right versions?

lk77 commented 5 years ago

Hello,

there is some issues with Laravel 6 currently, installation fails like https://github.com/laravel/telescope/issues/732, and there is some issues with csrf token also.

Laravel Telescope is not production ready for L6.x for now.

ludo237 commented 4 years ago

Yes it is

didieruzan commented 4 years ago

Same problem here with Laravel 6.6.0 and Telescope

taylorotwell commented 4 years ago

I can install it fine on the latest release of Laravel 6.

Ghosstk commented 4 years ago

Hey!

I cant install telescope with a fresh laravel install what I just made today. Laravel: "v6.6.2" Telescope: "v2.1.1"

Telescope is in my json.lock . But the install is not working. No provider, config, migration or anything.

Install: $php artisan telescope:install

Publishing Telescope Service Provider... Publishing Telescope Assets... Publishing Telescope Configuration... Telescope scaffolding installed successfully.

Migrate: $php artisan migrate

Nothing to migrate.

Publish: $php artisan telescope:publish

Unable to locate publishable resources. Publishing complete. Unable to locate publishable resources. Publishing complete.

indigoram89old commented 4 years ago

@Ghosstk I have the same error too

lk77 commented 4 years ago

i still have those error too, i can't install telescope, i need to copy the stub files manually.

@taylorotwell are you on linux ? it seems that this issue is only on windows 10, because i use both linux and w10, and i only encountered this issue on w10, not on linux. (was on a linux shell with WSL on w10)

MVA18 commented 4 years ago

I have the same issue with Laravel 6 also on Windows 10. Will there be a fix for this as I can't seem to get it working copying the files over manually.

joostvanhoof commented 4 years ago

Having exactly the same issue here as @Ghosstk describes. Service Provider, assets, config and migration are nowhere to be found.

PHP: 7.4 OS: MacOS Laravel: 6.12.0 Telescope: 2.1.4

First time I ran php artisan telescope:install I got the error below (full exception trace at the bottom of this post):

file_get_contents(/Users/joost/Documents/dev/tentacle/app/Providers/TelescopeServiceProvider.php): failed to open stream: No such file or directory

Then ran it again and got:

php artisan telescope:install
Publishing Telescope Service Provider...
Publishing Telescope Assets...
Publishing Telescope Configuration...
Telescope scaffolding installed successfully.

But the scaffolding is not there. @indigoram89, @lk77, @MVA18 has anyone of you managed to fix this?

Full exception trace:

ErrorException  : file_get_contents(/Users/joost/Documents/dev/tentacle/app/Providers/TelescopeServiceProvider.php): failed to open stream: No such file or directory

  at /Users/joost/Documents/dev/tentacle/vendor/laravel/telescope/src/Console/InstallCommand.php:80
    76|
    77|         file_put_contents(app_path('Providers/TelescopeServiceProvider.php'), str_replace(
    78|             "namespace App\Providers;",
    79|             "namespace {$namespace}\Providers;",
  > 80|             file_get_contents(app_path('Providers/TelescopeServiceProvider.php'))
    81|         ));
    82|     }
    83| }
    84|

  Exception trace:

  1   file_get_contents("/Users/joost/Documents/dev/tentacle/app/Providers/TelescopeServiceProvider.php")
      /Users/joost/Documents/dev/tentacle/vendor/laravel/telescope/src/Console/InstallCommand.php:80

  2   Laravel\Telescope\Console\InstallCommand::registerTelescopeServiceProvider()
      /Users/joost/Documents/dev/tentacle/vendor/laravel/telescope/src/Console/InstallCommand.php:43
dellow commented 4 years ago

Also having exactly the same issue as @Ghosstk. Have tried updating dependencies and still have the same issue.

DmitriyKashin commented 4 years ago

Same issue.

AidynMakhataev commented 4 years ago

same issue with last laravel version

dasraab commented 4 years ago

yep, me too

barryvdh commented 4 years ago

Do you get any errors when running 'php artisan vendor:publish --tag=telescope-provider' directly? Does the ServiceProvider actually exists at that location?

renatop7 commented 4 years ago

Do you get any errors when running 'php artisan vendor:publish --tag=telescope-provider' directly? Does the ServiceProvider actually exists at that location?

Hi @barryvdh I'm having the exactly same issue as @Ghosstk and @joostvanhoof

My specs are: PHP: 7.3.14 Ubuntu 18.04 Laravel: 6.15.1 Telescope: 2.1.6

When I run php artisan vendor:publish --tag=telescope-provider I get an error message:

Unable to locate publishable resources.
Publishing complete.
retax3 commented 4 years ago

I tried this series of commands and it work for me composer require laravel/telescope

change in composer.json version of telescope to 2.1

composer install

php artisan telescope:install

php artisan migrate

php artisan telescope:publish

go to route /telescope

I hope it works for you !! ;)

joostvanhoof commented 4 years ago

Telescope is currently at version 3.1 so this would just postpone the problem.

lk77 commented 4 years ago

The only solution i've found was to copy the files manually.

iRynoh commented 4 years ago

The only solution i've found was to copy the files manually.

What did you copy, the public folder?

tawanorg commented 4 years ago

Following.

metrixinfo commented 4 years ago

Same issue here on a Mac.

Fresh installs of Laravel and Telescope.

jacobshenning commented 4 years ago

I can confirm this issue. Temporary solution is to just copy the stub manually.

Or if you're on a mac, just go to your project folder in terminal and run this.

cp vendor/laravel/telescope/stubs/TelescopeServiceProvider.stub app/providers/TelescopeServiceProvider.php

Is there a chance this is a permissions error?

wireblue commented 4 years ago

I think my issue is slightly different to the OP, but I was getting the same "Unable to locate publishable resources." error when trying to run the artisan vendor:publish --tag=telescope-migrations command.

Setting TELESCOPE_ENABLED=true in my .env solved it. Hopefully it might help some of these other scenarios also.

Note: In Laravel\Telescope\TelescopeServiceProvider->boot() there's an IF statement which skips boot if Telescope is not enabled. Telescope has to be booted before the migrations, config etc becomes available.

themsaid commented 4 years ago

Please guys open a new issue with laravel 7.x installed.

bondas83 commented 4 years ago

TELESCOPE_ENABLED=true fix a problem, because from telescope 2.1 added this line in boot:

if (! config('telescope.enabled')) { return; }