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

Cannot install contao-node when geoip2country is installed #56

Closed
itxup opened this issue Sep 10, 2024 · 1 comment
Closed

Cannot install contao-node when geoip2country is installed #56

itxup opened this issue Sep 10, 2024 · 1 comment

Comments

@itxup
Copy link

itxup commented Sep 10, 2024

On Contao 4.13.47 Managed Edition (a fresh installation) I ran into an installation-conflict.
This is my composer.json:

{
    "type": "project",
    "require": {
        "contao/calendar-bundle": "4.13.*",
        "contao/comments-bundle": "4.13.*",
        "contao/conflicts": "*@dev",
        "contao/faq-bundle": "4.13.*",
        "contao/listing-bundle": "4.13.*",
        "contao/manager-bundle": "4.13.*",
        "contao/news-bundle": "4.13.*",
        "contao/newsletter-bundle": "4.13.*",
        "terminal42/contao-conditionalformfields": "^3.1",
        "terminal42/contao-conditionalselectmenu": "^4.2",
        "terminal42/contao-fineuploader": "^3.4",
        "terminal42/contao-geoip2-country": "^1.3",
        "terminal42/contao-pageimage": "^4.2",
        "terminal42/contao-password-validation": "^1.1",
        "terminal42/contao-url-rewrite": "^1.7",
        "terminal42/notification_center": "^2"
    },
    "extra": {
        "public-dir": "public",
        "contao-component-dir": "assets"
    },
    "scripts": {
        "post-install-cmd": [
            "@php vendor/bin/contao-setup"
        ],
        "post-update-cmd": [
            "@php vendor/bin/contao-setup"
        ]
    }
}

and when I try to install nodes, I get this:

// Warming up the cache for the prod environment with debug                    
 // false                                                                       
11:24:50 CRITICAL  [console] Error thrown while running command "cache:warmup --env=prod --no-ansi". Message: "Terminal42\Geoip2CountryBundle\EventListener\DcaLoaderListener::__construct(): Argument #3 ($countries) must be of type Contao\CoreBundle\Intl\Countries, array given, called in /home/marina/www/vanilla/var/cache/prod/ContainerTrDrRph/getTerminal42Node_Listener_Geoip2countryDcaLoaderService.php on line 22" ["exception" => TypeError { …},"command" => "cache:warmup --env=prod --no-ansi","message" => "Terminal42\Geoip2CountryBundle\EventListener\DcaLoaderListener::__construct(): Argument #3 ($countries) must be of type Contao\CoreBundle\Intl\Countries, array given, called in /home/marina/www/vanilla/var/cache/prod/ContainerTrDrRph/getTerminal42Node_Listener_Geoip2countryDcaLoaderService.php on line 22"]
In DcaLoaderListener.php line 17:
                                                                               
  Terminal42\Geoip2CountryBundle\EventListener\DcaLoaderListener::__construct  
  (): Argument #3 ($countries) must be of type Contao\CoreBundle\Intl\Countri  
  es, array given, called in /home/marina/www/vanilla/var/cache/prod/Containe  
  rTrDrRph/getTerminal42Node_Listener_Geoip2countryDcaLoaderService.php on li  
  ne 22                                                                        
                                                                               
cache:warmup [--no-optional-warmers]
11:24:50 CRITICAL  [console] An error occurred while using the console. Message: "An error occurred while executing the "/usr/bin/php8.1 -dmemory_limit=-1 /home/marina/www/vanilla/vendor/contao/manager-bundle/bin/contao-console cache:warmup --env=prod --no-ansi" command: 11:24:50 CRITICAL  [console] Error thrown while running command "cache:warmup --env=prod --no-ansi". Message: "Terminal42\Geoip2CountryBundle\EventListener\DcaLoaderListener::__construct(): Argument #3 ($countries) must be of type Contao\CoreBundle\Intl\Countries, array given, called in /home/marina/www/vanilla/var/cache/prod/ContainerTrDrRph/getTerminal42Node_Listener_Geoip2countryDcaLoaderService.php on line 22" ["exception" => TypeError { …},"command" => "cache:warmup --env=prod --no-ansi","message" => "Terminal42\Geoip2CountryBundle\EventListener\DcaLoaderListener::__construct(): Argument #3 ($countries) must be of type Contao\CoreBundle\Intl\Countries, array given, called in /home/marina/www/vanilla/var/cache/prod/ContainerTrDrRph/getTerminal42Node_Listener_Geoip2countryDcaLoaderService.php on line 22"]
In DcaLoaderListener.php line 17:
                                                                               
  Terminal42\Geoip2CountryBundle\EventListener\DcaLoaderListener::__construct  
  (): Argument #3 ($countries) must be of type Contao\CoreBundle\Intl\Countri  
  es, array given, called in /home/marina/www/vanilla/var/cache/prod/Containe  
  rTrDrRph/getTerminal42Node_Listener_Geoip2countryDcaLoaderService.php on li  
  ne 22                                                                        
                                                                               
cache:warmup [--no-optional-warmers]
" ["exception" => RuntimeException { …},"message" => """  An error occurred while executing the "/usr/bin/php8.1 -dmemory_limit=-1 /home/marina/www/vanilla/vendor/contao/manager-bundle/bin/contao-console cache:warmup --env=prod --no-ansi" command: 11:24:50 CRITICAL  [console] Error thrown while running command "cache:warmup --env=prod --no-ansi". Message: "Terminal42\Geoip2CountryBundle\EventListener\DcaLoaderListener::__construct(): Argument #3 ($countries) must be of type Contao\CoreBundle\Intl\Countries, array given, called in /home/marina/www/vanilla/var/cache/prod/ContainerTrDrRph/getTerminal42Node_Listener_Geoip2countryDcaLoaderService.php on line 22" ["exception" => TypeError { …},"command" => "cache:warmup --env=prod --no-ansi","message" => "Terminal42\Geoip2CountryBundle\EventListener\DcaLoaderListener::__construct(): Argument #3 ($countries) must be of type Contao\CoreBundle\Intl\Countries, array given, called in /home/marina/www/vanilla/var/cache/prod/ContainerTrDrRph/getTerminal42Node_Listener_Geoip2countryDcaLoaderService.php on line 22"]\n  \n  In DcaLoaderListener.php line 17:\n                                                                                 \n    Terminal42\Geoip2CountryBundle\EventListener\DcaLoaderListener::__construct  \n    (): Argument #3 ($countries) must be of type Contao\CoreBundle\Intl\Countri  \n    es, array given, called in /home/marina/www/vanilla/var/cache/prod/Containe  \n    rTrDrRph/getTerminal42Node_Listener_Geoip2countryDcaLoaderService.php on li  \n    ne 22                                                                        \n                                                                                 \n  \n  cache:warmup [--no-optional-warmers]\n  \n  """]
In ContaoSetupCommand.php line 146:
                                                                               
  An error occurred while executing the "/usr/bin/php8.1 -dmemory_limit=-1 /h  
  ome/marina/www/vanilla/vendor/contao/manager-bundle/bin/contao-console cach  
  e:warmup --env=prod --no-ansi" command: 11:24:50 CRITICAL  [console] Error   
  thrown while running command "cache:warmup --env=prod --no-ansi". Message:   
  "Terminal42\Geoip2CountryBundle\EventListener\DcaLoaderListener::__construc  
  t(): Argument #3 ($countries) must be of type Contao\CoreBundle\Intl\Countr  
  ies, array given, called in /home/marina/www/vanilla/var/cache/prod/Contain  
  erTrDrRph/getTerminal42Node_Listener_Geoip2countryDcaLoaderService.php on l  
  ine 22" ["exception" => TypeError { …},"command" => "cache:warmup --env=pro  
  d --no-ansi","message" => "Terminal42\Geoip2CountryBundle\EventListener\Dca  
  LoaderListener::__construct(): Argument #3 ($countries) must be of type Con  
  tao\CoreBundle\Intl\Countries, array given, called in /home/marina/www/vani  
  lla/var/cache/prod/ContainerTrDrRph/getTerminal42Node_Listener_Geoip2countr  
  yDcaLoaderService.php on line 22"]                                           
                                                                               
  In DcaLoaderListener.php line 17:                                            
                                                                               
                                                                               
    Terminal42\Geoip2CountryBundle\EventListener\DcaLoaderListener::__constru  
  ct                                                                           
    (): Argument #3 ($countries) must be of type Contao\CoreBundle\Intl\Count  
  ri                                                                           
    es, array given, called in /home/marina/www/vanilla/var/cache/prod/Contai  
  ne                                                                           
    rTrDrRph/getTerminal42Node_Listener_Geoip2countryDcaLoaderService.php on   
  li                                                                           
    ne 22                                                                      
                                                                               
                                                                               
                                                                               
                                                                               
  cache:warmup [--no-optional-warmers]                                         
                                                                               
contao:setup
Script @php vendor/bin/contao-setup handling the post-install-cmd event returned with error code 1
# Process terminated with exit code 1
# Result: General error

Did I do anything wrong or is it a bug? I'm not sure whether the problem is in node or geoip2country, any help is appreciated.
Thank you!

@aschempp
Copy link
Member

This has been fixed in version 1.5.26 (and requires terminal42/geoip2-country version 1.4+).

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