Ir para o conteúdo

Conflito módulo GerenciaNet com Cron WHMCS

Viewing 2 reply threads
  • Autor
    Posts
    • #10970
      Paulo
      Participant

        Olá, boa noite!

        Fiz a atualização do PHP do meu servidor para a versão 7.1

        php -v
        
        PHP 7.1.19 (cli) (built: Jun 21 2018 07:18:00) ( NTS )
        Copyright (c) 1997-2018 The PHP Group
        Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
        with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.2.2, Copyright (c) 2002-2018, by ionCube Ltd.

        Porém, desde este dia, o cron diário do WHMCS parou de funcionar. Em contato com o WHMCS, pediram que fosse executado o comando (…)cron.php –force -vvv no SSH e, feito isto, gerou o seguinte erro:

        [WHMCS Applicat ion] ERROR: TypeError: Argument 1 passed to GuzzleHttp\Ring\Client\StreamHandler ::__invoke() must be of the type array, object given, called in /public_html/central/modules/gateways/gofasgerencianetcartao/sdk /vendor/guzzlehttp/guzzle/src/Client.php on line 277 and defined in /public_html/central/vendor/guzzlehttp/ringphp/src/Client/St reamHandler.php:26 Stack trace: #0 /public_html/ central/modules/gateways/gofasgerencianetcartao/sdk/vendor/guzzlehttp/guzzle/src /Client.php(277): GuzzleHttp\Ring\Client\StreamHandler->__invoke(Object(GuzzleHt tp\Psr7\Request), Array) #1 /public_html/central /modules/gateways/gofasgerencianetcartao/sdk/vendor/guzzlehttp/guzzle/src/Client .php(125): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array) # 2 /public_html/central/modules/gateways/gofasger encianetcartao/sdk/vendor/guzzlehttp/guzzle/src/Client.php(131): GuzzleHttp\Clie nt->requestAsync('get', Object(GuzzleHttp\Psr7\Uri), Array) #3 /public_html/central/modules/gateways/gofasgerencianetcartao/sdk/ vendor/guzzlehttp/guzzle/src/Client.php(89): GuzzleHttp\Client->request('get', ' https://pki.whm...', Array) #4 /public_html/cent ral/vendor/whmcs/whmcs-foundation/lib/Installer/Composer/CertificateManager.php( 0): GuzzleHttp\Client->__call('get', Array) #5 / public_html/central/vendor/whmcs/whmcs-foundation/lib/Installer/Composer/Certifi cateManager.php(0): WHMCS\Installer\Composer\CertificateManager->getUrl('https:/ /pki.whm...') #6 /public_html/central/vendor/whm cs/whmcs-foundation/lib/Installer/Composer/CertificateManager.php(0): WHMCS\Inst aller\Composer\CertificateManager->getPathFromKeyserver('certs.json') #7 /home/a dmin/web/MEUSITE.COM.BR/public_html/central/vendor/whmcs/whmcs-foundation/lib/ Installer/Composer/CertificateManager.php(0): WHMCS\Installer\Composer\Certifica teManager->getCertMetadata() #8 /public_html/cen tral/vendor/whmcs/whmcs-foundation/lib/Installer/Composer/CertificateManager.php (0): WHMCS\Installer\Composer\CertificateManager->reloadCrls() #9 /public_html/central/vendor/whmcs/whmcs-foundation/lib/Install er/Composer/CertificateManager.php(0): WHMCS\Installer\Composer\CertificateManag er->getCrlForCertificate(Object(WHMCS\Installer\Composer\Certificate)) #10 /public_html/central/vendor/whmcs/whmcs-foundation/li b/Installer/Composer/CertificateManager.php(0): WHMCS\Installer\Composer\Certifi cateManager->validateCertificateNotRevoked(Object(WHMCS\Installer\Composer\Certi ficate)) #11 /public_html/central/vendor/whmcs/w hmcs-foundation/lib/Installer/Composer/CertificateManager.php(0): WHMCS\Installe r\Composer\CertificateManager->getTrustedCertificate('515FCBEB9958DA4...', 2) #1 2 /public_html/central/vendor/whmcs/whmcs-founda tion/lib/Installer/Composer/CertificateManager.php(0): WHMCS\Installer\Composer\ CertificateManager->validateCertificateSignatureIsTrusted(Object(WHMCS\Installer \Composer\Certificate)) #13 /public_html/central /vendor/whmcs/whmcs-foundation/lib/Installer/Composer/CertificateManager.php(0): WHMCS\Installer\Composer\CertificateManager->getTrustedCertificate('0C12A820D7D D9ED...', 1) #14 /public_html/central/vendor/whm cs/whmcs-foundation/lib/Installer/Composer/PackagesFile.php(0): WHMCS\Installer\ Composer\CertificateManager->getValidCodeSigningCertificateContent('0C12A820D7DD 9ED...') #15 /public_html/central/vendor/whmcs/w hmcs-foundation/lib/Installer/Composer/WhmcsRepository.php(0): WHMCS\Installer\C omposer\PackagesFile->validateNotificationSignatures(Array) #16 /public_html/central/vendor/composer/composer/src/Composer/Repos itory/ComposerRepository.php(462): WHMCS\Installer\Composer\WhmcsRepository->fet chFile('https://release...', 'UpdatePackagesD...') #17 /public_html/central/vendor/composer/composer/src/Composer/Repository/Com poserRepository.php(256): Composer\Repository\ComposerRepository->loadRootServer File() #18 /public_html/central/vendor/composer/ composer/src/Composer/DependencyResolver/Pool.php(99): Composer\Repository\Compo serRepository->hasProviders() #19 /public_html/c entral/vendor/composer/composer/src/Composer/Installer.php(402): Composer\Depend encyResolver\Pool->addRepository(Object(WHMCS\Installer\Composer\WhmcsRepository ), Array) #20 /public_html/central/vendor/compos er/composer/src/Composer/Installer.php(228): Composer\Installer->doInstall(Objec t(Composer\Repository\InstalledArrayRepository), Object(Composer\Repository\Comp ositeRepository), Object(Composer\Repository\PlatformRepository), Array, false) #21 /public_html/central/vendor/composer/compose r/src/Composer/Command/UpdateCommand.php(173): Composer\Installer->run() #22 /public_html/central/vendor/symfony/console/Command /Command.php(259): Composer\Command\UpdateCommand->execute(Object(Symfony\Compon ent\Console\Input\ArrayInput), Object(WHMCS\Installer\Composer\MonologBufferedOu tputWrapper)) #23 /public_html/central/vendor/sy mfony/console/Application.php(844): Symfony\Component\Console\Command\Command->r un(Object(Symfony\Component\Console\Input\ArrayInput), Object(WHMCS\Installer\Co mposer\MonologBufferedOutputWrapper)) #24 /publi c_html/central/vendor/whmcs/whmcs-foundation/lib/Installer/Composer/WhmcsCompose rApplication.php(0): Symfony\Component\Console\Application->doRunCommand(Object( Composer\Command\UpdateCommand), Object(Symfony\Component\Console\Input\ArrayInp ut), Object(WHMCS\Installer\Composer\MonologBufferedOutputWrapper)) #25 /home/ad min/web/MEUSITE.COM.BR/public_html/central/vendor/symfony/console/Application. php(192): WHMCS\Installer\Composer\WhmcsComposerApplication->doRunCommand(Object (Composer\Command\UpdateCommand), Object(Symfony\Component\Console\Input\ArrayIn put), Object(WHMCS\Installer\Composer\MonologBufferedOutputWrapper)) #26 /home/a dmin/web/MEUSITE.COM.BR/public_html/central/vendor/composer/composer/src/Compo ser/Console/Application.php(189): Symfony\Component\Console\Application->doRun(O bject(Symfony\Component\Console\Input\ArrayInput), Object(WHMCS\Installer\Compos er\MonologBufferedOutputWrapper)) #27 /public_ht ml/central/vendor/symfony/console/Application.php(123): Composer\Console\Applica tion->doRun(Object(Symfony\Component\Console\Input\ArrayInput), Object(WHMCS\Ins taller\Composer\MonologBufferedOutputWrapper)) #28 /public_html/central/vendor/composer/composer/src/Composer/Console/Applicatio n.php(99): Symfony\Component\Console\Application->run(Object(Symfony\Component\C onsole\Input\ArrayInput), Object(WHMCS\Installer\Composer\MonologBufferedOutputW rapper)) #29 /public_html/central/vendor/whmcs/w hmcs-foundation/lib/Installer/Composer/ComposerWrapper.php(0): Composer\Console\ Application->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(WHMC S\Installer\Composer\MonologBufferedOutputWrapper)) #30 /public_html/central/vendor/whmcs/whmcs-foundation/lib/Installer/Compose r/ComposerWrapper.php(0): WHMCS\Installer\Composer\ComposerWrapper->update() #31 /public_html/central/vendor/whmcs/whmcs-foundat ion/lib/Installer/Composer/ComposerUpdate.php(0): WHMCS\Installer\Composer\Compo serWrapper->getLatestVersion() #32 /public_html/ central/vendor/whmcs/whmcs-foundation/lib/Installer/Composer/ComposerUpdate.php( 0): WHMCS\Installer\Composer\ComposerUpdate->WHMCS\Installer\Composer{closure}( ) #33 /public_html/central/vendor/whmcs/whmcs-fo undation/lib/Installer/Composer/ComposerUpdate.php(0): WHMCS\Installer\Composer\ ComposerUpdate->doComposerCommand(Object(Closure)) #34 /public_html/central/vendor/whmcs/whmcs-foundation/lib/Installer/Update/U pdater.php(0): WHMCS\Installer\Composer\ComposerUpdate->getLatestVersion(true) # 35 /public_html/central/vendor/whmcs/whmcs-found ation/lib/Cron/Task/CheckForWhmcsUpdate.php(0): WHMCS\Installer\Update\Updater-> fetchComposerLatestVersion() #36 /public_html/ce ntral/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): WHM CS\Cron\Task\CheckForWhmcsUpdate->__invoke() #37 /public_html/central/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/Abstract Task.php(0): WHMCS\Scheduling\Task\AbstractTask->execute() #38 /public_html/central/vendor/whmcs/whmcs-foundation/lib/Cron/Conso le/Command/AbstractCronCommand.php(0): WHMCS\Scheduling\Task\AbstractTask->run() #39 /public_html/central/vendor/whmcs/whmcs-fou ndation/lib/Cron/Console/Command/AbstractCronCommand.php(0): WHMCS\Cron\Console\ Command\AbstractCronCommand->executeCollection(Object(WHMCS\Scheduling\Task\Coll ection)) #40 /public_html/central/vendor/symfony /console/Command/Command.php(259): WHMCS\Cron\Console\Command\AbstractCronComman d->execute(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\C onsole\Output\ConsoleOutput)) #41 /public_html/c entral/vendor/symfony/console/Application.php(844): Symfony\Component\Console\Co mmand\Command->run(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Com ponent\Console\Output\ConsoleOutput)) #42 /publi c_html/central/vendor/symfony/console/Application.php(192): Symfony\Component\Co nsole\Application->doRunCommand(Object(WHMCS\Cron\Console\Command\AllCommand), O bject(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Outpu t\ConsoleOutput)) #43 /public_html/central/vendo r/symfony/console/Application.php(123): Symfony\Component\Console\Application->d oRun(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console \Output\ConsoleOutput)) #44 /public_html/central /crons/cron.php(0): Symfony\Component\Console\Application->run(Object(WHMCS\Cron \Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput) ) #45 {main} {"exception":"[object] (TypeError(code: 0): Argument 1 passed to Gu zzleHttp\Ring\Client\StreamHandler::__invoke() must be of the type array, obj ect given, called in /public_html/central/module s/gateways/gofasgerencianetcartao/sdk/vendor/guzzlehttp/guzzle/src/Client.php on line 277 at /public_html/central/vendor/guzzleh ttp/ringphp/src/Client/StreamHandler.php:26)"} []

        Logicamente, o WHMCS jogou a culpa no módulo. Assim sendo, isto seria, de fato, um problema?
        O módulo está funcionando normalmente (v. 1.2.3), mas o cron parou de concluir.

        Obrigado.

      • #11181
        Paulo
        Participant

          Por conta do atendimento nulo oferecido pela empresa Gofas, optamos por não utilizar mais o módulo.
          Até a remoção do plugin, o problema permanecia. Após remover por completo, tudo voltou a funcionar.

          Torcer para um dia isto voltar a funcionar.

        • #11182
          Gofas
          Keymaster

            Existem outros tópicos aqui no fórum com a solução para esse caso, basicamente, você precisa atualizar o php para uma versão maior que 7.1, ou mudar a pasta SDK do módulo pela pasta SDK de versões anteriores do módulo, caso não seja possível atualizar o php. O erro vem de um conflito com a biblioteca GuzlleHttp da SDK fornecida pala Gerencianet, se você der uma “googlada” vai ver casos semelhantes no github da GN.

            Sobre o atendimento, esse módulo é gratuito e salientamos que deve ser usando por sua conta e risco, não podemos garantir suporte e esse fórum foi criado para que os usuários se ajudem entre si, enquanto isso não acontece, é possível que nós responderemos as vezes aqui, mas não podemos garantir isso por muito tempo devido à demanda de usuários sempre crescente.

        Viewing 2 reply threads
        • You must be logged in to reply to this topic.
        Role para cima