YunoHost-Apps / osticket_ynh

Support Ticketing System package for YunoHost
https://osticket.com/
GNU General Public License v2.0
2 stars 7 forks source link

ERROR - Could not install osticket: An error occurred inside the app installation script #7

Closed icf20 closed 3 years ago

icf20 commented 4 years ago

PHP Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/var/www/osticket/include/plugins/build/lib/jasig/phpcas/source): failed to open dir: No such file or directory in /var/www/osticket/include/plugins/build/make.php:481

tituspijean commented 4 years ago

Here is a more complete log from another user with the same issue: https://paste.yunohost.org/raw/vidifadigi

tituspijean commented 4 years ago

Issue can be circumvented by adding the following code before the pushd command:

https://github.com/YunoHost-Apps/osticket_ynh/blob/cadb10e497d938e0e684e43ac870a3807b4b60d9/scripts/install#L137-L142

mkdir -p "$final_path/include/plugins/build/.config/composer"
export COMPOSER_HOME="$final_path/include/plugins/build/.config/composer"
icf20 commented 4 years ago

should i wait for a pr and official commit?

tituspijean commented 4 years ago

@yalh76, what do you think ? I could make a PR, but I do not think this solution is the best, as it leaves a global variable COMPOSER_HOME that may affect other apps.

Plemus commented 4 years ago

L’opération 'Installer l’application 'osticket'' a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en cliquant ici

Impossible d’installer osticket : Une erreur est survenue dans le script d’installation de l’application

thrown in /var/www/osticket/include/plugins/build/make.php on line 481

4 {main}

3 /var/www/osticket/include/plugins/build/make.php(704): Module->_run('make.php')

2 /var/www/osticket/include/plugins/build/make.php(240): PluginBuilder->run(Array, Array)

1 /var/www/osticket/include/plugins/build/make.php(340): PluginBuilder->_hydrate(Array)

0 /var/www/osticket/include/plugins/build/make.php(481): RecursiveDirectoryIterator->__construct('/var/www/ostick...', 4096)

Stack trace:

Building plugins...

PHP Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/var/www/osticket/include/plugins/build/lib/jasig/phpcas/source): failed to open dir: No such file or directory in /var/www/osticket/include/plugins/build/make.php:481 https://paste.yunohost.org/raw/erovexorog Unable to fix this error because I don't know where Ynohost put the specified file. And my knowledge of linux is weak. Je n'arrive pas a installer OsTicket sur mon Yunohost dans la mesure ou je suis un peu nono en Linux, et je ne sais donc pas dans quel repertoire trouver le fichier install a modifier.

tituspijean commented 4 years ago

Je n'arrive pas a installer OsTicket sur mon Yunohost dans la mesure ou je suis un peu nono en Linux, et je ne sais donc pas dans quel repertoire trouver le fichier install a modifier.

Dans ce cas je t'invite à attendre que la PR mentionnée juste avant ton commentaire soit traitée pour corriger ce bug. Et merci d'utiliser les balises de code quand tu copies-colles des erreurs, là tu viens de référencer des issues qui n'ont rien à voir.

Plemus commented 4 years ago

Je n'arrive pas a installer OsTicket sur mon Yunohost dans la mesure ou je suis un peu nono en Linux, et je ne sais donc pas dans quel repertoire trouver le fichier install a modifier.

Dans ce cas je t'invite à attendre que la PR mentionnée juste avant ton commentaire soit traitée pour corriger ce bug. Et merci d'utiliser les balises de code quand tu copies-colles des erreurs, là tu viens de référencer des issues qui n'ont rien à voir.

Merci infiniment pour la promptitude. Désolé pour le rififi. J'ai même essayé de le supprimer sans succès. je serai plus prudent desormais.

yalh76 commented 4 years ago

@yalh76, what do you think ? I could make a PR, but I do not think this solution is the best, as it leaves a global variable COMPOSER_HOME that may affect other apps.

And if we don't do export COMPOSER_HOME="... but only COMPOSER_HOME=" it won't leave a global variable ?

tituspijean commented 4 years ago

Uh, seems to be working :) Let me CI-test it, and I will push the commit.

Edit: done !

scharc commented 3 years ago

Got the same error with the testing branch:

sudo` yunohost log display 20210104-192208-app_install-osticket
description: Install the 'osticket' app
log_path: /var/log/yunohost/categories/operation/20210104-192208-app_install-osticket.log
logs: 
  - 2021-01-04 19:22:57,942: DEBUG - + local legacy_args=m
  - 2021-01-04 19:22:57,943: DEBUG - + args_array=([m]=message=)
  - 2021-01-04 19:22:57,943: DEBUG - + local -A args_array
  - 2021-01-04 19:22:57,943: DEBUG - + local message
  - 2021-01-04 19:22:57,943: DEBUG - + ynh_handle_getopts_args '--message=Building plugins...'
  - 2021-01-04 19:22:57,944: DEBUG - + set +o xtrace
  - 2021-01-04 19:22:58,044: DEBUG - + echo 'Building plugins...'
  - 2021-01-04 19:22:58,045: INFO - Building plugins...
  - 2021-01-04 19:22:58,045: DEBUG - + mkdir -p /var/www/osticket/include/plugins/build/.config/composer
  - 2021-01-04 19:22:58,045: DEBUG - + COMPOSER_HOME=/var/www/osticket/include/plugins/build/.config/composer
  - 2021-01-04 19:22:58,045: DEBUG - + pushd /var/www/osticket/include/plugins/build
  - 2021-01-04 19:22:58,046: DEBUG - /var/www/osticket/include/plugins/build /var/cache/yunohost/from_file/osticket_ynh-testing/scripts
  - 2021-01-04 19:22:58,046: DEBUG - + php make.php hydrate
  - 2021-01-04 19:22:59,350: DEBUG - Hydrating :: lib/jasig/phpcas/source => auth-cas/lib/jasig/phpcas
  - 2021-01-04 19:22:59,350: WARNING - 
  - 2021-01-04 19:22:59,351: DEBUG - + ynh_exit_properly
  - 2021-01-04 19:22:59,351: WARNING - 
  - 2021-01-04 19:22:59,351: DEBUG - + local exit_code=255
  - 2021-01-04 19:22:59,352: WARNING -   [Composer\Json\JsonValidationException]
  - 2021-01-04 19:22:59,352: DEBUG - + '[' 255 -eq 0 ']'
  - 2021-01-04 19:22:59,352: WARNING -   "./composer.json" does not match the expected JSON schema:
  - 2021-01-04 19:22:59,352: DEBUG - + trap '' EXIT
  - 2021-01-04 19:22:59,353: WARNING -    - name : Does not match the regex pattern ^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]?|-{0,2})[a-z0-9]+)*$
  - 2021-01-04 19:22:59,353: DEBUG - + set +o errexit
  - 2021-01-04 19:22:59,353: WARNING - 
  - 2021-01-04 19:22:59,353: DEBUG - + set +o nounset
  - 2021-01-04 19:22:59,354: WARNING - 
  - 2021-01-04 19:22:59,354: DEBUG - + sleep 0.5
  - 2021-01-04 19:22:59,355: WARNING - Exception trace:
  - 2021-01-04 19:22:59,355: WARNING -  () at phar:///var/www/osticket/include/plugins/build/composer.phar/src/Composer/Console/Application.php:417
  - 2021-01-04 19:22:59,355: WARNING -  Composer\Console\Application->getComposer() at phar:///var/www/osticket/include/plugins/build/composer.phar/src/Composer/Console/Application.php:526
  - 2021-01-04 19:22:59,356: WARNING -  Composer\Console\Application->getPluginCommands() at phar:///var/www/osticket/include/plugins/build/composer.phar/src/Composer/Console/Application.php:187
  - 2021-01-04 19:22:59,356: WARNING -  Composer\Console\Application->doRun() at phar:///var/www/osticket/include/plugins/build/composer.phar/vendor/symfony/console/Application.php:117
  - 2021-01-04 19:22:59,356: WARNING -  Symfony\Component\Console\Application->run() at phar:///var/www/osticket/include/plugins/build/composer.phar/src/Composer/Console/Application.php:122
  - 2021-01-04 19:22:59,357: WARNING -  Composer\Console\Application->run() at phar:///var/www/osticket/include/plugins/build/composer.phar/bin/composer:63
  - 2021-01-04 19:22:59,357: WARNING -  require() at /var/www/osticket/include/plugins/build/composer.phar:24
  - 2021-01-04 19:22:59,357: WARNING - 
  - 2021-01-04 19:22:59,358: WARNING - PHP Fatal error:  Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/var/www/osticket/include/plugins/build/lib/jasig/phpcas/source): failed to open dir: No such file or directory in /var/www/osticket/include/plugins/build/make.php:481
  - 2021-01-04 19:22:59,358: WARNING - Stack trace:
  - 2021-01-04 19:22:59,359: WARNING - #0 /var/www/osticket/include/plugins/build/make.php(481): RecursiveDirectoryIterator->__construct('/var/www/ostick...', 4096)
  - 2021-01-04 19:22:59,360: WARNING - #1 /var/www/osticket/include/plugins/build/make.php(340): PluginBuilder->_hydrate(Array)
  - 2021-01-04 19:22:59,361: WARNING - #2 /var/www/osticket/include/plugins/build/make.php(240): PluginBuilder->run(Array, Array)
  - 2021-01-04 19:22:59,361: WARNING - #3 /var/www/osticket/include/plugins/build/make.php(704): Module->_run('make.php')
  - 2021-01-04 19:22:59,362: WARNING - #4 {main}
  - 2021-01-04 19:22:59,362: WARNING -   thrown in /var/www/osticket/include/plugins/build/make.php on line 481
  - 2021-01-04 19:22:59,865: DEBUG - + type -t ynh_clean_setup
  - 2021-01-04 19:22:59,865: DEBUG - + ynh_clean_setup
  - 2021-01-04 19:22:59,866: DEBUG - + true
  - 2021-01-04 19:22:59,866: DEBUG - + exit 1
  - 2021-01-04 19:22:59,873: ERROR - Could not install osticket: An error occurred inside the app installation script
metadata: 
  args: 
    app: https://github.com/YunoHost-Apps/osticket_ynh/tree/testing
    args: None
    force: False
    label: None
    no_remove_on_failure: False
  ended_at: 2021-01-04 19:22:59
  env: 
    YNH_APP_ARG_ADMIN: scharc
    YNH_APP_ARG_DOMAIN: yunohost.lan
    YNH_APP_ARG_IS_PUBLIC: 1
    YNH_APP_ARG_LANGUAGE: de
    YNH_APP_ARG_PATH: /osticket
    YNH_APP_ID: osticket
    YNH_APP_INSTANCE_NAME: osticket
    YNH_APP_INSTANCE_NUMBER: 1
  error: An error occurred inside the app installation script
  interface: False
  operation: app_install
  related_to: 
    - app
    - osticket
  started_at: 2021-01-04 19:22:08
  success: False
  yunohost_version: 4.0.8.3
metadata_path: /var/log/yunohost/categories/operation/20210104-192208-app_install-osticket.yml
name: 20210104-192208-app_install-osticket