Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Panel Installer #951

Merged
merged 26 commits into from
Jul 10, 2024
Merged

Conversation

S0ly
Copy link
Member

@S0ly S0ly commented May 14, 2024

I invite contributions to address several issues with the installer for the ctrlpanel:

Issues to be Fixed:

  • Unconfigured Panel Handling: Currently, the ctrlpanel displays an error when initiated without an install.lock file. It could be enhanced by implementing a mechanism to detect the absence of install.lock and redirecting users to /install to initiate the installation process.

  • Deprecated PHP Function Error in trustedproxy.php: The consistent appearance of the error message "Deprecated: explode(): Passing null to parameter ($string) of type string is deprecated in /var/www/html/config/trustedproxy.php on line 29" necessitates immediate resolution to prevent deprecated function calls.

  • Docker MySQL and Unnecessary Checks: The Docker setup lacks MySQL, which may be unnecessary for some users as they store their databases outside the server. Additionally, HTTPS checks are redundant as modern web browsers already provide warnings.

  • Failed PHP Extension Check for Redis: Despite the potential necessity of Redis, the PHP extension check fails to verify its presence. This issue requires rectification to ensure proper functionality.

  • Inconsistent Behavior with php artisan migrate --seed --force: Occasional failures of this command, accompanied by deprecated errors and timezone-related notices, demand investigation to ensure seamless execution.

  • Post-Installation Issues with Redis Configuration: Following installation, the ctrlpanel encounters difficulties connecting to Redis, necessitating manual configuration in the .env file.

  • Unencrypted Tokens in Settings Table: The installer sets tokens directly in the settings table without encryption, causing errors when Laravel attempts to decrypt them. This requires modification to ensure tokens are encrypted properly during installation.

Contributors are encouraged to address these issues to enhance the reliability and usability of the ctrlpanel installer. Thank you for your contributions!

@S0ly S0ly added Bug / Fix Something isn't working and may need a fix High Priority Critical. Act quickly for resolution fix labels May 14, 2024
@S0ly S0ly self-assigned this May 14, 2024
@S0ly S0ly marked this pull request as draft May 14, 2024 13:17
@S0ly S0ly removed the Bug / Fix Something isn't working and may need a fix label May 14, 2024
@S0ly S0ly changed the title [Fix] panel installer Panel Installer Improvement May 14, 2024
@S0ly S0ly added Feature Adding a new feature, or substantial improvements on existing functionality Help Wanted May need your help to resolve it and removed fix labels May 14, 2024
@S0ly S0ly added the Bug / Fix Something isn't working and may need a fix label May 17, 2024
@S0ly S0ly linked an issue May 18, 2024 that may be closed by this pull request
@S0ly S0ly added this to the V0.10 milestone May 18, 2024
zvikasdongre and others added 2 commits May 20, 2024 18:10
Also fixes minor issues like spelling / sentence mistakes.
Refactored some variable names, and made it actually show error message on the page instead of only in logs.
Now email settings have select input for mail method and encryption.
Fix installer setting pterodactyl settings without encryption, causing 500 Error in settings page.
@S0ly S0ly changed the title Panel Installer Improvement fix: Panel Installer Jun 4, 2024
@jameskitt616
Copy link

I'd like to take a look and implement "Post-Installation Issues with Redis Configuration" I assume it will be an extra step after/before database configuration and preferably with a verification that the redis server connection was successful?

@S0ly
Copy link
Member Author

S0ly commented Jun 11, 2024

@jameskitt616 yep exactly

@S0ly
Copy link
Member Author

S0ly commented Jun 11, 2024

I think the best would be after the main database its just some env value to set and test

@S0ly S0ly mentioned this pull request Jun 13, 2024
4 tasks
@S0ly S0ly marked this pull request as ready for review June 13, 2024 22:10
@S0ly S0ly requested a review from IceToast June 13, 2024 22:11
@IceToast
Copy link
Collaborator

LGTM, couldnt test it for sure. Please fix conflicts too.

@kenshin133
Copy link
Sponsor

idk how to comment on specific fixes but checking this out I found a couple things:
Unconfigured Panel Handling: this seems completely fixed, tried a few ways and could not get un-favorable results.

during install I still got this ` at vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:79
75▕ protected function key(array $config)
76▕ {
77▕ return tap($config['key'], function ($key) {
78▕ if (empty($key)) {
➜ 79▕ throw new MissingAppKeyException;
80▕ }
81▕ });
82▕ }
83▕ }

i Your app key is missing:
https://laravel.com/docs/master/installation#configuration`
and had to click install a second time.

@IceToast
Copy link
Collaborator

@S0ly Should the installer handle the app key generation too?

@S0ly
Copy link
Member Author

S0ly commented Jun 27, 2024

@S0ly Should the installer handle the app key generation too?

I suppose that if he can he should no ? like if no app key is present maybe generate one ? since he do all the rest, but if you think it should not be handled by the installer we could have the script of weez doing it, since we now have an installation script

@jameskitt616
Copy link

Wasn't that fixed somewhere?
When i was re-factoring the web-installer i didn't ran into the issue anymore.

@S0ly
Copy link
Member Author

S0ly commented Jun 27, 2024

its why I called it " Inconsistent Behavior" sometimes it happend sometimes not

@IceToast
Copy link
Collaborator

Most likely file/directory permissions were missing for the user that runs php -> thus cannot create a app key?

@jameskitt616
Copy link

Not really, if it was a permission issue, it would need to fail everytime.

@jameskitt616
Copy link

I (think) i fixed this issue with my timezone fix with the new Installer

@jameskitt616
Copy link

I found out if there is a fresh install with no APP_KEY, the first time running the installer and generating the key fails for some reason, will look into it and fix it.

@jameskitt616
Copy link

@S0ly please check the new PR with fixes S0ly#6

@S0ly
Copy link
Member Author

S0ly commented Jul 9, 2024

@1day2die @IceToast this PR should be done it still need some testing to be sure everything work as excepted

@1day2die 1day2die merged commit f865163 into Ctrlpanel-gg:development Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug / Fix Something isn't working and may need a fix Feature Adding a new feature, or substantial improvements on existing functionality Help Wanted May need your help to resolve it High Priority Critical. Act quickly for resolution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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