5

I'm trying to resolve a bug, but i can't.

My problem is : In my phonegap application, i need to integrate an iframe (I can't give my url for safety reasons). My iframe is displayed but i have an error message.

The iframe try to setCookies on the device and read it. If i launch the iframe on safari directly or if i use InAppBrowser of Phonegap, i have no problem/error. But through phonegap "iframe", I get an error.

The log are :

Blocked a frame with origin "http:// URL_IFRAME:NUMBER_PORT" from accessing a frame with origin "file://". The requesting access has a protocol of "http", the frame being accessed has a protocol of "file". Protocols must match.

I hope to be fairly accurate. Thks

David Pope
  • 6,457
  • 2
  • 35
  • 45
Chéramy Alexandre
  • 444
  • 3
  • 8
  • 25
  • Take a look: http://stackoverflow.com/questions/19837354/chrome-blocks-different-origin-requests – Ilan Frumer Jan 20 '14 at 15:14
  • Thank you for the link, but the subject deals with a problem of cross-origin content. My iframe is displayed, co I am not sure that is the problem. I have an error from javascript : "Unexepected exception in logging detection, using default: TypeError: 'undefined' is not an object". – Chéramy Alexandre Jan 20 '14 at 15:31
  • Different protocols ( `http` / `file` ) are the worst case of cross-origin content. – Ilan Frumer Jan 20 '14 at 15:33
  • Ok, but if i have a cross-origin content problem : the iframe isnt displayed ? – Chéramy Alexandre Jan 20 '14 at 15:54
  • 1
    yes , `Blocked a frame with origin` : It cannot be more clear – Ilan Frumer Jan 20 '14 at 15:58
  • I'm agree with you, but when i launch my function i have in my console log this error "Blocked a frame with..." and a popup message "Unexepected except...." but when i clicke on the OK button from the popupr the frame is correctly displayed!. So what is wrong ? In any case, thank you for your answers – Chéramy Alexandre Jan 20 '14 at 16:03
  • If you have config file , add this ``. – byJeevan Jul 09 '14 at 14:45

0 Answers0