What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

hello everyone, i have a problem setting up the environment. As soon as I call up e.g. docker/sdk u

U01UNSWA2Q5
U01UNSWA2Q5 Posts: 5 🧑🏻‍🚀 - Cadet

hello everyone, i have a problem setting up the environment.

As soon as I call up e.g. docker/sdk up and the vendor is set up via composer, I get the following error:

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

PhantomInstaller\Installer::installPhantomJS

Fatal error: Uncaught TypeError: Argument 3 passed to Composer\Downloader\DownloadManager::download() must implement interface Composer\Package\PackageInterface or be null, bool given, called in /data/vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php on line 190 and defined in phar:///usr/bin/composer/src/Composer/Downloader/DownloadManager.php:182
Stack trace:

0 /data/vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php(190): Composer\Downloader\DownloadManager->download(Object(Composer\Package\Package), '/data/vendor/ja...', false)

1 /data/vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php(119): PhantomInstaller\Installer->download('/data/vendor/ja...', '2.1.1')

2 /data/vendor/jakoch/phantomjs-installer/src/PhantomInstaller/Installer.php(92): PhantomInstaller\Installer->__invoke()

3 phar:///usr/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(341): PhantomInstaller\Installer::installPhantomJS(Object(Composer\Script\Event))

4 phar:///usr/bin/composer/ in phar:///usr/bin/composer/src/Composer/Downloader/DownloadManager.php on line 182

My teammates who work on the same repo don't have this problem!
does anyone have any idea what it can be?

Comments

  • U01UNSWA2Q5
    U01UNSWA2Q5 Posts: 5 🧑🏻‍🚀 - Cadet

    Thanks i will ive it a try!

  • U01UNSWA2Q5
    U01UNSWA2Q5 Posts: 5 🧑🏻‍🚀 - Cadet

    Now i stop here:

  • U01UNSWA2Q5
    U01UNSWA2Q5 Posts: 5 🧑🏻‍🚀 - Cadet

    Command jenkins-setup [vendor/bin/console scheduler:setup] (In progress...)
    Store: DE | Environment: docker
    TypeError - Exception: Argument 1 passed to Twig\Environment::addFunction() must be an instance of Twig\TwigFunction, string given, called in /data/vendor/spryker/chart-gui/src/Spryker/Zed/ChartGui/Communication/Plugin/Twig/Chart/ChartGuiTwigPlugin.php on line 45
    in /data/vendor/twig/twig/src/Environment.php (852)

    Command: vendor/bin/console scheduler:setup

    Trace:

    0 /data/vendor/spryker/chart-gui/src/Spryker/Zed/ChartGui/Communication/Plugin/Twig/Chart/ChartGuiTwigPlugin.php(45): Twig\Environment->addFunction('barChart', Object(Twig\TwigFunction))

    1 /data/vendor/spryker/chart-gui/src/Spryker/Zed/ChartGui/Communication/Plugin/Twig/Chart/ChartGuiTwigPlugin.php(34): Spryker\Zed\ChartGui\Communication\Plugin\Twig\Chart\ChartGuiTwigPlugin->registerChartTwigFunctions(Object(Twig\Environment))

    2 /data/vendor/spryker/twig/src/Spryker/Zed/Twig/Communication/Plugin/Application/TwigApplicationPlugin.php(89): Spryker\Zed\ChartGui\Communication\Plugin\Twig\Chart\ChartGuiTwigPlugin->extend(Object(Twig\Environment), Object(Spryker\Shared\Kernel\Container\ContainerProxy))

    3 /data/vendor/spryker/twig/src/Spryker/Zed/Twig/Communication/Plugin/Application/TwigApplicationPlugin.php(57): Spryker\Zed\Twig\Communication\Plugin\Application\TwigApplicationPlugin->extendTwig(Object(Twig\Environment), Object(Spryker\Shared\Kernel\Container\ContainerProxy))

    4 /data/vendor/spryker/container/src/Spryker/Service/Container/Container.php(273): Spryker\Zed\Twig\Communication\Plugin\Application\TwigApplicationPlugin->Spryker\Zed\Twig\Communication\Plugin\Application{closure}(Object(Spryker\Shared\Kernel\Container\ContainerProxy))

    5 /data/vendor/spryker/container/src/Spryker/Service/Container/Container.php(210): Spryker\Service\Container\Container->getService('twig')

    6 /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/Container/GlobalContainer.php(54): Spryker\Service\Container\Container->get('twig')

    7 /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/Container/AbstractApplicationContainer.php(37): Spryker\Shared\Kernel\Container\GlobalContainer->get('twig')

    8 /data/vendor/spryker/scheduler-jenkins/src/Spryker/Zed/SchedulerJenkins/SchedulerJenkinsDependencyProvider.php(74): Spryker\Shared\Kernel\Container\AbstractApplicationContainer->getApplicationService('twig')

    9 /data/vendor/spryker/container/src/Spryker/Service/Container/Container.php(273): Spryker\Zed\SchedulerJenkins\SchedulerJenkinsDependencyProvider->Spryker\Zed\SchedulerJenkins{closure}(Object(Spryker\Zed\Kernel\Container))

    10 /data/vendor/spryker/container/src/Spryker/Service/Container/Container.php(210): Spryker\Service\Container\Container->getService('TWIG_ENVIRONMEN...')

    11 /data/vendor/spryker/kernel/src/Spryker/Zed/Kernel/BundleDependencyProviderResolverAwareTrait.php(54): Spryker\Service\Container\Container->get('TWIG_ENVIRONMEN...')

    12 /data/vendor/spryker/scheduler-jenkins/src/Spryker/Zed/SchedulerJenkins/Business/SchedulerJenkinsBusinessFactory.php(255): Spryker\Zed\Kernel\AbstractFactory->getProvidedDependency('TWIG_ENVIRONMEN...')

    13 /data/vendor/spryker/scheduler-jenkins/src/Spryker/Zed/SchedulerJenkins/Business/SchedulerJenkinsBusinessFactory.php(136): Spryker\Zed\SchedulerJenkins\Business\SchedulerJenkinsBusinessFactory->getTwigEnvironment()

    14 /data/vendor/spryker/scheduler-jenkins/src/Spryker/Zed/SchedulerJenkins/Business/SchedulerJenkinsBusinessFactory.php(159): Spryker\Zed\SchedulerJenkins\Business\SchedulerJenkinsBusinessFactory->createXmkJenkinsJobTemplateGenerator()

    15 /data/vendor/spryker/scheduler-jenkins/src/Spryker/Zed/SchedulerJenkins/Business/SchedulerJenkinsBusinessFactory.php(63): Spryker\Zed\SchedulerJenkins\Business\SchedulerJenkinsBusinessFactory->createUpdateExecutor()

    16 /data/vendor/spryker/scheduler-jenkins/src/Spryker/Zed/SchedulerJenkins/Business/SchedulerJenkinsFacade.php(31): Spryker\Zed\SchedulerJenkins\Business\SchedulerJenkinsBusinessFactory->createSchedulerJenkinsSetup()

    17 /data/vendor/spryker/scheduler-jenkins/src/Spryker/Zed/SchedulerJenkins/Communication/Plugin/Adapter/SchedulerJenkinsAdapterPlugin.php(32): Spryker\Zed\SchedulerJenkins\Business\SchedulerJenkinsFacade->setupJenkins(Object(Generated\Shared\Transfer\SchedulerScheduleTransfer))

    18 /data/vendor/spryker/scheduler/src/Spryker/Zed/Scheduler/Business/Command/SchedulerSetupCommand.php(26): Spryker\Zed\SchedulerJenkins\Communication\Plugin\Adapter\SchedulerJenkinsAdapterPlugin->setup(Object(Generated\Shared\Transfer\SchedulerScheduleTransfer))

    19 /data/vendor/spryker/scheduler/src/Spryker/Zed/Scheduler/Business/Command/AbstractSchedulerCommand.php(53): Spryker\Zed\Scheduler\Business\Command\SchedulerSetupCommand->executeCommand(Object(Spryker\Zed\SchedulerJenkins\Communication\Plugin\Adapter\SchedulerJenkinsAdapterPlugin), Object(Generated\Shared\Transfer\SchedulerScheduleTransfer))

    20 /data/vendor/spryker/scheduler/src/Spryker/Zed/Scheduler/Business/SchedulerFacade.php(52): Spryker\Zed\Scheduler\Business\Command\AbstractSchedulerCommand->execute(Object(Generated\Shared\Transfer\SchedulerFilterTransfer))

    21 /data/vendor/spryker/scheduler/src/Spryker/Zed/Scheduler/Communication/Console/SchedulerSetupConsole.php(70): Spryker\Zed\Scheduler\Business\SchedulerFacade->setup(Object(Generated\Shared\Transfer\SchedulerFilterTransfer))

    22 /data/vendor/symfony/console/Command/Command.php(255): Spryker\Zed\Scheduler\Communication\Console\SchedulerSetupConsole->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

    23 /data/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

    24 /data/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Spryker\Zed\Scheduler\Communication\Console\SchedulerSetupConsole), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

    25 /data/vendor/spryker/console/src/Spryker/Zed/Console/Communication/Bootstrap/ConsoleBootstrap.php(111): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

    26 /data/vendor/symfony/console/Application.php(149): Spryker\Zed\Console\Communication\Bootstrap\ConsoleBootstrap->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

    27 /data/vendor/spryker/console/bin/console(27): Symfony\Component\Console\Application->run()

    28

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Check composer history if it updated twig/twig from v1 to v2 and if yes, downgrade it.
    Shouldn't be related neither to composer v2, nor to docker.

  • U01UNSWA2Q5
    U01UNSWA2Q5 Posts: 5 🧑🏻‍🚀 - Cadet

    thanks