简体   繁体   中英

Whoops, looks like something went wrong. error in Laravel 5 when trying to run on built in server

I cloned a project from my git repo and tried to do following command

php artisan serve 

I was getting

Laravel 5 Failed opening required bootstrap/../vendor/autoload.php

So I followed this answer

Laravel 5 Failed opening required bootstrap/../vendor/autoload.php

and then did composer install

after this when I did

php artisan serve 

The server started fine but in chrome browser I am getting following error

Whoops, looks like something went wrong. error in Laravel 5 

Any heads Up what could have gone wrong

UPDATE

I opened the folder storage/logs/ and there is a file called laravel this is the dump from it

`[2015-11-18 10:48:25] production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in D:\iclock.in\bootstrap\cache\compiled.php:6943
Stack trace:
#0 D:\iclock.in\bootstrap\cache\compiled.php(1242): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)
#1 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build(Object(Closure), Array)
#2 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('encrypter', Array)
#3 D:\iclock.in\bootstrap\cache\compiled.php(1287): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
#4 D:\iclock.in\bootstrap\cache\compiled.php(1271): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 D:\iclock.in\bootstrap\cache\compiled.php(1257): Illuminate\Container\Container->getDependencies(Array, Array)
#6 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build('App\\Http\\Middle...', Array)
#7 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('App\\Http\\Middle...', Array)
#8 D:\iclock.in\bootstrap\cache\compiled.php(9459): Illuminate\Foundation\Application->make('App\\Http\\Middle...')
#9 D:\iclock.in\bootstrap\cache\compiled.php(2932): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#10 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#11 D:\iclock.in\bootstrap\cache\compiled.php(9459): call_user_func_array(Array, Array)
#12 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#13 D:\iclock.in\bootstrap\cache\compiled.php(9449): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#14 D:\iclock.in\bootstrap\cache\compiled.php(2209): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#15 D:\iclock.in\bootstrap\cache\compiled.php(2192): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#16 D:\iclock.in\public\index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#17 D:\iclock.in\server.php(21): require_once('D:\\iclock.in\\pu...')
#18 {main}  
[2015-11-18 10:48:25] production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in D:\iclock.in\bootstrap\cache\compiled.php:6943
Stack trace:
#0 D:\iclock.in\bootstrap\cache\compiled.php(1242): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)
#1 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build(Object(Closure), Array)
#2 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('encrypter', Array)
#3 D:\iclock.in\bootstrap\cache\compiled.php(1287): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
#4 D:\iclock.in\bootstrap\cache\compiled.php(1271): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 D:\iclock.in\bootstrap\cache\compiled.php(1257): Illuminate\Container\Container->getDependencies(Array, Array)
#6 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build('App\\Http\\Middle...', Array)
#7 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('App\\Http\\Middle...', Array)
#8 D:\iclock.in\bootstrap\cache\compiled.php(2216): Illuminate\Foundation\Application->make('App\\Http\\Middle...')
#9 D:\iclock.in\public\index.php(58): Illuminate\Foundation\Http\Kernel->terminate(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))
#10 D:\iclock.in\server.php(21): require_once('D:\\iclock.in\\pu...')
#11 {main}  
[2015-11-18 10:48:32] production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in D:\iclock.in\bootstrap\cache\compiled.php:6943
Stack trace:
#0 D:\iclock.in\bootstrap\cache\compiled.php(1242): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)
#1 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build(Object(Closure), Array)
#2 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('encrypter', Array)
#3 D:\iclock.in\bootstrap\cache\compiled.php(1287): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
#4 D:\iclock.in\bootstrap\cache\compiled.php(1271): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 D:\iclock.in\bootstrap\cache\compiled.php(1257): Illuminate\Container\Container->getDependencies(Array, Array)
#6 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build('App\\Http\\Middle...', Array)
#7 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('App\\Http\\Middle...', Array)
#8 D:\iclock.in\bootstrap\cache\compiled.php(9459): Illuminate\Foundation\Application->make('App\\Http\\Middle...')
#9 D:\iclock.in\bootstrap\cache\compiled.php(2932): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#10 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#11 D:\iclock.in\bootstrap\cache\compiled.php(9459): call_user_func_array(Array, Array)
#12 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#13 D:\iclock.in\bootstrap\cache\compiled.php(9449): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#14 D:\iclock.in\bootstrap\cache\compiled.php(2209): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#15 D:\iclock.in\bootstrap\cache\compiled.php(2192): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#16 D:\iclock.in\public\index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#17 D:\iclock.in\server.php(21): require_once('D:\\iclock.in\\pu...')
#18 {main}  
[2015-11-18 10:48:32] production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in D:\iclock.in\bootstrap\cache\compiled.php:6943
Stack trace:
#0 D:\iclock.in\bootstrap\cache\compiled.php(1242): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)
#1 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build(Object(Closure), Array)
#2 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('encrypter', Array)
#3 D:\iclock.in\bootstrap\cache\compiled.php(1287): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
#4 D:\iclock.in\bootstrap\cache\compiled.php(1271): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 D:\iclock.in\bootstrap\cache\compiled.php(1257): Illuminate\Container\Container->getDependencies(Array, Array)
#6 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build('App\\Http\\Middle...', Array)
#7 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('App\\Http\\Middle...', Array)
#8 D:\iclock.in\bootstrap\cache\compiled.php(2216): Illuminate\Foundation\Application->make('App\\Http\\Middle...')
#9 D:\iclock.in\public\index.php(58): Illuminate\Foundation\Http\Kernel->terminate(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))
#10 D:\iclock.in\server.php(21): require_once('D:\\iclock.in\\pu...')
#11 {main}  
[2015-11-18 10:49:10] production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in D:\iclock.in\bootstrap\cache\compiled.php:6943
Stack trace:
#0 D:\iclock.in\bootstrap\cache\compiled.php(1242): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)
#1 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build(Object(Closure), Array)
#2 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('encrypter', Array)
#3 D:\iclock.in\bootstrap\cache\compiled.php(1287): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
#4 D:\iclock.in\bootstrap\cache\compiled.php(1271): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 D:\iclock.in\bootstrap\cache\compiled.php(1257): Illuminate\Container\Container->getDependencies(Array, Array)
#6 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build('App\\Http\\Middle...', Array)
#7 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('App\\Http\\Middle...', Array)
#8 D:\iclock.in\bootstrap\cache\compiled.php(9459): Illuminate\Foundation\Application->make('App\\Http\\Middle...')
#9 D:\iclock.in\bootstrap\cache\compiled.php(2932): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#10 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#11 D:\iclock.in\bootstrap\cache\compiled.php(9459): call_user_func_array(Array, Array)
#12 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#13 D:\iclock.in\bootstrap\cache\compiled.php(9449): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#14 D:\iclock.in\bootstrap\cache\compiled.php(2209): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#15 D:\iclock.in\bootstrap\cache\compiled.php(2192): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#16 D:\iclock.in\public\index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#17 D:\iclock.in\server.php(21): require_once('D:\\iclock.in\\pu...')
#18 {main}  
[2015-11-18 10:49:10] production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in D:\iclock.in\bootstrap\cache\compiled.php:6943
Stack trace:
#0 D:\iclock.in\bootstrap\cache\compiled.php(1242): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)
#1 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build(Object(Closure), Array)
#2 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('encrypter', Array)
#3 D:\iclock.in\bootstrap\cache\compiled.php(1287): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
#4 D:\iclock.in\bootstrap\cache\compiled.php(1271): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 D:\iclock.in\bootstrap\cache\compiled.php(1257): Illuminate\Container\Container->getDependencies(Array, Array)
#6 D:\iclock.in\bootstrap\cache\compiled.php(1195): Illuminate\Container\Container->build('App\\Http\\Middle...', Array)
#7 D:\iclock.in\bootstrap\cache\compiled.php(1733): Illuminate\Container\Container->make('App\\Http\\Middle...', Array)
#8 D:\iclock.in\bootstrap\cache\compiled.php(2216): Illuminate\Foundation\Application->make('App\\Http\\Middle...')
#9 D:\iclock.in\public\index.php(58): Illuminate\Foundation\Http\Kernel->terminate(Object(Illuminate\Http\Request), Object(Illuminate\Http\Response))
#10 D:\iclock.in\server.php(21): require_once('D:\\iclock.in\\pu...')
#11 {main}  

` Thanks & Regards

It looks like you don't have a .env file in the root of your project. This file contains all the global settings for your application.

Normaly there is a .env.example file in the root of your application. rename this file to .env and change the APP_KEY property to a random string for better security.

  1. Rename the .env.example to .env
  2. Go to bootstrap=>app.php and uncomment $app->withEloquent();
  3. Make sure that APP_DEBUG=true in .env file. Now it will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM