Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

When access the new laravel application after installed the package, it throw Uncaught Error: Call to undefined method App\Http\Kernel::setApplication() #20

Closed
yaojinhui1993 opened this issue May 4, 2018 · 5 comments

Comments

@yaojinhui1993
Copy link

Those are the error message stack.

❯ php artisan swoole:http start
Starting swoole http server...
Swoole http server started: <http://127.0.0.1:1215>
PHP Fatal error:  Uncaught Error: Call to undefined method App\Http\Kernel::setApplication() in /Users/yjh/Code/laravel56/vendor/swooletw/laravel-swoole/src/Server/Application.php:437
Stack trace:
#0 /Users/yjh/Code/laravel56/vendor/swooletw/laravel-swoole/src/Server/Sandbox.php(67): SwooleTW\Http\Server\Application->__clone()
#1 /Users/yjh/Code/laravel56/vendor/swooletw/laravel-swoole/src/Server/Manager.php(252): SwooleTW\Http\Server\Sandbox->getApplication()
#2 {main}
  thrown in /Users/yjh/Code/laravel56/vendor/swooletw/laravel-swoole/src/Server/Application.php on line 437
PHP Stack trace:
PHP   1. {main}() /Users/yjh/Code/laravel56/artisan:0
PHP   2. App\Console\Kernel->handle() /Users/yjh/Code/laravel56/artisan:37
PHP   3. Illuminate\Console\Application->run() /Users/yjh/Code/laravel56/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:122
PHP   4. Illuminate\Console\Application->run() /Users/yjh/Code/laravel56/vendor/laravel/framework/src/Illuminate/Console/Application.php:89
PHP   5. Illuminate\Console\Application->doRun() /Users/yjh/Code/laravel56/vendor/symfony/console/Application.php:143
PHP   6. Illuminate\Console\Application->doRunCommand() /Users/yjh/Code/laravel56/vendor/symfony/console/Application.php:241
PHP   7. SwooleTW\Http\Commands\HttpServerCommand->run() /Users/yjh/Code/laravel56/vendor/symfony/console/Application.php:865
PHP   8. SwooleTW\Http\Commands\HttpServerCommand->run() /Users/yjh/Code/laravel56/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
PHP   9. SwooleTW\Http\Commands\HttpServerCommand->execute() /Users/yjh/Code/laravel56/vendor/symfony/console/Command/Command.php:252
PHP  10. Illuminate\Foundation\Application->call() /Users/yjh/Code/laravel56/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
PHP  11. Illuminate\Container\BoundMethod::call() /Users/yjh/Code/laravel56/vendor/laravel/framework/src/Illuminate/Container/Container.php:564
PHP  12. Illuminate\Container\BoundMethod::callBoundMethod() /Users/yjh/Code/laravel56/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
PHP  13. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() /Users/yjh/Code/laravel56/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
PHP  14. call_user_func_array:{/Users/yjh/Code/laravel56/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29}() /Users/yjh/Code/laravel56/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
PHP  15. SwooleTW\Http\Commands\HttpServerCommand->handle() /Users/yjh/Code/laravel56/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
PHP  16. SwooleTW\Http\Commands\HttpServerCommand->runAction() /Users/yjh/Code/laravel56/vendor/swooletw/laravel-swoole/src/Commands/HttpServerCommand.php:55
PHP  17. SwooleTW\Http\Commands\HttpServerCommand->start() /Users/yjh/Code/laravel56/vendor/swooletw/laravel-swoole/src/Commands/HttpServerCommand.php:71
PHP  18. SwooleTW\Http\Server\Manager->run() /Users/yjh/Code/laravel56/vendor/swooletw/laravel-swoole/src/Commands/HttpServerCommand.php:94
PHP  19. Swoole\Http\Server->start() /Users/yjh/Code/laravel56/vendor/swooletw/laravel-swoole/src/Server/Manager.php:99
@reina3596
Copy link

I get same error

Uncaught Error: Call to undefined method App\Http\Kernel::setApplication() in /home/ubuntu/laravel/vendor/swooletw/laravel-swoole/src/Server/Application.php:439
Stack trace:
#0 /home/ubuntu/laravel/vendor/swooletw/laravel-swoole/src/Server/Sandbox.php(67): SwooleTW\Http\Server\Application->__clone()
#1 /home/ubuntu/laravel/vendor/swooletw/laravel-swoole/src/Server/Manager.php(252): SwooleTW\Http\Server\Sandbox->getApplication()
#2 {main}
thrown

@romach3
Copy link

romach3 commented May 4, 2018

If I delete this line - app working 0_o

And, this method (setApplication) not exists in Laravel HttpKernel. What is it?

@albertcht
Copy link
Member

albertcht commented May 4, 2018

Hi @yaojinhui1993 @romach3 ,

thanks for your bug report, I'm working on fixing it. Will release a hot fix patch soon.

@albertcht
Copy link
Member

The newest released version https://github.com/swooletw/laravel-swoole/releases/tag/v2.3.1 has fixed this bug. It should work now.

@yaojinhui1993
Copy link
Author

👌

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

No branches or pull requests

4 participants