+ 49
How to solve "unsafe javascript attempt to access frame with url"?
For example: If I open https://code.sololearn.com/WREh3INM26Zh/#html Using my smartphone. Screenshot of error notification: https://postimg.org/image/8s5ugt1lx/ Screenshot of "about my phone": https://postimg.org/image/cyhyo13dx/ But, I checked on my "phone update center" https://postimg.org/image/6bvauulph/ It said: "already has the latest available system updates". How to solve it?
10 odpowiedzi
+ 16
search a stable custom ROM with lollipop for your device on XDA forums ( google it ).
the web view is updated with the Android version till KitKat.
after that the app is updated separately from the OS beginning with lollipop
+ 17
@Adi
I'm speaking about this app on lollipop and higher
https://play.google.com/store/apps/details?id=com.google.android.webview&hl=en
Android System WebView - Android Apps on Google Play
https://s26.postimg.org/q5wyzqw2x/Screenshot_2017-09-19-14-01-54.png
+ 14
@Adi
yes you are on older version of Android the web view is old, not the latest hence you get errors. try to share the code in chrome or Firefox will work fine there.
+ 5
please try this and tell me if it still throws the error:
https://code.sololearn.com/WQmhf35EHQJy/?ref=app
+ 4
sorry: when i first saw the question you had just submitted "How" and so I was answering that.
are you now asking how to protect your html from javascript?
+ 3
console.log("with mirrors");
+ 3
interesting - i also was not seeing a problem - great job posting error
+ 3
i *think* it thinks you are trying to do cross-site scripting (although i cannot confirm - as i too am not seeing the error)
+ 2
:( ah well, it was a longshot. maybe a different update or a different browser on your mobile?
0
Crossframe-Scripting is not possible when the two frames have different domains -> Security. This means that youtube is trying to reach out to the caller frame for some reason and it's disabled because it would be a cross-domain call.
The better solution is to change the iframe.src to a url on the same domain, but which was actually an html re-direct page to the desired domain. The other domain then showed up in your iframe without any errors.
Another solution could be to use a local file which retrieves the remote content.
http://net-informations.com/q/mis/youtube.html