Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

unable to load my app in iframe

Solved

unable to load my app in iframe

Manishrai24
Visitor
2 0 0

I have an php codeignitor website. I wanna load my application into shopify admin iframe.  I generated the access token. And Api process is working fine (i.e i am able to create order from api, and handle products and order ). My entire process is working good but website is not open in iframe.

I dont know how to set content security policy frame ansector.

I am unable to intigrate  app bridge with my CI Application.

I read the app-bridge documentation properly. 

i got the following error:-

1) Refused to frame 'http://localhost/' because it violates the following Content Security Policy directive: "frame-src app.shopify.com *.shopifyapps.com *.myshopify.com *.myshopify.com https://* shopify-pos://*"

2) Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://xxxx.myshopify.com') does not match the recipient window's origin ('null')

Please help me ASAP.

Thanks in advance

Accepted Solution (1)

Jivan_Suhagiya
Shopify Partner
602 83 129

This is an accepted solution.

Hi @Manishrai24,
Are you running your app in localhost? if so it will not work with http://localhost url
You need ssl and domain name other than localhost 

If helpful then please Like and Accept Solution.
Email: suhagiyajivan1992@gmail.com
Skype: jivan.suhagiya
First kind of Checkout Reminder APP: https://apps.shopify.com/checkout-reminder

View solution in original post

Replies 2 (2)

Jivan_Suhagiya
Shopify Partner
602 83 129

This is an accepted solution.

Hi @Manishrai24,
Are you running your app in localhost? if so it will not work with http://localhost url
You need ssl and domain name other than localhost 

If helpful then please Like and Accept Solution.
Email: suhagiyajivan1992@gmail.com
Skype: jivan.suhagiya
First kind of Checkout Reminder APP: https://apps.shopify.com/checkout-reminder
Manishrai24
Visitor
2 0 0

thanku @Jivan_Suhagiya 

Yes , i  m running my app on localhost.

Let me upload my code to the server , then i will check that it is working fine or not.