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

Unable to install dependency to make #245

Open
wrac4242 opened this issue Oct 26, 2022 · 4 comments
Open

Unable to install dependency to make #245

wrac4242 opened this issue Oct 26, 2022 · 4 comments

Comments

@wrac4242
Copy link

wrac4242 commented Oct 26, 2022

During hydrate stage of making, Sonata-Project/Google-Authenticator is no longer maintained and is archived. See this issue

@wrac4242
Copy link
Author

at least i believe that is the cause of this error code

sh: 1: Syntax error: "(" unexpected
Hydrating :: lib/sonata-project/google-authenticator/src => auth-2fa/lib/Sonata/GoogleAuthenticator
PHP Fatal error:  Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/mnt/c/Users/<redacted>/Downloads/26_10_22/public_html/include/plugins/osTicket-plugins/lib/sonata-project/google-authenticator/src): Failed to open directory: No such file or directory in /mnt/c/Users/<redacted>/Downloads/26_10_22/public_html/include/plugins/osTicket-plugins/make.php:511
Stack trace:
#0 /mnt/c/Users/<redacted>/Downloads/26_10_22/public_html/include/plugins/osTicket-plugins/make.php(511): RecursiveDirectoryIterator->__construct()
#1 /mnt/c/Users/<redacted>/Downloads/26_10_22/public_html/include/plugins/osTicket-plugins/make.php(474): PluginBuilder->mapDependencies()
#2 /mnt/c/Users/<redacted>/Downloads/26_10_22/public_html/include/plugins/osTicket-plugins/make.php(340): PluginBuilder->_hydrate()
#3 /mnt/c/Users/<redacted>/Downloads/26_10_22/public_html/include/plugins/osTicket-plugins/make.php(240): PluginBuilder->run()
#4 /mnt/c/Users/<redacted>/Downloads/26_10_22/public_html/include/plugins/osTicket-plugins/make.php(724): Module->_run()
#5 {main}
  thrown in /mnt/c/Users/<redacted>/Downloads/26_10_22/public_html/include/plugins/osTicket-plugins/make.php on line 511

System: WSL ubuntu
Commit: Latest: 38ed198

@wrac4242
Copy link
Author

hi, is there any updates on this?

@wrac4242
Copy link
Author

retrying this now, i am unable to replicate that issue
however, there are now issues with hydrating the http client

Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Dependency resolution completed in 0.002 seconds
Analyzed 402 packages to resolve dependencies
Analyzed 1763 rules to resolve dependencies
Lock file operations: 15 installs, 0 updates, 0 removals
Installs: symfony/polyfill-mbstring:v1.27.0, mtdowling/jmespath.php:2.6.1, guzzlehttp/promises:1.5.2, ralouphie/getallheaders:3.0.3, psr/http-message:1.0.1, guzzlehttp/psr7:1.9.0, symfony/polyfill-php72:v1.27.0, symfony/polyfill-intl-normalizer:v1.27.0, symfony/polyfill-intl-idn:v1.27.0, guzzlehttp/guzzle:6.5.8, aws/aws-sdk-php:3.33.4, jasig/phpcas:1.3.3, paragonie/random_compat:v9.99.100, league/oauth2-client:2.6.1, sonata-project/google-authenticator:2.3.1
  - Locking aws/aws-sdk-php (3.33.4)
  - Locking guzzlehttp/guzzle (6.5.8)
  - Locking guzzlehttp/promises (1.5.2)
  - Locking guzzlehttp/psr7 (1.9.0)
  - Locking jasig/phpcas (1.3.3)
  - Locking league/oauth2-client (2.6.1)
  - Locking mtdowling/jmespath.php (2.6.1)
  - Locking paragonie/random_compat (v9.99.100)
  - Locking psr/http-message (1.0.1)
  - Locking ralouphie/getallheaders (3.0.3)
  - Locking sonata-project/google-authenticator (2.3.1)
  - Locking symfony/polyfill-intl-idn (v1.27.0)
  - Locking symfony/polyfill-intl-normalizer (v1.27.0)
  - Locking symfony/polyfill-mbstring (v1.27.0)
  - Locking symfony/polyfill-php72 (v1.27.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 15 installs, 0 updates, 0 removals
Installs: symfony/polyfill-mbstring:v1.27.0, mtdowling/jmespath.php:2.6.1, ralouphie/getallheaders:3.0.3, psr/http-message:1.0.1, guzzlehttp/psr7:1.9.0, guzzlehttp/promises:1.5.2, symfony/polyfill-php72:v1.27.0, symfony/polyfill-intl-normalizer:v1.27.0, symfony/polyfill-intl-idn:v1.27.0, guzzlehttp/guzzle:6.5.8, aws/aws-sdk-php:3.33.4, jasig/phpcas:1.3.3, paragonie/random_compat:v9.99.100, league/oauth2-client:2.6.1, sonata-project/google-authenticator:2.3.1
  - Downloading symfony/polyfill-mbstring (v1.27.0)
  - Downloading mtdowling/jmespath.php (2.6.1)
  - Downloading ralouphie/getallheaders (3.0.3)
  - Downloading psr/http-message (1.0.1)
  - Downloading guzzlehttp/psr7 (1.9.0)
  - Downloading guzzlehttp/promises (1.5.2)
  - Downloading symfony/polyfill-php72 (v1.27.0)
  - Downloading symfony/polyfill-intl-normalizer (v1.27.0)
  - Downloading symfony/polyfill-intl-idn (v1.27.0)
  - Downloading guzzlehttp/guzzle (6.5.8)
  - Downloading aws/aws-sdk-php (3.33.4)
  - Downloading jasig/phpcas (1.3.3)
  - Downloading paragonie/random_compat (v9.99.100)
  - Downloading league/oauth2-client (2.6.1)
  - Downloading sonata-project/google-authenticator (2.3.1)
  0/15 [>---------------------------]   0% < 1 sec  0/15 [>---------------------------]   0%  1 sec
  2/15 [===>------------------------]  13% 2 secs
  9/15 [================>-----------]  60% 2 secs
 11/15 [====================>-------]  73% 2 secs
 12/15 [======================>-----]  80% 2 secs
 15/15 [============================] 100% 2 secs
  - Installing symfony/polyfill-mbstring (v1.27.0): Extracting archive
  - Installing mtdowling/jmespath.php (2.6.1): Extracting archive
  - Installing ralouphie/getallheaders (3.0.3): Extracting archive
  - Installing psr/http-message (1.0.1): Extracting archive
  - Installing guzzlehttp/psr7 (1.9.0): Extracting archive
  - Installing guzzlehttp/promises (1.5.2): Extracting archive
  - Installing symfony/polyfill-php72 (v1.27.0): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.27.0): Extracting archive
  - Installing symfony/polyfill-intl-idn (v1.27.0): Extracting archive
  - Installing guzzlehttp/guzzle (6.5.8): Extracting archive
  - Installing aws/aws-sdk-php (3.33.4): Extracting archive
  - Installing jasig/phpcas (1.3.3): Extracting archive
  - Installing paragonie/random_compat (v9.99.100): Extracting archive
  - Installing league/oauth2-client (2.6.1): Extracting archive
  - Installing sonata-project/google-authenticator (2.3.1): Extracting archive
  0/15 [>---------------------------]   0% < 1 sec
 14/15 [==========================>-]  93%  1 sec
 15/15 [============================] 100%  1 sec
7 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package sonata-project/google-authenticator is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
8 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Hydrating :: lib/sonata-project/google-authenticator/src => auth-2fa/lib/Sonata/GoogleAuthenticator
Hydrating :: lib/jasig/phpcas/source => auth-cas/lib/jasig/phpcas
Hydrating :: lib/pear-pear.php.net/net_ldap2 => auth-ldap/include
Hydrating :: lib/league/oauth2-client/src => auth-oauth2/lib/League/OAuth2/Client
Hydrating :: lib/guzzlehttp/guzzle/src => auth-oauth2/lib/GuzzleHttp
Hydrating :: lib/guzzlehttp/psr7/src => auth-oauth2/lib/GuzzleHttp/Psr7
Hydrating :: lib/guzzlehttp/promises/src => auth-oauth2/lib/GuzzleHttp/Promise
Hydrating :: lib/psr/http-client/src => auth-oauth2/lib/Psr/Http/Client
PHP Fatal error:  Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/home/wren/osTicket-plugins/lib/psr/http-client/src): Failed to open directory: No such file or directory in /home/wren/osTicket-plugins/make.php:511
Stack trace:
#0 /home/wren/osTicket-plugins/make.php(511): RecursiveDirectoryIterator->__construct()
#1 /home/wren/osTicket-plugins/make.php(474): PluginBuilder->mapDependencies()
#2 /home/wren/osTicket-plugins/make.php(340): PluginBuilder->_hydrate()
#3 /home/wren/osTicket-plugins/make.php(240): PluginBuilder->run()
#4 /home/wren/osTicket-plugins/make.php(724): Module->_run()
#5 {main}
  thrown in /home/wren/osTicket-plugins/make.php on line 511```

@kmccleary
Copy link

I was encountering the same issue with hydration. I narrowed it down to an invalid composer.json being generated; the 'scripts' key expects an object, not an array.

The fix was to patch PluginBuilder.resolveDependencies() to initialize $scripts as new stdClass()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants