laracasts / Behat-Laravel-Extension

Laravel extension for Behat functional testing.
MIT License
260 stars 73 forks source link

Session store not set on request. #15

Closed duxet closed 9 years ago

duxet commented 9 years ago
[2015-02-07 15:45:20] production.ERROR: exception 'RuntimeException' with message 'Session store not set on request.' in C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Http\Request.php:649
Stack trace:
#0 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Http\Request.php(442): Illuminate\Http\Request->session()
#1 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(210): Illuminate\Http\Request->old('email')
#2 C:\dev\git\lara\storage\framework\views\3a4206f31df478479bc3119bafe7f86f(18): Illuminate\Support\Facades\Facade::__callStatic('old', Array)
#3 C:\dev\git\lara\storage\framework\views\3a4206f31df478479bc3119bafe7f86f(18): Illuminate\Support\Facades\Input::old('email')
#4 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\View\Engines\PhpEngine.php(39): include('C:\\dev\\git\\lara...')
#5 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\View\Engines\CompilerEngine.php(57): Illuminate\View\Engines\PhpEngine->evaluatePath('C:\\dev\\git\\lara...', Array)
#6 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\View\View.php(136): Illuminate\View\Engines\CompilerEngine->get('C:\\dev\\git\\lara...', Array)
#7 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\View\View.php(104): Illuminate\View\View->getContents()
#8 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\View\View.php(78): Illuminate\View\View->renderContents()
#9 C:\dev\git\lara\storage\framework\views\e9cd4eef21e3baa395da517314b37a9b(121): Illuminate\View\View->render()
#10 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\View\Engines\PhpEngine.php(39): include('C:\\dev\\git\\lara...')
#11 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\View\Engines\CompilerEngine.php(57): Illuminate\View\Engines\PhpEngine->evaluatePath('C:\\dev\\git\\lara...', Array)
#12 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\View\View.php(136): Illuminate\View\Engines\CompilerEngine->get('C:\\dev\\git\\lara...', Array)
#13 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\View\View.php(104): Illuminate\View\View->getContents()
#14 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\View\View.php(78): Illuminate\View\View->renderContents()
#15 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Http\Response.php(44): Illuminate\View\View->render()
#16 C:\dev\git\lara\vendor\symfony\http-foundation\Symfony\Component\HttpFoundation\Response.php(202): Illuminate\Http\Response->setContent(Object(Illuminate\View\View))
#17 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Routing\Router.php(1185): Symfony\Component\HttpFoundation\Response->__construct(Object(Illuminate\View\View))
#18 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Routing\Router.php(663): Illuminate\Routing\Router->prepareResponse(Object(Illuminate\Http\Request), Object(Illuminate\View\View))
#19 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Routing\Router.php(618): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#20 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(157): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#21 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#22 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(141): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#23 C:\dev\git\lara\app\Http\Middleware\NotificationMarkRead.php(54): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#24 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(125): Strimoid\Http\Middleware\NotificationMarkRead->handle(Object(Illuminate\Http\Request), Object(Closure))
#25 C:\dev\git\lara\app\Http\Middleware\RateLimit.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#26 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(125): Strimoid\Http\Middleware\RateLimit->handle(Object(Illuminate\Http\Request), Object(Closure))
#27 C:\dev\git\lara\app\Http\Middleware\VerifyCsrfToken.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#28 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(125): Strimoid\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#29 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(55): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#30 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(125): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#31 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(61): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#32 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(125): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#33 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(36): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#34 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(125): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(40): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#36 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(125): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#37 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#38 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(125): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#39 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#40 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(101): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#41 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(108): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#42 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(83): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#43 C:\dev\git\lara\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(664): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#44 C:\dev\git\lara\vendor\symfony\http-kernel\Symfony\Component\HttpKernel\Client.php(81): Illuminate\Foundation\Application->handle(Object(Symfony\Component\HttpFoundation\Request))
#45 C:\dev\git\lara\vendor\symfony\browser-kit\Symfony\Component\BrowserKit\Client.php(327): Symfony\Component\HttpKernel\Client->doRequest(Object(Symfony\Component\HttpFoundation\Request))
#46 C:\dev\git\lara\vendor\behat\mink-browserkit-driver\src\BrowserKitDriver.php(147): Symfony\Component\BrowserKit\Client->request('GET', '/settings', Array, Array, Array)
#47 C:\dev\git\lara\vendor\behat\mink\src\Session.php(143): Behat\Mink\Driver\BrowserKitDriver->visit('/settings')
#48 C:\dev\git\lara\vendor\behat\mink-extension\src\Behat\MinkExtension\Context\RawMinkContext.php(131): Behat\Mink\Session->visit('/settings')
#49 C:\dev\git\lara\vendor\behat\mink-extension\src\Behat\MinkExtension\Context\MinkContext.php(43): Behat\MinkExtension\Context\RawMinkContext->visitPath('/settings')
#50 [internal function]: Behat\MinkExtension\Context\MinkContext->visit('/settings')
#51 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\Call\Handler\RuntimeCallHandler.php(99): call_user_func_array(Array, Array)
#52 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\Call\Handler\RuntimeCallHandler.php(54): Behat\Testwork\Call\Handler\RuntimeCallHandler->executeCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
#53 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\Call\CallCenter.php(125): Behat\Testwork\Call\Handler\RuntimeCallHandler->handleCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
#54 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\Call\CallCenter.php(80): Behat\Testwork\Call\CallCenter->handleCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
#55 C:\dev\git\lara\vendor\behat\behat\src\Behat\Behat\Tester\Runtime\RuntimeStepTester.php(125): Behat\Testwork\Call\CallCenter->makeCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
#56 C:\dev\git\lara\vendor\behat\behat\src\Behat\Behat\Tester\Runtime\RuntimeStepTester.php(73): Behat\Behat\Tester\Runtime\RuntimeStepTester->testDefinition(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), Object(Behat\Behat\Definition\SearchResult), false)
#57 C:\dev\git\lara\vendor\behat\behat\src\Behat\Behat\Hook\Tester\HookableStepTester.php(74): Behat\Behat\Tester\Runtime\RuntimeStepTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), false)
#58 C:\dev\git\lara\vendor\behat\behat\src\Behat\Behat\EventDispatcher\Tester\EventDispatchingStepTester.php(73): Behat\Behat\Hook\Tester\HookableStepTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), false)
#59 C:\dev\git\lara\vendor\behat\behat\src\Behat\Behat\Tester\StepContainerTester.php(59): Behat\Behat\EventDispatcher\Tester\EventDispatchingStepTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), false)
#60 C:\dev\git\lara\vendor\behat\behat\src\Behat\Behat\Tester\Runtime\RuntimeScenarioTester.php(76): Behat\Behat\Tester\StepContainerTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
#61 C:\dev\git\lara\vendor\behat\behat\src\Behat\Behat\Hook\Tester\HookableScenarioTester.php(74): Behat\Behat\Tester\Runtime\RuntimeScenarioTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
#62 C:\dev\git\lara\vendor\behat\behat\src\Behat\Behat\EventDispatcher\Tester\EventDispatchingScenarioTester.php(103): Behat\Behat\Hook\Tester\HookableScenarioTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
#63 C:\dev\git\lara\vendor\behat\behat\src\Behat\Behat\Tester\Runtime\RuntimeFeatureTester.php(83): Behat\Behat\EventDispatcher\Tester\EventDispatchingScenarioTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
#64 C:\dev\git\lara\vendor\behat\behat\src\Behat\Behat\Hook\Tester\HookableFeatureTester.php(72): Behat\Behat\Tester\Runtime\RuntimeFeatureTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), false)
#65 C:\dev\git\lara\vendor\behat\behat\src\Behat\Behat\EventDispatcher\Tester\EventDispatchingFeatureTester.php(71): Behat\Behat\Hook\Tester\HookableFeatureTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), false)
#66 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\Tester\Runtime\RuntimeSuiteTester.php(63): Behat\Behat\EventDispatcher\Tester\EventDispatchingFeatureTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), false)
#67 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\Hook\Tester\HookableSuiteTester.php(73): Behat\Testwork\Tester\Runtime\RuntimeSuiteTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Testwork\Specification\GroupedSpecificationIterator), false)
#68 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\EventDispatcher\Tester\EventDispatchingSuiteTester.php(72): Behat\Testwork\Hook\Tester\HookableSuiteTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Testwork\Specification\GroupedSpecificationIterator), false)
#69 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\Tester\Runtime\RuntimeExercise.php(71): Behat\Testwork\EventDispatcher\Tester\EventDispatchingSuiteTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Testwork\Specification\GroupedSpecificationIterator), false)
#70 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\EventDispatcher\Tester\EventDispatchingExercise.php(70): Behat\Testwork\Tester\Runtime\RuntimeExercise->test(Array, false)
#71 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\Tester\Cli\ExerciseController.php(146): Behat\Testwork\EventDispatcher\Tester\EventDispatchingExercise->test(Array, false)
#72 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\Tester\Cli\ExerciseController.php(108): Behat\Testwork\Tester\Cli\ExerciseController->testSpecifications(Object(Symfony\Component\Console\Input\ArgvInput), Array)
#73 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\Cli\Command.php(63): Behat\Testwork\Tester\Cli\ExerciseController->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#74 C:\dev\git\lara\vendor\symfony\console\Symfony\Component\Console\Command\Command.php(253): Behat\Testwork\Cli\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#75 C:\dev\git\lara\vendor\symfony\console\Symfony\Component\Console\Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#76 C:\dev\git\lara\vendor\symfony\console\Symfony\Component\Console\Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Behat\Testwork\Cli\Command), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#77 C:\dev\git\lara\vendor\behat\behat\src\Behat\Testwork\Cli\Application.php(102): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#78 C:\dev\git\lara\vendor\symfony\console\Symfony\Component\Console\Application.php(126): Behat\Testwork\Cli\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#79 C:\dev\git\lara\vendor\behat\behat\bin\behat(31): Symfony\Component\Console\Application->run()

I have no idea what is going on. Request seems to lose its session in some moment. I am using L5, maybe that's cause of that problem?

martinlindhe commented 9 years ago

@duxet: i am hitting the same issue. how did you resolve this?

duxet commented 9 years ago

I just removed Input::old() from my views. I opened issue, but @GrahamCampbell said it's a problem with this extension - even though it happens without this extension.

martinlindhe commented 9 years ago

@duxet: ah, i see. my issue is also because i use old() in views. did you find a workaround for that, or did you have to nuke that feature from your views?

duxet commented 9 years ago

@martinlindhe i am now not using old(), if you need to then open a new issue and mention this thread