FreePBX / issue-tracker

The unified FreePBX issue tracker.
https://www.freepbx.org
GNU General Public License v3.0
8 stars 1 forks source link

[bug]: Installation error on version 17 due to TranslatorInterface::getLocale() API #2

Open Minhazul-Islam18 opened 8 months ago

Minhazul-Islam18 commented 8 months ago

FreePBX Version

FreePBX 17

Severity

Critical

Issue Description

Hello, my Asterisk is successfully installed and running fine. But when i'm going to install FreePBX, then every time i'm getting error. previously showing outn() not defined in installcommand.class.php file. now deleting the file and trying to install again and getting new error pasted in "Relevant log output" secton.

Operating Environment

Asterisk 20 FreePBX 17 PHP version 8.2.14 Ubuntu 20.4

Relevant log output

Database engine [mysql]: 
Database name [asterisk]: 
Database server address [localhost]: http://localhost/phpMyAdmin
Database server port [3306]: 
CDR Database name [asteriskcdrdb]: 
Database username [root]: asterisk
Database password: asterisk
File owner user [asterisk]: 
File owner group [asterisk]: 
Filesystem location from which FreePBX files will be served [/var/www/html]: 
Filesystem location from which Asterisk configuration files will be served [/etc/asterisk]: 
Filesystem location for Asterisk modules [/usr/lib64/asterisk/modules]: 
Filesystem location for Asterisk lib files [/var/lib/asterisk]: 
Filesystem location for Asterisk agi files [/var/lib/asterisk/agi-bin]: 
Location of the Asterisk spool directory [/var/spool/asterisk]: 
Location of the Asterisk run directory [/var/run/asterisk]: 
Location of the Asterisk log files [/var/log/asterisk]: 
Location of the FreePBX command line scripts [/var/lib/asterisk/bin]: 
Location of the FreePBX (root) command line scripts [/usr/sbin]: 
Location of the Apache cgi-bin executables [/var/www/cgi-bin]: 
Directory for FreePBX html5 playback files [/var/lib/asterisk/playback]: 
Checking if SELinux is enabled...Its not (good)!
Reading /etc/asterisk/asterisk.conf...Done
Checking if Asterisk is running and we can talk to it as the 'asterisk' user...Yes. Determined Asterisk version to be: 20.5.2
Checking if NodeJS is installed and we can get a version from it...Yes. Determined NodeJS version to be: 10.19.0
Preliminary checks done. Starting FreePBX Installation
Checking if this is a new install...No (/etc/freepbx.conf file detected)
Updating tables admin, ampusers, cronmanager, featurecodes, freepbx_log, freepbx_settings, globals, module_xml, modules, notifications, cron_jobs...Done
Initializing FreePBX Settings
Finished initalizing settings
Copying files (this may take a bit)....
 9331/9331 [============================] 100%
Done
bin is: /var/lib/asterisk/bin
sbin is: /usr/sbin
Finishing up directory processes...Done!
Running variable replacement...Done
Creating missing #include files...Done
Setting up Asterisk Manager Connection...Done
Running through upgrades...
Checking for upgrades..
No further upgrades necessary
Finished upgrades
Setting FreePBX version to 17.0.14.31...Done
Writing out /etc/amportal.conf...Done
Chowning directories...
PHP Fatal error:  Declaration of Symfony\Component\Translation\TranslatorInterface::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in /var/www/html/admin/libraries/Composer/vendor/symfony/translation/TranslatorInterface.php on line 69
Whoops\Exception\ErrorException: Declaration of Symfony\Component\Translation\TranslatorInterface::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in file /var/www/html/admin/libraries/Composer/vendor/symfony/translation/TranslatorInterface.php on line 69
Stack trace:
  1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/Composer/vendor/symfony/translation/TranslatorInterface.php:69
  2. Whoops\Run->handleError() /var/www/html/admin/libraries/Composer/vendor/filp/whoops/src/Whoops/Run.php:510
  3. Whoops\Run->handleShutdown() [internal]:0
Done
Installing framework...
PHP Fatal error:  Declaration of Symfony\Component\Translation\TranslatorInterface::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in /var/www/html/admin/libraries/Composer/vendor/symfony/translation/TranslatorInterface.php on line 69
Whoops\Exception\ErrorException: Declaration of Symfony\Component\Translation\TranslatorInterface::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in file /var/www/html/admin/libraries/Composer/vendor/symfony/translation/TranslatorInterface.php on line 69
Stack trace:
  1. Whoops\Exception\ErrorException->() /var/www/html/admin/libraries/Composer/vendor/symfony/translation/TranslatorInterface.php:69
  2. Whoops\Run->handleError() /var/www/html/admin/libraries/Composer/vendor/filp/whoops/src/Whoops/Run.php:510
  3. Whoops\Run->handleShutdown() [internal]:0

In Process.php line 272:

  The command "'/usr/sbin/fwconsole' 'ma' 'install' 'framework'" failed.  

  Exit Code: 255(Unknown error)                                           

  Working directory: /usr/local/src/freepbx                               

  Output:                                                                 
  ================                                                        

  Error Output:                                                           
  ================                                                        

install [--dbengine DBENGINE] [--dbname DBNAME] [--dbhost DBHOST] [--dbport DBPORT] [--cdrdbname CDRDBNAME] [--dbuser DBUSER] [--dbpass DBPASS] [--user USER] [--group GROUP] [--dev-links] [--skip-install] [--webroot WEBROOT] [--astetcdir ASTETCDIR] [--astmoddir ASTMODDIR] [--astvarlibdir ASTVARLIBDIR] [--astagidir ASTAGIDIR] [--astspooldir ASTSPOOLDIR] [--astrundir ASTRUNDIR] [--astlogdir ASTLOGDIR] [--ampbin AMPBIN] [--ampsbin AMPSBIN] [--ampcgibin AMPCGIBIN] [--ampplayback AMPPLAYBACK] [-r|--rootdb] [-f|--force]
kguptasangoma commented 7 months ago

Hi @Minhazul-Islam18 We are testing Freepbx 17 on Debian 12.x OS so request you to please try on Debian 12.x OS? I know ubuntu is debian based but not sure if there is any underlaying some php packages dependency issue.

miken32 commented 7 months ago

@kguptasangoma this is nothing to do with the OS, it's a Composer error. The problem is you guys have conflicting versions of packages. Try running this on your Debian 12.x OS:

find /var/www/html/ -name 'LocaleAwareInterface.php'

See also my forum post before this bug tracker was live, where we were told to post bugs: https://community.freepbx.org/t/bugs-in-17/94010/14