Ctrlpanel-gg / panel

CtrlPanel offers an easy-to-use and free billing solution for all starting and experienced hosting providers that seamlessly integrates with the Pterodactyl panel.
https://ctrlpanel.gg/
MIT License
389 stars 141 forks source link

[Bug]: 500 on reference of Ptera after install 0.10 #953

Closed kenshin133 closed 1 month ago

kenshin133 commented 1 month ago

What is your request about?

Ive included install directions in the additional info section.

The main issue here is it seem on fresh installs of the dev branch any page which references pterodactyl results in a 500 error.

Pages like : producs, Users, Servers work fine. but pages like : Overview, and Settings result in a 500 and the specific error is LONG but starts with either production.ERROR: Typed property App\Classes\PterodactylClient::$application must not be accessed before initialization {"userId":1,"exception":"[object] (Error(code: 0): Typed property App\\Classes\\PterodactylClient::$application must not be accessed before initialization at /var/www/controlpanel/app/Classes/PterodactylClient.php:115) or production.DEBUG: Failed to construct Pterodactyl client, Settings table not available? {"exception":"[object] (Illuminate\\Contracts\\Encryption\\DecryptException(code: 0): The payload is invalid. at /var/www/controlpanel/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:214)

ill include my entire install log, and a log containing only loading one of these pages.

Branch

development

Solution idea

To test, I tried to get some of the variables around what was failing to output and all of them seemed empty, cant be 100% sure but They seemed so. installer.log laravel.log

Ctrlpanel Logs

No response

Additional Info

I've verified I have all requirements by following the install doc to get a clean install from main branch. after testing i've ran to get a clean dev install:

`mysql -e "drop database controlpanel" mysql -e "create database controlpanel" mysql -e "GRANT ALL PRIVILEGES ON controlpanel.* TO 'controlpaneluser'@'%'" mysql -e "FLUSH PRIVILEGES"

envDir="/var/www/controlpanel" rm -rf $envDir mkdir -p $envDir cd $envDir

git clone https://github.com/Ctrlpanel-gg/panel.git ./ -b development

composer install --optimize-autoloader chmod -R 777 $envDir chown -R www-data:www-data $envDir`

After this I go to mydomain/install enter database details, click next, it fails with There was an error after running commandphp artisan migrate --seed --force Please check the installer.log file in /var/www/controlpanel/storage/logs !

I click again and it continues.

I skip email setup, enter keys/api details normally.

kenshin133 commented 1 month ago

The specific errors mentioned there might be a red herring, they show up loading any page..

kenshin133 commented 1 month ago

This is resolved at present. thanks to (im guessing) b747b7d

1day2die commented 1 month ago

yuo. this happens when the settings arent initialized yet or if something went wrong on the settings. sometimes it can be caused by a faulty reinstall where the old appkey is still cached. had the same issue a few days ago, but thats just cause of my dev env

S0ly commented 1 month ago

hi ! have this been resolved by PR #951 ? thanks

kenshin133 commented 1 month ago

hi, it has

S0ly commented 1 month ago

Resolved by PR #951