.ngrok.io refused to connect.

Solved
Highlighted
Tourist
8 2 2

Hello world...

1st time posting here. 
I am developing my 1st shopify app and started getting a weird `xxxxxxx.ngrok.io refused to connect.` 

This happens only when I try to display a custom form on my embedded app.
I have no idea why this is happening and no posts I have read helped so far.

Any help would be greatly appreciated.

Thank you in advance.Screenshot from 2019-06-17 00-22-46.png

1 Like
Highlighted
New Member
1 1 0

This is an accepted solution.

This happened to me and was driving me crazy for hours! I was blocking 3rd party cookies in chrome. Look for an icon with red x through a cookie in your onmnibar. 

 

third party cookies.PNG

 

If this isn't the case, take a look at the Network tab of Chrome Dev Tools.

0 Likes
Highlighted
Tourist
8 2 2
@enak thank you so much.

I will try when I am in front of a pc and let you know.
0 Likes
Highlighted
Tourist
8 2 2

This is an accepted solution.

I found the fix on this site.
My app is a Rails app and by default X-Frame-Options HTTP header value has been set as SAMEORIGIN, this allows iframing only on the same domain and prevents clickjacking.

So, in my application controller I added:

after_action :allow_shopify_iframe

private

def allow_shopify_iframe
  response.headers['X-Frame-Options'] = 'ALLOWALL'
end

 

0 Likes
Highlighted
New Member
1 0 0

download Ignore X frame headers extension.

It will work


@alexandros wrote:

Hello world...

1st time posting here. 
I am developing my 1st shopify app and started getting a weird `xxxxxxx.ngrok.io refused to connect.` 

This happens only when I try to display a custom form on my embedded app.
I have no idea why this is happening and no posts I have read helped so far.

Any help would be greatly appreciated.

Thank you in advance.Screenshot from 2019-06-17 00-22-46.png


 

0 Likes