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

Error With Composer 2.2.0@unstable #226

Open
XedinUnknown opened this issue Dec 23, 2021 · 2 comments
Open

Error With Composer 2.2.0@unstable #226

XedinUnknown opened this issue Dec 23, 2021 · 2 comments

Comments

@XedinUnknown
Copy link

XedinUnknown commented Dec 23, 2021

Symptoms

When used on GitHub Actions, the following error is produced:

Running composer update to apply merge settings
Loading composer repositories with package information

PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php:484
Stack trace:
#0 phar:///usr/local/bin/composer/src/Composer/Util/Http/CurlDownloader.php(399): Composer\Util\HttpDownloader::outputWarnings()
#1 phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php(404): Composer\Util\Http\CurlDownloader->tick()
#2 phar:///usr/local/bin/composer/src/Composer/Util/Loop.php(96): Composer\Util\HttpDownloader->countActiveJobs()
#3 phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php(957): Composer\Util\Loop->wait()
#4 phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php(524): Composer\Repository\ComposerRepository->loadAsyncPackages()
#5 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/PoolBuilder.php(379): Composer\Repository\ComposerRepository->loadPackages()
#6 phar:///usr/local/bin/composer/src/Composer/DependencyResolver/PoolBuilder.php(234): Composer\DependencyResolver\PoolBuilder->loadPackagesMarkedForLoading()
#7 phar:///usr/local/bin/composer/src/Composer/Repository/RepositorySet.php(261): Composer\DependencyResolver\PoolBuilder->buildPool()
#8 phar:///usr/local/bin/composer/src/Composer/Installer.php(435): Composer\Repository\RepositorySet->createPool()
#9 phar:///usr/local/bin/composer/src/Composer/Installer.php(279): Composer\Installer->doUpdate()
#10 /home/runner/work/payoneer-for-woocommerce/payoneer-for-woocommerce/vendor/wikimedia/composer-merge-plugin/src/MergePlugin.php(377): Composer\Installer->run()
#11 [internal function]: Wikimedia\Composer\Merge\V2\MergePlugin->onPostInstallOrUpdate()
#12 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(192): call_user_func()
#13 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(119): Composer\EventDispatcher\EventDispatcher->doDispatch()
#14 phar:///usr/local/bin/composer/src/Composer/Installer.php(372): Composer\EventDispatcher\EventDispatcher->dispatchScript()
#15 phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php(139): Composer\Installer->run()
#16 phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php(245): Composer\Command\InstallCommand->execute()
#17 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run()
#18 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand()
#19 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(335): Symfony\Component\Console\Application->doRun()
#20 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(117): Composer\Console\Application->doRun()
#21 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(130): Symfony\Component\Console\Application->run()
#22 phar:///usr/local/bin/composer/bin/composer(73): Composer\Console\Application->run()
#23 /usr/local/bin/composer(29): require('...')
#24 {main}
  thrown in phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php on line 484

Reproducing

  • PHP: 7.4, 8.0;
  • Package: v2.0.1.
  • Composer: 2.2.1. ⚠️ Cannot reproduce on 2.1.14.
@strangerkir
Copy link

More info from the same project

Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
37 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Running composer update to apply merge settings
Loading composer repositories with package information
https://repo.packagist.com/inpsyde could not be fully loaded (Illegal string offset 'versions'), package information was loaded from the local cache and may be out of date
Error: Illegal string offset 'versions'


  [ErrorException]                  
  Illegal string offset 'versions'  

Seems like it happens with composer here. From the context, I'm making an assumption the problem is caused by improperly added warning or info that was expected to be an array, but a string was provided.

@XedinUnknown
Copy link
Author

XedinUnknown commented Dec 23, 2021

Now able to reproduce locally. See updated Reproducing section. The problem appears to manifest with a new version of Composer, 2.2.0. Workaround: switch to 2.1.14.

@XedinUnknown XedinUnknown changed the title Error When Used on CI Error With Composer 2.2.0@unstable Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants