# Hubspot sync not working and generating errors

**URL:** <https://forum.mautic.org/t/hubspot-sync-not-working-and-generating-errors/7073>\
**Category:** Product Support\
**Created:** [January 6, 2017, 3:00pm UTC](https://forum.mautic.org/t/hubspot-sync-not-working-and-generating-errors/7073 "2017-01-06T15:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickbuc](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nickbuc](https://forum.mautic.org/u/nickbuc)\
**Post date:** [January 6, 2017, 3:00pm UTC](https://forum.mautic.org/t/hubspot-sync-not-working-and-generating-errors/7073/1 "2017-01-06T15:00:00Z")

</div>

I am really happy to see that Hubspot sync is now 2-way.  
  
I have no issues importing contacts or companies from Hubspot to Mautic, but I have problems exporting from Mautic to Hubspot and get an error.  
  
  
  
Any suggestion on what to do?  
  
  
  
I have setup the webhook, mapped all the fields and created 2 CRON jobs:  
  
45 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php /opt/bitnami/apps/mautic/htdocs/app/console mautic:integration:fetchleads --integration=Hubspot”  
  
50 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php /opt/bitnami/apps/mautic/htdocs/app/console mautic:integration:pushleadactivity --integration=Hubspot”  
  
  
  
When I activate the CRON jobs manually I get the following:  
  
PHP Notice: Undefined index: vid-offset in /opt/bitnami/apps/mautic/htdocs/plugins/MauticCrmBundle/Integration/HubspotIntegration.php on line 320  
  
PHP Notice: Undefined index: time-offset in /opt/bitnami/apps/mautic/htdocs/plugins/MauticCrmBundle/Integration/HubspotIntegration.php on line 321  
  
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 14 bytes) in /opt/bitnami/apps/mautic/htdocs/app/bundles/PluginBundle/Integration/AbstractIntegration.php on line 485

---

<div class="post-metadata">

**Author:** ![nickbuc](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nickbuc](https://forum.mautic.org/u/nickbuc)\
**Post date:** [January 6, 2017, 3:00pm UTC](https://forum.mautic.org/t/hubspot-sync-not-working-and-generating-errors/7073/2 "2017-01-06T15:00:00Z")

</div>

I am really happy to see that Hubspot sync is now 2-way.  
I have no issues importing contacts or companies from Hubspot to Mautic, but I have problems exporting from Mautic to Hubspot and get an error.

Any suggestion on what to do?

I have setup the webhook, mapped all the fields and created 2 CRON jobs:  
45 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php /opt/bitnami/apps/mautic/htdocs/app/console mautic:integration:fetchleads --integration=Hubspot”  
50 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php /opt/bitnami/apps/mautic/htdocs/app/console mautic:integration:pushleadactivity --integration=Hubspot”

When I activate the CRON jobs manually I get the following:  
PHP Notice: Undefined index: vid-offset in /opt/bitnami/apps/mautic/htdocs/plugins/MauticCrmBundle/Integration/HubspotIntegration.php on line 320  
PHP Notice: Undefined index: time-offset in /opt/bitnami/apps/mautic/htdocs/plugins/MauticCrmBundle/Integration/HubspotIntegration.php on line 321  
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 14 bytes) in /opt/bitnami/apps/mautic/htdocs/app/bundles/PluginBundle/Integration/AbstractIntegration.php on line 485

---

<div class="post-metadata">

**Author:** ![nickbuc](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nickbuc](https://forum.mautic.org/u/nickbuc)\
**Post date:** [January 9, 2017, 3:02am UTC](https://forum.mautic.org/t/hubspot-sync-not-working-and-generating-errors/7073/3 "2017-01-09T03:02:58Z")

</div>

Would anybody have an idea of how to resolve my sync problem from Mautic to Hubspot?

Thanks!!!

---

<div class="post-metadata">

**Author:** ![nickbuc](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nickbuc](https://forum.mautic.org/u/nickbuc)\
**Post date:** [January 10, 2017, 10:12pm UTC](https://forum.mautic.org/t/hubspot-sync-not-working-and-generating-errors/7073/4 "2017-01-10T22:12:42Z")

</div>

@MxyzptlkFishStix Thanks a lot for your answers! Really appreciate.

I can only get the Hubspot integration working one way, from Hubspot to Mautic, but not from Mautic to Hubspot.  
I have the push to contact integration in the campaign, setup the 2 CRON jobs and increased the memory in php.ini… But

I still get the same errors when I trigger the cron jobs manually:  
I get many (depending on the memory allocated):  
PHP Notice: Undefined index: vid-offset in /opt/bitnami/apps/mautic/htdocs/plugins/MauticCrmBundle/Integration/HubspotIntegration.php on line 320  
PHP Notice: Undefined index: time-offset in /opt/bitnami/apps/mautic/htdocs/plugins/MauticCrmBundle/Integration/HubspotIntegration.php on line 321  
Until I get:  
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 72 bytes) in /opt/bitnami/apps/mautic/htdocs/app/bundles/PluginBundle/Integration/AbstractIntegration.php on line 485
