# IOError during CRM Extension data-fetch

**URL:** <https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [November 21, 2018, 4:42am UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523 "2018-11-21T04:42:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cameroncollecti](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cameroncollecti/32/76053_2.png) [@cameroncollecti](https://community.hubspot.com/u/cameroncollecti)\
**Post date:** [November 21, 2018, 4:42am UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/1 "2018-11-21T04:42:07Z")

</div>

I have a CRM Extension trying to load when a contact page is being opened in a test hub, and I’m not seeing my data-fetch uri being requested. In the monitoring section of my developer account, I see an IOError. I can copy paste the request in my browser and I see the request.

Any help would be appreciated.

[

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/4/5469debf49dbbc8cf873be984f3d9df34b3da824.png)

Screen Shot 2018-11-20 at 11.23.21 PM.png2714x1164 283 KB

]([https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/6/699fc28e35f02571e0f0adb44ab0cf9ddcf8ecb2.png](https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/6/699fc28e35f02571e0f0adb44ab0cf9ddcf8ecb2.png))

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [November 21, 2018, 9:05pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/2 "2018-11-21T21:05:33Z")

</div>

Hi [@cameroncollective](https://community.hubspot.com/u/cameroncollective), happy to help! Taking a look at your [App Monitoring](https://app.hubspot.com/developer/5150131/application/184091/monitoring/crm-extensions) section in your dev portal, I’m able to see the request here: [https://srv1.cameroncollective.com/learning\_api/fetch](https://srv1.cameroncollective.com/learning_api/fetch) for [this contact](https://app.hubspot.com/contacts/5150144/contact/806?interaction=note) (and all others) is failing. When I go to that URL, I’m unable to get to any data as there’s a 502 Bad Gateway error.

In order to fix this error, there needs to be an object returned back from your servers, otherwise you’ll get this IO Error.

---

<div class="post-metadata">

**Author:** ![cameroncollecti](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cameroncollecti/32/76053_2.png) [@cameroncollecti](https://community.hubspot.com/u/cameroncollecti)\
**Post date:** [November 22, 2018, 6:04am UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/3 "2018-11-22T06:04:28Z")

</div>

Since I’m still developing I don’t leave the server running so I don’t expose any security holes, that’s why you get the 502.

When it is up and I load a contact page, I don’t see the data-fetch request from Hubspot. If it helps I can leave a static object up to be returned for you to investigate. I will try and get this done over the holiday.

Thanks for your quick response.

---

<div class="post-metadata">

**Author:** ![cameroncollecti](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cameroncollecti/32/76053_2.png) [@cameroncollecti](https://community.hubspot.com/u/cameroncollecti)\
**Post date:** [November 22, 2018, 7:59am UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/4 "2018-11-22T07:59:54Z")

</div>

Hey [@Connor\_Barley](https://community.hubspot.com/u/connor_barley) I left the server running and it will return a fairly static object to the data-fetch request.

After poking around a bit, I still don’t see the request hitting nginx, However with tcpdump, I see traffic from you guys trying to open a SSL/TLS connection. My guess is that you guys don’t like my SSL certificate signed by [Let’s Encrypt CA](https://letsencrypt.org/)?

---

<div class="post-metadata">

**Author:** ![cameroncollecti](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cameroncollecti/32/76053_2.png) [@cameroncollecti](https://community.hubspot.com/u/cameroncollecti)\
**Post date:** [November 24, 2018, 4:02am UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/5 "2018-11-24T04:02:54Z")

</div>

I switched my cert to Comodo, and I’m still getting the same IOError, so I still must be doing something dumb.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 26, 2018, 6:37pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/6 "2018-11-26T18:37:54Z")

</div>

I have this extact issue.

Is it appropriate to address here, or should I create a new issue?

As a side note, when I copy the URL from the Monitoring \> CRM Extensions tab, and invoke via curl/browser/postman - I get json.

```auto
{
	"results": [
	 {
		"objectId": 245,
		"title": "testages",
		"reported_by": "msmith@hubspot.com",
		"reporter_type": "Account Manager",
		"ticket_type": "Bug"
	 }
	 ],
	 "settingsAction": {
		"type": "IFRAME",
		"width": 890,
		"height": 748,
		"uri": "https://example.com/settings-iframe-contents",
		"label": "Settings"
	 },
	 "primaryAction": {
		"type": "IFRAME",
		"width": 890,
		"height": 748,
		"uri": "https://example.com/create-iframe-contents",
		"label": "Create Ticket"
	 }
	}

```

I set my object type up to contain properties for reported\_by/reporter\_type/ticket\_type.

Is there any other documentation on the structure/required properties of “object types”?

Is there any other resource to debug the integration? or a way to get a more detailed failure?

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [November 26, 2018, 6:46pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/7 "2018-11-26T18:46:54Z")

</div>

Hi [@cameroncollective](https://community.hubspot.com/u/cameroncollective), I’m still looking into this to see what’s going on. I don’t think this has to do with your SSL cert. I’m looking to see if there’s something with the format of your JSON data, but I’m still checking. [@Kevin\_Griffin](https://community.hubspot.com/u/kevin_griffin), what is your App id so I can take a look?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 26, 2018, 6:54pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/8 "2018-11-26T18:54:06Z")

</div>

This is my app ID 184159

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [November 26, 2018, 7:58pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/9 "2018-11-26T19:58:02Z")

</div>

Hi [@Kevin\_Griffin](https://community.hubspot.com/u/kevin_griffin) can you try changing the URIs of the data that comes back to be one of your baseURI’s to see if this fixes your issue?

[@cameroncollective](https://community.hubspot.com/u/cameroncollective), it looks like your data is stringified when I go to your fetch URL, can you make the data that gets returned just be JSON, rather than the stringified version of your JSON object?

---

<div class="post-metadata">

**Author:** ![cameroncollecti](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cameroncollecti/32/76053_2.png) [@cameroncollecti](https://community.hubspot.com/u/cameroncollecti)\
**Post date:** [November 27, 2018, 4:04am UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/10 "2018-11-27T04:04:38Z")

</div>

Hey [@Connor\_Barley](https://community.hubspot.com/u/connor_barley) My test app is now returning a JSON object with the correct mime type etc. and not a JSON-like string.

Here is why I think it’s a cert\CA issue.

[

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/0/e0c9d1713d001aa321a919a08f04bf94da93c7ef.jpeg)

Screen Shot 2018-11-26 at 11.10.31 PM.jpg3104x1978 854 KB

]([https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/0/0952cb522c7200dbdc8af7f6ed5dcaed28914785.jpeg](https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/0/0952cb522c7200dbdc8af7f6ed5dcaed28914785.jpeg))

This is a packet capture on my server when I open a contact’s detail page triggering the data-fetch call.

I would have guess that was the issue with the Let’s Encrypt cert, but this is a legit Comodo cert.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 26, 2018, 8:49pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/11 "2018-11-26T20:49:52Z")

</div>

[@Connor\_Barley](https://community.hubspot.com/u/connor_barley) I still receive IOError.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 26, 2018, 8:50pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/12 "2018-11-26T20:50:26Z")

</div>

Do those actions need to map to valid endpoints?  
I can remove them, I was just using the sample.

I updated the endpoint to omit actions entirely, just returning

```auto
{
	"results": [
	 {
		"objectId": 245,
		"title": "testages",
		"reported_by": "msmith@hubspot.com",
		"reporter_type": "Account Manager",
		"ticket_type": "Bug"
	 }]
	}

```

Still IOError

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [November 27, 2018, 5:04pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/13 "2018-11-27T17:04:21Z")

</div>

Hi [@Kevin\_Griffin](https://community.hubspot.com/u/kevin_griffin), taking a closer look at your fetch URL, there’s definitely something strange going on. When I make a GET request to [https://sleipnir.scoir.rocks/api/three-eyed-raven/test](https://sleipnir.scoir.rocks/api/three-eyed-raven/test) in Postman, I don’t get any response back. I deployed a simple app to mirror yours up to Heroku and was able to get 200 responses on all object types in HubSpot. You can find the app here: [https://obscure-cliffs-47038.herokuapp.com/](https://obscure-cliffs-47038.herokuapp.com/)

The only difference I can see between your app and mine is that if you check the Network on your webpage and look at the response, your JSON is formatted like this:

![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/3/23d30dbcd42098e655fb3e6cc3dc555cbddf75a4.png) [Lightshot](https://prnt.sc/lnoy25)

 ![6c075025f801acc4fc7be79fea9cef43c39b4579.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/c/6c075025f801acc4fc7be79fea9cef43c39b4579.png)

### [Screenshot](https://prnt.sc/lnoy25)

Captured with Lightshot

Whereas mine looks like this:

![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/3/23d30dbcd42098e655fb3e6cc3dc555cbddf75a4.png) [Lightshot](https://prnt.sc/lnoydh)

 ![cefebdb9333370439bf49244908f606fbd2b2a9a.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/e/cefebdb9333370439bf49244908f606fbd2b2a9a.png)

### [Screenshot](https://prnt.sc/lnoydh)

Captured with Lightshot

I also made your app have the same base URI structure as mine. Here’s what my HubSpot app looks like:  
 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/3/23d30dbcd42098e655fb3e6cc3dc555cbddf75a4.png) [Lightshot](https://prnt.sc/lnp1ps)

 ![d74779bb11a4fc0882b8ba72c25c5d0d9feb6bbd.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/7/d74779bb11a4fc0882b8ba72c25c5d0d9feb6bbd.png)

### [Screenshot](https://prnt.sc/lnp1ps)

Captured with Lightshot

could it be something as simple as some sort of typo on your end? Here’s my simple app in Github as well: [https://github.com/cbarley10/hubspot-crm-extensions](https://github.com/cbarley10/hubspot-crm-extensions)

I can keep digging in with my team, but thought I’d share my findings with you first.

[@cameroncollective](https://community.hubspot.com/u/cameroncollective), I’m still investigating your issue

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 27, 2018, 7:40pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/14 "2018-11-27T19:40:40Z")

</div>

[@Connor\_Barley](https://community.hubspot.com/u/connor_barley) looks like it’s the let’s encrypt certs for us.

I had SSL verification off in postman, if I turn it on - it fails.  
If I turn it off, it works, Chrome etc think the cert is valid though.

Also greatly appreciate you digging in  
 ![slight_smile.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/3/33fb2a14544119c2351fe774141779702299e6a6.png)

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [November 27, 2018, 7:50pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/15 "2018-11-27T19:50:58Z")

</div>

Got it [@Kevin\_Griffin](https://community.hubspot.com/u/kevin_griffin), so you’re all set now? Glad I could help. If I could now flip the tables on **you** , how were you able to disable the SSL verification in Postman? I’m not aware of where to find that setting!

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 27, 2018, 8:08pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/16 "2018-11-27T20:08:36Z")

</div>

Turn SSL verification off:

Settings \> General \> SSL verification

[

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/1/b19210ac35b040046cf28cb07e52669f17df9b70.jpeg)

settings.jpeg1920x1080 93.4 KB

]([https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/0/052080412d618a798769cc690ef595ae550a9492.jpeg](https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/0/052080412d618a798769cc690ef595ae550a9492.jpeg))

Sadly though, no, not sorted.

We’re thinking maybe something is wrong with the cert chain. Not sure you guys can help us, we’re investigating on our side. I follow up if we resolve it, hopefully it will help others in the future with cert issues.

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [November 27, 2018, 7:52pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/17 "2018-11-27T19:52:11Z")

</div>

Nevermind, I found it

. Should’ve googled a bit more

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [November 27, 2018, 8:06pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/18 "2018-11-27T20:06:21Z")

</div>

[@cameroncollective](https://community.hubspot.com/u/cameroncollective), I was able to make a successful GET request to your URL ([https://srv1.cameroncollective.com/learning\_api/fetch](https://srv1.cameroncollective.com/learning_api/fetch)) here when SSL certificate verification was **turned off** as [@Kevin\_Griffin](https://community.hubspot.com/u/kevin_griffin) mentioned, so your hunch about the certificate is probably right. I’m going to get clarification from the CRM extensions team so that I can provide more details on what we require for SSL certs.

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [November 27, 2018, 8:20pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/19 "2018-11-27T20:20:24Z")

</div>

Got it. I included more details on the info i gave to our developers so I hope they can clarify what the restrictions are on the certs we accept, if there are any restrictions. Hope to get back to you as soon as possible

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 27, 2018, 8:27pm UTC](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523/20 "2018-11-27T20:27:47Z")

</div>

[@Connor\_Barley](https://community.hubspot.com/u/connor_barley), we got it.

So, the way we automatically provision certs was missing the addition of intermediate certs, so the cert chain was not “complete” enough for postman / curl (but apparently for chrome ?).

[SSL Server Test (Powered by Qualys SSL Labs)](https://www.ssllabs.com/ssltest/index.html) pointed out that deficiency.

we manually re-provisioned the certs (in gcloud for us) and all is well.

As you’ll see if you check our monitoring page, we got our first 200.

Greatly appreciate the help.

[Next page](https://community.hubspot.com/t/ioerror-during-crm-extension-data-fetch/11523.md?page=2)
