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

Exception when running the installer script #41

Open
derMiepz opened this issue Mar 9, 2025 · 3 comments
Open

Exception when running the installer script #41

derMiepz opened this issue Mar 9, 2025 · 3 comments
Assignees
Labels
bug Something isn't working waiting for feedback Awaiting user response to confirm if the issue is resolved

Comments

@derMiepz
Copy link

derMiepz commented Mar 9, 2025

Describe the bug
Running the installer script on a fresh and updated/upgraded install of Ubuntu 24.04.2 LTS server, it throws an exception

To Reproduce
Steps to reproduce the behavior:

  1. Execute script via bash -c "$(wget -qO- https://pteroca.com/installer.sh)" while logged in as "root"
  2. Select option 3 (PHP 8.4)
  3. Enter a panel domain
  4. Press "Enter" when Adding component(s) 'universe' to all repositories. appears
  5. Let the script do its thing and wait for the following error to appear:
Run composer recipes at any time to see the status of your Symfony recipes.

> php -r "if (!file_exists('.env')) { copy('.env.SAMPLE', '.env'); }"
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!  {"message":"User Deprecated: Since doctrine/doctrine-bundle 2.12: The default value of \"doctrine.orm.controller_resolver.auto_mapping\" will be changed from `true` to `false`. Explicitly configure `true` to keep existing behaviour.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since doctrine/doctrine-bundle 2.12: The default value of \"doctrine.orm.controller_resolver.auto_mapping\" will be changed from `true` to `false`. Explicitly configure `true` to keep existing behaviour.","code":0,"file":"/var/www/pteroca/vendor/doctrine/doctrine-bundle/src/DependencyInjection/DoctrineExtension.php:536"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2025-03-08T23:43:40.334032+00:00","extra":{}}
!!  {"message":"User Deprecated: Since doctrine/doctrine-bundle 2.13: Enabling the controller resolver automapping feature has been deprecated. Symfony Mapped Route Parameters should be used as replacement.","context":{"exception":{"class":"ErrorException","message":"User Deprecated: Since doctrine/doctrine-bundle 2.13: Enabling the controller resolver automapping feature has been deprecated. Symfony Mapped Route Parameters should be used as replacement.","code":0,"file":"/var/www/pteroca/vendor/doctrine/doctrine-bundle/src/DependencyInjection/DoctrineExtension.php:541"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2025-03-08T23:43:40.334162+00:00","extra":{}}
!!  {"message":"Deprecated: App\\Core\\Service\\System\\EnvironmentConfigurationService::__construct(): Implicitly marking parameter $envFilePath as nullable is deprecated, the explicit nullable type must be used instead","context":{"exception":{"class":"ErrorException","message":"Deprecated: App\\Core\\Service\\System\\EnvironmentConfigurationService::__construct(): Implicitly marking parameter $envFilePath as nullable is deprecated, the explicit nullable type must be used instead","code":0,"file":"/var/www/pteroca/src/Core/Service/System/EnvironmentConfigurationService.php:9"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2025-03-08T23:43:40.334182+00:00","extra":{}}
!!  
!!   // Clearing the cache for the prod environment with debug false                
!!  
!!  
!!  In ExceptionConverter.php line 80:
!!                                                                                 
!!    An exception occurred while executing a query: SQLSTATE[3D000]: Invalid cat  
!!    alog name: 1046 No database selected                                         
!!                                                                                 
!!  
!!  In Exception.php line 24:
!!                                                                      
!!    SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected  
!!                                                                      
!!  
!!  In Statement.php line 55:
!!                                                                      
!!    SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected  
!!                                                                      
!!  
!!  cache:clear [--no-warmup] [--no-optional-warmers]
!!  
!!  
Script @auto-scripts was called via post-install-cmd
root@PteroCA:~# 

Expected behavior
The script shouldn't throw exceptions and continue to run as expected

Screenshots

Image

Additional context
First time user of your software. Already tried Googling with various ways to fix this problem. Haven't attempted any of them to so things won't get even more messed up.

@pteroca-com pteroca-com added the bug Something isn't working label Mar 9, 2025
@pteroca-com pteroca-com self-assigned this Mar 9, 2025
@pteroca-com
Copy link
Owner

Hello @derMiepz,

Thank you for bringing this issue to our attention.

We identified that the exception you encountered during the installation on Ubuntu 24.04 (Noble) was caused by the installer script attempting to clear the cache before running the necessary database migrations. This led to errors, especially when using PHP 8.4.

To resolve this, I have updated the installer script to version 1.0.1. This update ensures that database migrations are executed before any cache clearing operations. I have tested this new version on both Ubuntu 24.04 and 22.04, and the installation process now completes successfully without any issues.

We appreciate your feedback - it helps us improve the installation experience for all users. Feel free to try the updated installer script, and let us know if you run into any further issues.

Best regards!

@pteroca-com pteroca-com added work in progress This issue or pull request is actively being worked on waiting for feedback Awaiting user response to confirm if the issue is resolved and removed work in progress This issue or pull request is actively being worked on labels Mar 9, 2025
@derMiepz
Copy link
Author

derMiepz commented Mar 10, 2025

Heya! I'm pleased to say that this part of the installation now worked flawlessly, but I'm afraid that there's another problem.
When going through the installation, at the part where you can set up a new user, I'm getting a 401 unauthenticated.

Then same thing happens when trying it via the panel/register page.
Error during creating Pterodactyl account: {"errors":[{"code":"AuthenticationException","status":"401","detail":"Unauthenticated."}]} ()

I can reproduce this issue reliably via php bin/console app:create-new-user admin@example.com securePassword ROLE_ADMIN

Sorry for the very professional "screenshot". My MacBook doesn't wanna do what I want it to do...

Image

@pteroca-com
Copy link
Owner

Hello @derMiepz,

Thank you for following up on this! Glad to hear the installation itself went smoothly.

The 401 Unauthenticated error during user creation suggests that the request to Pterodactyl’s API is failing due to missing or incorrect authentication credentials. This can happen if the API key is not properly set up or is invalid.

Please check the following:

  1. Ensure that you provided the correct credentials (host and Pterodactyl API Key) during the PteroCA setup.
    Your host URL seems to be correct, but the API key is most likely incorrect.
    Please follow this guide to properly create a Pterodactyl Server API Key:
    🔗 How to create a Pterodactyl API Key

  2. To reconfigure the host and API key, run the following command: php bin/console app:configure-system
    Follow the instructions and navigate to Step 3: Pterodactyl Panel Integration.
    Provide the correct details:

  • Pterodactyl Panel URL: The URL where your Pterodactyl panel is hosted.
  • Pterodactyl API Key: The API key that allows your application to communicate with the Pterodactyl panel. Paste the API key you created in the previous step here.

Full guide: 🔗 Configuration with command

Let me know if the issue persists after updating these credentials :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for feedback Awaiting user response to confirm if the issue is resolved
Projects
None yet
Development

No branches or pull requests

2 participants