InvalidConfigException when running yii2 advanced template on windows - php

I'm running code available here under feature-1-login branch:
https://github.com/dzidlicious/invest-tracker
After running the docker-compose up and accessing the BACKEND part of the application, I'm getting the following stack trace:
yii\base\ErrorException: Exception (Invalid Configuration) 'yii\base\InvalidConfigException' with message 'The directory does not exist: '
in /app/vendor/yiisoft/yii2/web/AssetManager.php:236
Stack trace:
#0 /app/vendor/yiisoft/yii2/web/AssetManager.php(546): yii\web\AssetManager->checkBasePathPermission()
#1 /app/vendor/yiisoft/yii2/web/AssetManager.php(478): yii\web\AssetManager->publishDirectory('/app/vendor/yii...', Array)
#2 /app/vendor/yiisoft/yii2/web/AssetBundle.php(181): yii\web\AssetManager->publish('/app/vendor/yii...', Array)
#3 /app/vendor/yiisoft/yii2/web/AssetManager.php(292): yii\web\AssetBundle->publish(Object(yii\web\AssetManager))
#4 /app/vendor/yiisoft/yii2/web/AssetManager.php(263): yii\web\AssetManager->loadBundle('yii\\validators\\...', Array, true)
#5 /app/vendor/yiisoft/yii2/web/View.php(287): yii\web\AssetManager->getBundle('yii\\validators\\...')
#6 /app/vendor/yiisoft/yii2/web/AssetBundle.php(125): yii\web\View->registerAssetBundle('yii\\validators\\...')
#7 /app/vendor/yiisoft/yii2/validators/RequiredValidator.php(93): yii\web\AssetBundle::register(Object(yii\web\View))
#8 /app/vendor/yiisoft/yii2/widgets/ActiveField.php(833): yii\validators\RequiredValidator->clientValidateAttribute(Object(common\models\LoginForm), 'username', Object(yii\web\View))
#9 /app/vendor/yiisoft/yii2/widgets/ActiveField.php(233): yii\widgets\ActiveField->getClientOptions()
#10 /app/vendor/yiisoft/yii2/widgets/ActiveField.php(223): yii\widgets\ActiveField->begin()
#11 /app/vendor/yiisoft/yii2-bootstrap4/src/ActiveField.php(244): yii\widgets\ActiveField->render('<label for="log...')
#12 /app/vendor/yiisoft/yii2/widgets/ActiveField.php(176): yii\bootstrap4\ActiveField->render()
#13 /app/backend/views/site/login.php(27): yii\widgets\ActiveField->__toString()
#14 /app/vendor/yiisoft/yii2/base/View.php(348): require('/app/backend/vi...')
#15 /app/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/app/backend/vi...', Array)
#16 /app/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/app/backend/vi...', Array, Object(backend\controllers\SiteController))
#17 /app/vendor/yiisoft/yii2/base/Controller.php(410): yii\base\View->render('login', Array, Object(backend\controllers\SiteController))
#18 /app/backend/controllers/SiteController.php(87): yii\base\Controller->render('login', Array)
#19 [internal function]: backend\controllers\SiteController->actionLogin()
#20 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#21 /app/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#22 /app/vendor/yiisoft/yii2/base/Module.php(534): yii\base\Controller->runAction('login', Array)
#23 /app/vendor/yiisoft/yii2/web/Application.php(104): yii\base\Module->runAction('site/login', Array)
#24 /app/vendor/yiisoft/yii2/base/Application.php(392): yii\web\Application->handleRequest(Object(yii\web\Request))
#25 /app/backend/web/index.php(17): yii\base\Application->run()
#26 {main} in /app/vendor/yiisoft/yii2/base/ErrorHandler.php:343
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleError(256, 'Exception (Inva...', '/app/vendor/yii...', 343, Array)
#1 /app/vendor/yiisoft/yii2/base/ErrorHandler.php(343): trigger_error('Exception (Inva...', 256)
#2 /app/vendor/yiisoft/yii2/widgets/ActiveField.php(178): yii\base\ErrorHandler::convertExceptionToError(Object(yii\base\InvalidConfigException))
#3 /app/backend/views/site/login.php(27): yii\widgets\ActiveField->__toString()
#4 /app/vendor/yiisoft/yii2/base/View.php(348): require('/app/backend/vi...')
#5 /app/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/app/backend/vi...', Array)
#6 /app/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/app/backend/vi...', Array, Object(backend\controllers\SiteController))
#7 /app/vendor/yiisoft/yii2/base/Controller.php(410): yii\base\View->render('login', Array, Object(backend\controllers\SiteController))
#8 /app/backend/controllers/SiteController.php(87): yii\base\Controller->render('login', Array)
#9 [internal function]: backend\controllers\SiteController->actionLogin()
#10 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /app/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#12 /app/vendor/yiisoft/yii2/base/Module.php(534): yii\base\Controller->runAction('login', Array)
#13 /app/vendor/yiisoft/yii2/web/Application.php(104): yii\base\Module->runAction('site/login', Array)
#14 /app/vendor/yiisoft/yii2/base/Application.php(392): yii\web\Application->handleRequest(Object(yii\web\Request))
#15 /app/backend/web/index.php(17): yii\base\Application->run()
#16 {main}
I have intentionally committed my config files and attached a screenshot.

That error happens because you are missing the backend/web/assets folder and the server does not have the permissions to create it.
Check the owner and permissions of backend/web if the server can't write it, it won't be able to create the assets folder.
You could update backend/web and make it server-writable.
You can also create backend/web/assets manually, then update the permissions and give the server group rw permissions, or run init on the project root, if you are sure that nothing you have modified will be overwritten.

Related

I have reinstalled composer and xampp now I am getting this error Uncaught GuzzleHttp\Exception\ClientException: Client error:

My code was working fine I was using firebase with php then I reinstalled composer and xampp now this error is appearing on my screen
<b>Fatal error</b>: Uncaught GuzzleHttp\Exception\ClientException: Client error: POST https://oauth2.googleapis.com/token` resulted in a 400 Bad Request response:
{"error":"invalid_grant","error_description":"Invalid JWT: Token must be a short-lived token (60 minutes) and in a reaso (truncated...)
in C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php:113
Stack trace:
#0 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\guzzle\src\Middleware.php(69): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response), NULL, Array, NULL)
#1 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\promises\src\Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response))
#2 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\promises\src\Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL)
#3 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\promises\src\TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}()
#4 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\promises\src\Promise.php(248): GuzzleHttp\Promise\TaskQueue->run(true)
#5 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\promises\src\Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#6 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\promises\src\Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#7 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\promises\src\Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#8 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\promises\src\Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#9 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\guzzle\src\Client.php(123): GuzzleHttp\Promise\Promise->wait()
#10 C:\xampp\htdocs\pakistanPlants\admin\vendor\google\auth\src\HttpHandler\Guzzle6HttpHandler.php(47): GuzzleHttp\Client->send(Object(GuzzleHttp\Psr7\Request), Array)
#11 C:\xampp\htdocs\pakistanPlants\admin\vendor\google\auth\src\OAuth2.php(544): Google\Auth\HttpHandler\Guzzle6HttpHandler->__invoke(Object(GuzzleHttp\Psr7\Request))
#12 C:\xampp\htdocs\pakistanPlants\admin\vendor\google\auth\src\Credentials\ServiceAccountCredentials.php(205): Google\Auth\OAuth2->fetchAuthToken(Object(Google\Auth\HttpHandler\Guzzle7HttpHandler))
#13 C:\xampp\htdocs\pakistanPlants\admin\vendor\google\auth\src\FetchAuthTokenCache.php(79): Google\Auth\Credentials\ServiceAccountCredentials->fetchAuthToken(Object(Google\Auth\HttpHandler\Guzzle7HttpHandler))
#14 C:\xampp\htdocs\pakistanPlants\admin\vendor\google\auth\src\Middleware\AuthTokenMiddleware.php(122): Google\Auth\FetchAuthTokenCache->fetchAuthToken(Object(Google\Auth\HttpHandler\Guzzle7HttpHandler))
#15 C:\xampp\htdocs\pakistanPlants\admin\vendor\google\auth\src\Middleware\AuthTokenMiddleware.php(102): Google\Auth\Middleware\AuthTokenMiddleware->fetchToken()
#16 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\guzzle\src\PrepareBodyMiddleware.php(35): Google\Auth\Middleware\AuthTokenMiddleware->Google\Auth\Middleware{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#17 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\guzzle\src\Middleware.php(31): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#18 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\guzzle\src\RedirectMiddleware.php(71): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#19 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\guzzle\src\Middleware.php(63): GuzzleHttp\RedirectMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#20 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\guzzle\src\HandlerStack.php(75): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#21 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\guzzle\src\Client.php(331): GuzzleHttp\HandlerStack->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#22 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\guzzle\src\Client.php(107): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)
#23 C:\xampp\htdocs\pakistanPlants\admin\vendor\guzzlehttp\guzzle\src\Client.php(123): GuzzleHttp\Client->sendAsync(Object(GuzzleHttp\Psr7\Request), Array)
#24 C:\xampp\htdocs\pakistanPlants\admin\vendor\kreait\firebase-php\src\Firebase\Database\ApiClient.php(192): GuzzleHttp\Client->send(Object(GuzzleHttp\Psr7\Request), Array)
#25 C:\xampp\htdocs\pakistanPlants\admin\vendor\kreait\firebase-php\src\Firebase\Database\ApiClient.php(42): Kreait\Firebase\Database\ApiClient->requestApi('GET', Object(GuzzleHttp\Psr7\Uri))
#26 C:\xampp\htdocs\pakistanPlants\admin\vendor\kreait\firebase-php\src\Firebase\Database\Reference.php(295): Kreait\Firebase\Database\ApiClient->get(Object(GuzzleHttp\Psr7\Uri))
#27 C:\xampp\htdocs\pakistanPlants\admin\vendor\kreait\firebase-php\src\Firebase\Database\Reference.php(262): Kreait\Firebase\Database\Reference->getSnapshot()
#28 C:\xampp\htdocs\pakistanPlants\header.php(140): Kreait\Firebase\Database\Reference->getValue()
#29 C:\xampp\htdocs\pakistanPlants\index.php(2): include('C:\xampp\htdocs...')
#30 {main}
Next Kreait\Firebase\Exception\Database\DatabaseError: invalid_grant in C:\xampp\htdocs\pakistanPlants\admin\vendor\kreait\firebase-php\src\Firebase\Exception\DatabaseApiExceptionConverter.php:64
Stack trace:
#0 C:\xampp\htdocs\pakistanPlants\admin\vendor\kreait\firebase-php\src\Firebase\Exception\DatabaseApiExceptionConverter.php(33): Kreait\Firebase\Exception\DatabaseApiExceptionConverter->convertGuzzleRequestException(Object(GuzzleHttp\Exception\ClientException))
#1 C:\xampp\htdocs\pakistanPlants\admin\vendor\kreait\firebase-php\src\Firebase\Database\ApiClient.php(194): Kreait\Firebase\Exception\DatabaseApiExceptionConverter->convertException(Object(GuzzleHttp\Exception\ClientException))
#2 C:\xampp\htdocs\pakistanPlants\admin\vendor\kreait\firebase-php\src\Firebase\Database\ApiClient.php(42): Kreait\Firebase\Database\ApiClient->requestApi('GET', Object(GuzzleHttp\Psr7\Uri))
#3 C:\xampp\htdocs\pakistanPlants\admin\vendor\kreait\firebase-php\src\Firebase\Database\Reference.php(295): Kreait\Firebase\Database\ApiClient->get(Object(GuzzleHttp\Psr7\Uri))
#4 C:\xampp\htdocs\pakistanPlants\admin\vendor\kreait\firebase-php\src\Firebase\Database\Reference.php(262): Kreait\Firebase\Database\Reference->getSnapshot()
#5 C:\xampp\htdocs\pakistanPlants\header.php(140): Kreait\Firebase\Database\Reference->getValue()
#6 C:\xampp\htdocs\pakistanPlants\index.php(2): include('C:\xampp\htdocs...')
#7 {main}
thrown in <b>C:\xampp\htdocs\pakistanPlants\admin\vendor\kreait\firebase-php\src\Firebase\Exception\DatabaseApiExceptionConverter.php</b> on line <b>64</b><br />
Thanks in advance :)
I want to run my project as usual

Yii2 framework controller throwing error - Getting unknown property

I am looking into some legacy code. Php application is throwing an error when I want to edit a page element. Not even sure why it means. Documenttemplateelement has no repeat attribute.
Error:
Exception (Unknown Property) 'yii\base\UnknownPropertyException' with message 'Getting unknown property: common\models\Documenttemplateelement::repeat'
in C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\Component.php:154
Stack trace:
#0 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\db\BaseActiveRecord.php(298): yii\base\Component->__get('repeat')
#1 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\helpers\BaseHtml.php(2233): yii\db\BaseActiveRecord->__get('repeat')
#2 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\helpers\BaseHtml.php(1826): yii\helpers\BaseHtml::getAttributeValue(Object(common\models\Documenttemplateelement), 'repeat')
#3 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\helpers\BaseHtml.php(1664): yii\helpers\BaseHtml::activeListInput('dropDownList', Object(common\models\Documenttemplateelement), 'repeat', Array, Array)
#4 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\widgets\ActiveField.php(654): yii\helpers\BaseHtml::activeDropDownList(Object(common\models\Documenttemplateelement), 'repeat', Array, Array)
#5 C:\xampp\htdocs\ddtool\vendor\yii-ui\yii2-materialize\ActiveField.php(189): yii\widgets\ActiveField->dropDownList(Array, Array)
#6 C:\xampp\htdocs\ddtool\backend\views\documentmanager\element.php(50): yiiui\yii2materialize\ActiveField->dropDownList(Array)
#7 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\View.php(348): require('C:\\xampp\\htdocs...')
#8 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\View.php(257): yii\base\View->renderPhpFile('C:\\xampp\\htdocs...', Array)
#9 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\View.php(156): yii\base\View->renderFile('C:\\xampp\\htdocs...', Array, Object(backend\controllers\DocumentmanagerController))
#10 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\Controller.php(386): yii\base\View->render('element', Array, Object(backend\controllers\DocumentmanagerController))
#11 C:\xampp\htdocs\ddtool\backend\controllers\DocumentmanagerController.php(228): yii\base\Controller->render('element', Array)
#12 [internal function]: backend\controllers\DocumentmanagerController->actionElementUpdate('137')
#13 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array)
#14 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#15 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\Module.php(528): yii\base\Controller->runAction('element-update', Array)
#16 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\web\Application.php(103): yii\base\Module->runAction('documentmanager...', Array)
#17 C:\xampp\htdocs\ddtool\vendor\yiisoft\yii2\base\Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))
#18 C:\xampp\htdocs\ddtool\backend\web\index.php(22): yii\base\Application->run()
#19 {main}

Apache/php return full php error track description

I'm using docker php:7.0-apache (more info in https://hub.docker.com/_/php/) and add my old php code. I'm sending the REST to the web server and got a short description in the track error info.
How could I configure the apache/php to response the whole track info and not just to replace the info with three dots ('...') as below.
Example:
REST response '500 Internal Server Error':
body:
CException
SiteController cannot find the requested view "error". (/var/www/yii-1.1.17/framework/web/CController.php:878)
#0 /var/www/yii-1.1.17/framework/web/CController.php(782): CController->renderPartial('error', Array, true)
#1 /var/www/web_project/protected/controllers/SiteController.php(45): CController->render('error', Array)
#2 /var/www/yii-1.1.17/framework/web/actions/CInlineAction.php(49): SiteController->actionError()
#3 /var/www/yii-1.1.17/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#4 /var/www/yii-1.1.17/framework/web/CController.php(286): CController->runAction(Object(CInlineAction))
#5 /var/www/yii-1.1.17/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#6 /var/www/yii-1.1.17/framework/web/CWebApplication.php(282): CController->run('error')
#7 /var/www/yii-1.1.17/framework/base/CErrorHandler.php(368): CWebApplication->runController('site/error')
#8 /var/www/yii-1.1.17/framework/base/CErrorHandler.php(296): CErrorHandler->renderError()
#9 /var/www/yii-1.1.17/framework/base/CErrorHandler.php(133): CErrorHandler->handleError(Object(CErrorEvent))
#10 /var/www/yii-1.1.17/framework/base/CApplication.php(834): CErrorHandler->handle(Object(CErrorEvent))
#11 /var/www/web_project/protected/modules/ioconfig/models/DeviceInstancesTbl.php(47): CApplication->handleError(2, 'Declaration of ...', '/var/www/web_pr...', 47, Array)
#12 /var/www/web_project/protected/modules/systemview/components/UnitsFactory.php(9): require_once('/var/www/web_pr...')
#13 /var/www/web_project/protected/modules/systemview/models/Units.php(13): require_once('/var/www/web_pr...')
#14 /var/www/web_project/protected/modules/systemview/components/SystemviewHelper.php(6): require_once('/var/www/web_pr...')
#15 /var/www/web_project/protected/modules/user_management/controllers/ApiUsermanagementController.php(8): require_once('/var/www/web_pr...')
#16 /var/www/yii-1.1.17/framework/web/CWebApplication.php(354): require('/var/www/web_pr...')
#17 /var/www/yii-1.1.17/framework/web/CWebApplication.php(338): CWebApplication->createController('GetGeneralInfo/', Object(User_managementModule))
#18 /var/www/yii-1.1.17/framework/web/CWebApplication.php(276): CWebApplication->createController('ApiUsermanageme...')
#19 /var/www/yii-1.1.17/framework/web/CWebApplication.php(141): CWebApplication->runController('user_management...')
#20 /var/www/yii-1.1.17/framework/base/CApplication.php(185): CWebApplication->processRequest()
#21 /var/www/web_project/index.php(13): CApplication->run()
#22 {main}
Thanks

Magento 2 Error message when flushing cache

I'm running Magento 2.0.7. When I'm in the backend and I try to flush the cache using "Flush Megento Cache" or selecting all cache folders and click refresh I get a white pack with the below error:
There has been an error processing your request Exception printing is disabled by default for security reasons.
Error log record number: 707031421789
The website continues to function, and Magento recognises that cache is cleared as the notification disappears. But it's annoying and I don't know if its actually clearing all cache or not
The error report shows the below detail:
a:4:{i:0;s:166:"Warning: is_file() expects parameter 1 to be a valid path, string given in /var/www/vhosts/tbfdirect.co.uk/httpdocs/lib/internal/Cm/Cache/Backend/File.php on line 508";i:1;s:8000:"#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'is_file() expec...', '/var/www/vhosts...', 508, Array)
#1 /var/www/vhosts/tbfdirect.co.uk/httpdocs/lib/internal/Cm/Cache/Backend/File.php(508): is_file('/var/www/vhosts...')
#2 /var/www/vhosts/tbfdirect.co.uk/httpdocs/lib/internal/Cm/Cache/Backend/File.php(222): Cm_Cache_Backend_File->_cleanNew('matchingTag', Array)
#3 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/zendframework1/library/Zend/Cache/Core.php(465): Cm_Cache_Backend_File->clean('matchingTag', Array)
#4 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Cache/Core.php(98): Zend_Cache_Core->clean('matchingTag', Array)
#5 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Cache/Frontend/Adapter/Zend.php(79): Magento\Framework\Cache\Core->clean('matchingTag', Array)
#6 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(91): Magento\Framework\Cache\Frontend\Adapter\Zend->clean('matchingTag', Array)
#7 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Cache/Frontend/Decorator/TagScope.php(73): Magento\Framework\Cache\Frontend\Decorator\Bare->clean('matchingTag', Array)
#8 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(91): Magento\Framework\Cache\Frontend\Decorator\TagScope->clean('all', Array)
#9 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Cache/Frontend/Decorator/Logger.php(47): Magento\Framework\Cache\Frontend\Decorator\Bare->clean('all', Array, 'all')
#10 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/module-backend/Controller/Adminhtml/Cache/FlushSystem.php(20): Magento\Framework\Cache\Frontend\Decorator\Logger->clean()
#11 /var/www/vhosts/tbfdirect.co.uk/httpdocs/var/generation/Magento/Backend/Controller/Adminhtml/Cache/FlushSystem/Interceptor.php(25): Magento\Backend\Controller\Adminhtml\Cache\FlushSystem->execute()
#12 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/App/Action/Action.php(102): Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->execute()
#13 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#14 [internal function]: Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#15 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)
#16 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->___callParent('dispatch', Array)
#17 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor), Array, 'adminAuthentica...')
#18 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#19 [internal function]: Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#20 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#21 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor), Array, 'designLoader')
#22 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/App/Action/Plugin/Design.php(39): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#23 [internal function]: Magento\Framework\App\Action\Plugin\Design->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#24 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
#25 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Backend...', 'dispatch', Object(Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor), Array, 'adminMassaction...')
#26 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 [internal function]: Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#28 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)
#29 /var/www/vhosts/tbfdirect.co.uk/httpdocs/var/generation/Magento/Backend/Controller/Adminhtml/Cache/FlushSystem/Interceptor.php(40): Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->___callPlugins('dispatch', Array, Array)
#30 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/App/FrontController.php(55): Magento\Backend\Controller\Adminhtml\Cache\FlushSystem\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#31 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#32 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)
#33 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#34 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#35 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#36 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#37 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)
#38 /var/www/vhosts/tbfdirect.co.uk/httpdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#39 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#40 /var/www/vhosts/tbfdirect.co.uk/httpdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#41 /var/www/vhosts/tbfdirect.co.uk/httpdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#42 {main}";s:3:"url";s:107:"/admin_bb88q1/admin/cache/flushSystem/key/3ea674fce8bdcfd57376928bc89c1f15f7e9664b76cf642ea78f5d76fe4a90da/";s:11:"script_name";s:10:"/index.php";}
This refers to line 508 of file.php which has the below
I'm sure you've long since solved this but for posterity I have just fixed a very similar problem by deleting the contents of var/cache. Since you are trying to clear caches anyway this should have no side effects.

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.
Rename the .env.example to .env
Go to bootstrap=>app.php and uncomment $app->withEloquent();
Make sure that APP_DEBUG=true in .env file. Now it will work.

Categories