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

**URL:** <https://forum.mautic.org/t/hubspot-api-loading-internal-server-error-500-mautic-4-4-5/26315>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [December 5, 2022, 1:27pm UTC](https://forum.mautic.org/t/hubspot-api-loading-internal-server-error-500-mautic-4-4-5/26315 "2022-12-05T13:27:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ascholten](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ascholten/32/691_2.png) [@ascholten](https://forum.mautic.org/u/ascholten)\
**Post date:** [December 5, 2022, 1:27pm UTC](https://forum.mautic.org/t/hubspot-api-loading-internal-server-error-500-mautic-4-4-5/26315/1 "2022-12-05T13:27:01Z")

</div>

**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](https://app.hubspot.com/l/api-key/) 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](http://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](https://github.com/mautic/mautic/pull/11470#)  
Tested in firefox and chrome  
tried the chrome console

How can I find usefull informatioin what causes this?

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [December 8, 2022, 1:36pm UTC](https://forum.mautic.org/t/hubspot-api-loading-internal-server-error-500-mautic-4-4-5/26315/2 "2022-12-08T13:36:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ascholten](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ascholten/32/691_2.png) [@ascholten](https://forum.mautic.org/u/ascholten)\
**Post date:** [December 8, 2022, 4:35pm UTC](https://forum.mautic.org/t/hubspot-api-loading-internal-server-error-500-mautic-4-4-5/26315/3 "2022-12-08T16:35:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ascholten](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ascholten/32/691_2.png) [@ascholten](https://forum.mautic.org/u/ascholten)\
**Post date:** [December 9, 2022, 9:41am UTC](https://forum.mautic.org/t/hubspot-api-loading-internal-server-error-500-mautic-4-4-5/26315/4 "2022-12-09T09:41:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ascholten](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ascholten/32/691_2.png) [@ascholten](https://forum.mautic.org/u/ascholten)\
**Post date:** [December 12, 2022, 2:15pm UTC](https://forum.mautic.org/t/hubspot-api-loading-internal-server-error-500-mautic-4-4-5/26315/5 "2022-12-12T14:15:22Z")

</div>

Could this be related to [Problems Mapping Fields in Mautic vs HubSpot Integration · Issue #4888 · mautic/mautic · GitHub](https://github.com/mautic/mautic/issues/4888)  
@stevedrobinson
