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

Uncaught ReflectionException? #5

Open
renege opened this issue Apr 20, 2017 · 9 comments
Open

Uncaught ReflectionException? #5

renege opened this issue Apr 20, 2017 · 9 comments

Comments

@renege
Copy link

renege commented Apr 20, 2017

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
Copy link
Contributor

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

@anmolio
Copy link

anmolio commented Jul 13, 2017

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

@anmolio
Copy link

anmolio commented Jul 13, 2017

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

@akaamitgupta
Copy link
Contributor

@anmolio Thanks for pointing it.

@cawrvus
Copy link

cawrvus commented Sep 20, 2017

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
Copy link
Contributor

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

@lucassch
Copy link

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

@kiksy
Copy link

kiksy commented Feb 28, 2018

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
Copy link
Contributor

@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.

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

No branches or pull requests

6 participants