squareboat / sneaker

An easy way to send emails whenever an exception occurs on server.
MIT License
222 stars 46 forks source link

Uncaught ReflectionException? #5

Open renege opened 7 years ago

renege commented 7 years ago
PHP Fatal error:  Uncaught ReflectionException: Class sneaker does not exist in /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Container/Container.php:719
Stack trace:
#0 /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(719): ReflectionClass->__construct('sneaker')
#1 /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(598): Illuminate\Container\Container->build('sneaker')
#2 /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(567): Illuminate\Container\Container->resolve('sneaker')
#3 /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(708): Illuminate\Container\Container->make('sneaker')
#4 /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(107): Illuminate\Foundation\Application->make('sneaker')
#5 /home/forge/tst.riskexplor in /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 719
PHP Fatal error:  Uncaught ReflectionException: Class sneaker does not exist in /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Container/Container.php:719
Stack trace:
#0 /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(719): ReflectionClass->__construct('sneaker')
#1 /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(598): Illuminate\Container\Container->build('sneaker')
#2 /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(567): Illuminate\Container\Container->resolve('sneaker')
#3 /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(708): Illuminate\Container\Container->make('sneaker')
#4 /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(107): Illuminate\Foundation\Application->make('sneaker')
#5 /home/forge/tst.riskexplor in /home/forge/foobar.com/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 719
akaamitgupta commented 7 years ago

Can you provide the steps you have followed to install the package? It looks a generic Laravel error. Maybe stackoverflow helps!

anmolio commented 7 years ago

Got the same error ! @akaamitgupta did you find a solution for this ?

anmolio commented 7 years ago

Run composer update --no-scripts and try. Works well for me.

akaamitgupta commented 7 years ago

@anmolio Thanks for pointing it.

cawrvus commented 7 years ago

Same error here. --no-scripts flag doesn't really fix anything it just doesn't run broken php artisan commands. I deployed my laravel application on production server and got this error.

Background

I deployed my laravel application on production server and got this error.
version: 5.4.27

steps to reproduce

  1. set up working laravel project on local machine
  2. install sneaker according to github readme
  3. deploy application on server (I used git)
  4. run composer to install production dependencies (--no-dev flag) including sneaker
  5. after running php artisan optimize or any other php artisan script the error occurs

stack trace

PHP Fatal error: Uncaught ReflectionException: Class sneaker does not exist in /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php:729 Stack trace:

0 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(729): ReflectionClass->__construct('sneaker')

1 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build('sneaker')

2 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve('sneaker')

3 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(728): Illuminate\Container\Container->make('sneaker')

4 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(106): Illuminate\Foundation\Application->make('sneaker')

5 /var/www/app/Exceptions/Handler.php(36): app('sneaker')

6 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(80): App\Exceptions\Handler->report(Object(ReflectionException))

7 in /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 729

PHP Fatal error: Uncaught ReflectionException: Class sneaker does not exist in /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php:729 Stack trace:

0 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(729): ReflectionClass->__construct('sneaker')

1 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build('sneaker')

2 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve('sneaker')

3 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(728): Illuminate\Container\Container->make('sneaker')

4 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(106): Illuminate\Foundation\Application->make('sneaker')

5 /var/www/app/Exceptions/Handler.php(36): app('sneaker')

6 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(80): App\Exceptions\Handler->report(Object(Symfony\Component\Debug\E in /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 729

akaamitgupta commented 7 years ago

@maranovot Can you try to comment the sneaker code and try to run the command again?

lucassch commented 6 years ago

Having the same issue after update my Ubuntu from 16.04 to 17.10

kiksy commented 6 years ago

Seeing this issue too. Laravel 5.5

`PHP Fatal error: Uncaught ReflectionException: Class sneaker does not exist in /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php:752 Stack trace:

0 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(752): ReflectionClass->__construct('sneaker')

1 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('sneaker')

2 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(586): Illuminate\Container\Container->resolve('sneaker', Array)

3 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(732): Illuminate\Container\Container->make('sneaker', Array)

4 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(110): Illuminate\Foundation\Application->make('sneaker', Array)

5 /var/www/app/Exceptions/Handler.php(37): app('sneaker')

6 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(352): App\Exceptions\Handler->report(Object(RuntimeExceptio in /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 752`

Have tried removing and reinstalling using Composer, dumping autoload and cache.

akaamitgupta commented 6 years ago

@kiksy When you face this error please comment the line app('sneaker')->captureException($exception); in your app/Exceptions/Handler.php file.

And try again. Then it will show you the real error behind the it.