et-nik / gameap

Game Admin Panel (GameAP) is the opensource game servers control panel.
https://gameap.com
102 stars 23 forks source link

ReflectionException Class Gameap\Repositories\GameRepository does not exist #33

Closed SugarD-x closed 4 years ago

SugarD-x commented 4 years ago

After adding the bug fix for issue #31, I received the following error when navigating to the game list:

ReflectionException thrown with message "Class Gameap\Repositories\GameRepository does not exist"

Stacktrace:
#41 ReflectionException in \vendor\laravel\framework\src\Illuminate\Container\Container.php:853
#40 ParseError in \app\Repositories\GameRepository.php:68
#39 Composer\Autoload\includeFile in \vendor\composer\ClassLoader.php:322
#38 Composer\Autoload\ClassLoader:loadClass in [internal]:0
#37 spl_autoload_call in [internal]:0
#36 ReflectionParameter:getClass in \vendor\laravel\framework\src\Illuminate\Container\Container.php:853
#35 Illuminate\Container\Container:resolveDependencies in \vendor\laravel\framework\src\Illuminate\Container\Container.php:816
#34 Illuminate\Container\Container:build in \vendor\laravel\framework\src\Illuminate\Container\Container.php:667
#33 Illuminate\Container\Container:resolve in \vendor\laravel\framework\src\Illuminate\Container\Container.php:615
#32 Illuminate\Container\Container:make in \vendor\laravel\framework\src\Illuminate\Foundation\Application.php:767
#31 Illuminate\Foundation\Application:make in \vendor\laravel\framework\src\Illuminate\Routing\Route.php:233
#30 Illuminate\Routing\Route:getController in \vendor\laravel\framework\src\Illuminate\Routing\Route.php:833
#29 Illuminate\Routing\Route:controllerMiddleware in \vendor\laravel\framework\src\Illuminate\Routing\Route.php:794
#28 Illuminate\Routing\Route:gatherMiddleware in \vendor\laravel\framework\src\Illuminate\Routing\Router.php:693
#27 Illuminate\Routing\Router:gatherRouteMiddleware in \vendor\laravel\framework\src\Illuminate\Routing\Router.php:673
#26 Illuminate\Routing\Router:runRouteWithinStack in \vendor\laravel\framework\src\Illuminate\Routing\Router.php:657
#25 Illuminate\Routing\Router:runRoute in \vendor\laravel\framework\src\Illuminate\Routing\Router.php:623
#24 Illuminate\Routing\Router:dispatchToRoute in \vendor\laravel\framework\src\Illuminate\Routing\Router.php:612
#23 Illuminate\Routing\Router:dispatch in \vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php:176
#22 Illuminate\Foundation\Http\Kernel:Illuminate\Foundation\Http\{closure} in \vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:30
#21 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in \vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php:65
#20 Barryvdh\Debugbar\Middleware\InjectDebugbar:handle in \vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:163
#19 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in \vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:53
#18 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in \vendor\fideloper\proxy\src\TrustProxies.php:57
#17 Fideloper\Proxy\TrustProxies:handle in \vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:163
#16 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in \vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:53
#15 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in \vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php:21
#14 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in \vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:163
#13 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in \vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:53
#12 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in \vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php:21
#11 Illuminate\Foundation\Http\Middleware\TransformsRequest:handle in \vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:163
#10 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in \vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:53
#9 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in \vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ValidatePostSize.php:27
#8 Illuminate\Foundation\Http\Middleware\ValidatePostSize:handle in \vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:163
#7 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in \vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:53
#6 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in \vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php:62
#5 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode:handle in \vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:163
#4 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline\{closure} in \vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:53
#3 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in \vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:104
#2 Illuminate\Pipeline\Pipeline:then in \vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php:151
#1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in \vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php:116
#0 Illuminate\Foundation\Http\Kernel:handle in \public\index.php:55
et-nik commented 4 years ago

Hm. Strange problem. Try to discover package:

php /path/to/gameap/artisan package:discover

Or try to execute composer update:

SugarD-x commented 4 years ago

Here are the results of the first command: packagediscover

As for the other commands, Composer was already installed. It updated one package, (phpseclib from version 2.0.24 to 2.0.25), but nothing else was found.

It may be worth noting too that two abandoned packages were reported. (moontoast/math and zendframework/zend-diactoros, of which it recommended brick/math and laminas/laminas-diactoros replace them).

SugarD-x commented 4 years ago

Edit: Apparently it is the Games List page itself triggering the error this time, and not the updater for the list. Simply navigating to the Games List page is causing the error to appear.

SugarD-x commented 4 years ago

Edit 2: It was my fault. I had an extra } after the fix for #31.

et-nik commented 4 years ago

You can upgrade panel without manually editing files.

Execute:

curl -sLO http://packages.gameap.ru/installer.sh && bash installer.sh --upgrade

Or, using GitHub:

curl -sLO http://packages.gameap.ru/installer.sh && bash installer.sh --github --upgrade
SugarD-x commented 4 years ago

Is there a Windows equivalent of these commands that you are aware of?

et-nik commented 4 years ago

Sorry, no ready-made scripts. But you can execute few commands.

You should download composer.phar (once) to your gameap directory from here https://getcomposer.org/download/

Required packages: git, composer, php-cli

cd C:\path\to\gameap
git pull
php composer.phar update
php artisan migrate
SugarD-x commented 4 years ago

Appreciate the information!

Unfortunately I can't get past the git pull line. It isn't recognizing the repository files as being a git repository. I tested a fresh download on my local system with these commands and they work, so maybe the installation of the panel caused the files to not be recognized? I'm not exactly sure what is going on there.

et-nik commented 4 years ago

@SugarD-x Try once:

cd C:\path\to\gameap
git init
git remote add origin https://github.com/et-nik/gameap
git pull
git checkout -f develop

After that commands should be works fine.

SugarD-x commented 4 years ago

That worked beautifully! Thank you!