Hubspot API Loading... Internal Server Error 500 Mautic 4.4.5

Your software
My Mautic version is: 4.4.5
My PHP version is: 7.4.32
My Database type and version is: 10.4.26-MariaDB

Your problem
My problem is: Can’t open Hubspot plugin stuck on loading. this was after I installed the recommendations show under system info. Before that the popup openen but each button (cancel, save, etc) resulted in a 500 error. I still can’t replace the API key with a private key

These errors are showing in the log:
[2022-12-08 07:28:18] mautic.NOTICE: PHP Notice - Trying to access array offset on value of type bool - in file /var/www/html/mautic/app/bundles/PageBundle/Entity/HitRepository.php - at line 267 {“options”:{“leadId”:“43312”,“0”:“mydomain/%”,“second_to_last”:“45198”},“sq”:“[object] (Doctrine\DBAL\Query\QueryBuilder: SELECT h.date_hit latest_hit FROM page_hits h WHERE (h.lead_id = 43312) AND (h.id <> 45198))”,“result”:false} {“hostname”:“myhostname”,“pid”:8792}

[2022-12-08 12:07:03] mautic.ERROR: INTEGRATION ERROR: Hubspot - This hapikey doesn’t exist. {“hostname”:“myhostname”,“pid”:16234}

[2022-12-08 17:31:07] mautic.ERROR: Mautic\PluginBundle\Exception\ApiErrorException: The API key provided is invalid. View or manage your API key here: HubSpot Login in /var/www/html/mautic/plugins/MauticCrmBundle/Api/HubspotApi.php:39 Stack trace: #0 /var/www/html/mautic/plugins/MauticCrmBundle/Api/HubspotApi.php(61): MauticPlugin\MauticCrmBundle\Api\HubspotApi->request() #1 /var/www/html/mautic/plugins/MauticCrmBundle/Integration/HubspotIntegration.php(236): MauticPlugin\MauticCrmBundle\Api\HubspotApi->getLeadFields() #2 /var/www/html/mautic/plugins/MauticCrmBundle/Integration/CrmAbstractIntegration.php(479): MauticPlugin\MauticCrmBundle\Integration\HubspotIntegration->getAvailableLeadFields() #3 /var/www/html/mautic/plugins/MauticCrmBundle/Integration/HubspotIntegration.php(202): MauticPlugin\MauticCrmBundle\Integration\CrmAbstractIntegration->getFormFieldsByObject() #4 /var/www/html/mautic/app/bundles/PluginBundle/Form/Type/FeatureSettingsType.php(70): MauticPlugin\MauticCrmBundle\Integration\HubspotIntegration->getFormLeadFields() #5 /var/www/html/mautic/app/bundles/PluginBundle/Form/Type/FeatureSettingsType.php(146): Mautic\PluginBundle\Form\Type\FeatureSettingsType->Mautic\PluginBundle\Form\Type{closure}() #6 /var/www/html/mautic/vendor/symfony/event-dispatcher/EventDispatcher.php(264): Mautic\PluginBundle\Form\Type\FeatureSettingsType->Mautic\PluginBundle\Form\Type{closure}() #7 /var/www/html/mautic/vendor/symfony/event-dispatcher/EventDispatcher.php(239): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() #8 /var/www/html/mautic/vendor/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners() #9 /var/www/html/mautic/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->dispatch() #10 /var/www/html/mautic/vendor/symfony/form/Form.php(353): Symfony\Component\EventDispatcher\ImmutableEventDispatcher->dispatch() #11 /var/www/html/mautic/vendor/symfony/form/Extension/Core/DataMapper/PropertyPathMapper.php(51): Symfony\Component\Form\Form->setData() #12 /var/www/html/mautic/vendor/symfony/form/Form.php(389): Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper->mapDataToForms() #13 /var/www/html/mautic/vendor/symfony/form/Form.php(493): Symfony\Component\Form\Form->setData() #14 /var/www/html/mautic/vendor/symfony/form/FormBuilder.php(208): Symfony\Component\Form\Form->initialize() #15 /var/www/html/mautic/vendor/symfony/form/FormFactory.php(32): Symfony\Component\Form\FormBuilder->getForm() #16 /var/www/html/mautic/vendor/symfony/framework-bundle/Controller/ControllerTrait.php(324): Symfony\Component\Form\FormFactory->create() #17 /var/www/html/mautic/app/bundles/PluginBundle/Controller/PluginController.php(183): Symfony\Bundle\FrameworkBundle\Controller\Controller->createForm() #18 /var/www/html/mautic/vendor/symfony/http-kernel/HttpKernel.php(158): Mautic\PluginBundle\Controller\PluginController->configAction() #19 /var/www/html/mautic/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw() #20 /var/www/html/mautic/vendor/symfony/http-kernel/Kernel.php(201): Symfony\Component\HttpKernel\HttpKernel->handle() #21 /var/www/html/mautic/app/AppKernel.php(115): Symfony\Component\HttpKernel\Kernel->handle() #22 /var/www/html/mautic/app/middlewares/CORSMiddleware.php(82): AppKernel->handle() #23 /var/www/html/mautic/app/middlewares/CatchExceptionMiddleware.php(34): Mautic\Middleware\CORSMiddleware->handle() #24 /var/www/html/mautic/app/middlewares/VersionCheckMiddleware.php(58): Mautic\Middleware\CatchExceptionMiddleware->handle() #25 /var/www/html/mautic/app/middlewares/TrustMiddleware.php(42): Mautic\Middleware\VersionCheckMiddleware->handle() #26 /var/www/html/mautic/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\Middleware\TrustMiddleware->handle() #27 /var/www/html/mautic/vendor/stack/run/src/Stack/run.php(13): Stack\StackedHttpKernel->handle() #28 /var/www/html/mautic/index.php(24): Stack\run() #29 {main} {“hostname”:“37-97-186-212.colo.transip.net”,“pid”:8783}

[2022-12-08 17:31:17] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Form\Exception\LogicException: “A form with an empty name cannot have a parent form.” at /var/www/html/mautic/vendor/symfony/form/Form.php line 284 {“exception”:“[object] (Symfony\Component\Form\Exception\LogicException(code: 0): A form with an empty name cannot have a parent form. at /var/www/html/mautic/vendor/symfony/form/Form.php:284)”} {“hostname”:“myhostname”,“pid”:8792}

Steps I have tried to fix the problem:
See Fix/change hubspot api auth by npracht · Pull Request #11470 · mautic/mautic · GitHub
Tested in firefox and chrome
tried the chrome console

How can I find usefull informatioin what causes this?

Please post the actual logs from your Mautic logs folder - without that nobody can assist you with troubleshooting what might be the problem.

It will be in var/logs in your Mautic instance. Just the bit related to Hubspot and the error is what is needed.

Update:
Now the popup shows. Butt every button (cancel, save, save and close) leads to an interner server error 500

Update:
I am able to open and edit the plugins sugarcrm, vtiger crm

Could this be related to Problems Mapping Fields in Mautic vs HubSpot Integration · Issue #4888 · mautic/mautic · GitHub
@stevedrobinson