panel icon indicating copy to clipboard operation
panel copied to clipboard

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

Open kenshin133 opened this issue 1 year ago • 1 comments

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 command php 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 avatar May 18 '24 00:05 kenshin133

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

kenshin133 avatar May 18 '24 00:05 kenshin133

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

kenshin133 avatar May 22 '24 00:05 kenshin133

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

1day2die avatar May 22 '24 07:05 1day2die

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

S0ly avatar May 22 '24 23:05 S0ly

hi, it has

kenshin133 avatar May 23 '24 00:05 kenshin133

Resolved by PR #951

S0ly avatar May 23 '24 04:05 S0ly