Chrome Extension Error - Website with Youtube embed video [duplicate] - google-chrome

I recently started receiving the following console errors, without any code changes taking place.
I did not install any extensions recently.
Failed to load resource: net::ERR_FAILED chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js
Failed to load resource: net::ERR_FAILED chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/cast_sender.js
Failed to load resource: net::ERR_FAILED chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js
Failed to load resource: net::ERR_FAILED chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js
Failed to load resource: net::ERR_FAILED
I have several YouTube player embeds on the page that are triggering this error, but they are simple:
<iframe width="100%" height="100%" src="http://www.youtube.com/embed/OUR_YOUTUBE_ID?showinfo=0&wmode=transparent" frameborder="0" allowfullscreen=""></iframe>
Has anybody else experienced this?

Apparently YouTube constantly polls for Google Cast scripts even if the extension isn't installed.
From one commenter:
... it appears that Chrome attempts to get cast_sender.js on pages that have YouTube content. I'm guessing when Chrome sees media that it can stream it attempts to access the Chromecast extension. When the extension isn't present, the error is thrown.
Read more
The only solution I've come across is to install the Google Cast extension, whether you need it or not. You may then hide the toolbar button.
For more information and updates, see this SO question. Here's the official issue.

I'm going to add to the answer given before.
It's not a bug in your code or the browser's code. It's the JavaScript code inside the YouTube iframe polls for the extensions it could interoperate with in case they were installed (likely to determine if the extension is installed).
Look at the source of www-embed-player.js (loaded from s.ytimg.com, it's YouTube static files CDN).
You'll find the following:
function Wj(a){return"chrome-extension://"+a+"/cast_sender.js"}

To stop seeing those cast_sender.js errors, edit the youtube link in the iframe src and change embed to v

The error is try to fix a Youtube error.
The solution to avoid your Javascript-Console-Error complex is to accept that Youtube (and also other webpages) can have Javascript errors that you can't fix.
That is all.

A simple fix for this is to install the Google Cast extension. If you don't have a Chromecast, or don't want to use the extension, no problem; just don't use the extension.

In addition to what was already said - in order to avoid this error from interfering (stopping) other Javascript code on your page, you could try forcing the YouTube iframe to load last - after all other Javascript code is loaded.

Related

chrome failed to load spotfire link

I am currently displaying the spotfire web player link via simple html call and it is working fine when using the Mozilla Firefox browser but if trying to load on Chrome browser it fails to load and here is the error on the web player display on the link:
Failed to load application
Could not load localized labels
Could not load configuration
And here is the simple html call:
<object data="http://myHost/spotfire/wp/render" type="text/html" style="width:100%; height:1000px;">
Alternative Content
</object>
Any suggestion/comments TIA
I wonder if it has to do with Chrome's update to block cross-site scripting.
In your console do you get any errors describing Cross-site/samesite=none errors thrown?
I had a similar issue with Chrome when using Spotfires Javascript API and it only occurred in Chrome. Here is a Post regarding it.
The overall fix was an update to the Spotfire Server setting of SameSite.
You have to setup a registry key. I have a blog post on this.
https://datashoptalk.com/use-chrome-web-player/

Chrome browser back for multiple Youtube API iframe has load wrongly

I have problem on my application with multiple youtube load in one page. I use youtube API to load the iframe.
However, in chrome found one intermittent bugs. Sometime when go to another page and click browser back, the iframe youtube will loaded wrongly.
Checked the script it was call correct youtube ID for each tag, with inspect element to check the iframe youtube ID and it also correct. But the iframe content is wrong when browser back.
Kindly advise. Thanks.
There's actually a logged issue 395791 in Chromium issues tracker, and based from that thread, a workaround to avoid this bug which already worked for some is to give each iframe a name, since the HistoryItems would get matched up correctly.

Security Popup IE8 wistia video

I had the following iframe which renders the Video.In IE8, I am getting the security popup error.
<iframe src="https://fast.wistia.com/embed/iframe/223ewe311111112?videoWidth=310&videoHeight=120&controlsVisibleOnLoad=true&playerColor=1213221&plugin%5Bsocialbar%5D%5Bversion%5D=v1&plugin%5Bsocialbar%5D%5Bbuttons%5D=email-twitter-googlePlus-facebook&plugin%5Bsocialbar%5D%5Blogo%5D=true&plugin%5Bsocialbar%5D%5BtweetText%5D=May%20to%I%20New%Help%20You%20&plugin%5Bsocialbar%5D%5BbadgeUrl%5D=https%3A%2F%2Fwistia.com&plugin%5Bsocialbar%5D%5BbadgeImage%5D=https%3A%2F%2Fprime-cdn.wistia.com%2Fdeliveries%2Fe6e6be3fsdfsdfsdfsdf7e0a69.jpg%3Fimage_crop_resized%3D100x20" target="_blank" rel="nofollow" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" width="310" height="120"></iframe>
I came to know that they updated their IFRAME API on their framework.Will it be a cause for rendering the popup in IE8 only.Using HTTPWATCH plugin in IE8,I found that all resources are rendering HTTPS only.So, because of this iframe tag only it is rendering the popup.I put this iframe tag in seperate HTML page and opened it in IE8 browser.It is showing Security popup.
First, you better get that example embed code checked out! :) It doesn't look like the iframe src is valid (it leads to a 404 page), which made this a little difficult to test. There are also some weirdnesses like target="_blank" on the iframe, which I don't think is produced by Wistia.
Anyway, I stapled the options onto a different media's embed code and I think I figured out your issue. The domain for the logo in the socialbar is what's causing the security warning.
If you upload your logo in the SuperEmbed Builder then switch to an SSL (under Embed Type > Advanced Options), it will also switch the domain of the logo to one that has a security certificate. I'm guessing that you produced a non-SSL embed, then manually switched it from http: to https:. In many cases this doesn't matter, but it does in this one unfortunately.
My recommendation is to produce the embed code directly from the SuperEmbed Builder and switch SSL on there.
What's the nature of the error you're getting? "Unsafe JavaScript attempt to access frame with URL [URL redacted] from frame with URL [URL redacted]. Domains, protocols and ports must match."
If so, there are a number of threads here at StackOverflow that also mention this error. while annoying, is extremely unlikely to be detrimental to how your site works, it's simply a symptom of having unmatched domains, ports and protocols between the iframe and page its embedded on.
So yeah, as long as the content on the page appears to be fine, you can most likely ignore that particular error.
As an alternative, try the Wistia API embed style, which you can also use SSL with--should help you avoid seeing this.

Firefox/IE10 - HTML5 Application Cache and Cookies

I have a problem with HTML5 appCache on Firefox and IE10.
I have build a minimal test case available on: https://docs.google.com/file/d/0B7CVmRJOMgTNZUxkLWRDNmhtVU0/edit?usp=sharing
Accessing the page at "applicationCache/test.html" the browser will look for the correct manifest and will start to download all the content from the files in its list.
The problem occurs when I put in the list a .php file handling COOKIES; for example I have added a .php file which will call the php function "session_start()".
Chrome and Safari can handle correctly such file during the application cache download.
Firefox and IE10 share the behaviour: they halt and signal a generic error.
During a long search I found out this ticket on bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=722683
Is there anyone who can give me a hint to handle correctly the COOKIES during applicationCache download event, without getting an error ?
Am I doing something wrong or against the standard ?
Thank you for your assistance!
I am not sure but can you make use of the localStorage instead of cookies?

Youtube https embedding causes warning in Firefox

I'm working on a site that requires a login and includes embedded Youtube videos. Because of the login, I need to get SSL working, which it largely is. I'm hitting an unexpected problem with the Youtube embeds, though. It's easy enough to point at https://www.youtube.com, but Firefox still complains that there's unencrypted content on an encrypted page. According to Firebug, the only unencrypted load was from http://[stuff].youtube.com/videoplayback?[more stuff].
Now, it's perfectly understandable that Youtube doesn't want the overhead of encrypting their video streams, and I don't think that this poses an actual security vulnerability. I just need to keep the browser happy. (I know that that warning can be disabled, of course, but I can't do that on my users' machines.) There must be a way to do this, because https://www.youtube.com itself doesn't make this error pop up, even though it uses http: for the video streams, too.
I have not seen similar errors in other browsers, but I haven't looked very hard just yet.
If it matters, my development machine doesn't have a valid SSL certificate; I just added an exception.
If you are using <iframe> use <embed> or check other embedding code options that YouTube API provides.
I have a ssl secured website and this works for me in Firefox
<iframe id="player" src="https://www.youtube.com/embed/XfI....Ctpo?enablejsapi=1&origin=https://yourdomain.com&showinfo=0&iv_load_policy=3&modestbranding=1&theme=light&color=white&rel=0" frameborder="0"></iframe>
I don't have a solution, but a suggestion instead: Are you sure not having a valid SSL certificate couldn't have something to do with this? You wouldn't think so, but you never know. If you get one, and it still doesn't work, it's not something you wouldn't have had to do anyway. I went through the process of obtaining/installing and configuring SSL key(s) and certificates for my home server, and every little thing seems to have an impact on how SSL acts/reacts.
Also, have you tried accessing the site outside of the local network it's on? It sounds like you're on the same network as the server which is hosting the site (the one that has SSL installed), which can create problems itself because of NAT traversal (I believe, but correct me if I'm wrong - we're all here to learn). Sometimes with HTTPS, you can have a problem connecting to resources within the local network, that people on the internet would have no problem at all connecting to. Just my two cents.. and sorry for any incorrect info, if I provided any. Take this all with a grain of salt, but hopefully you'll find the answer to your problem. Things like this can be a pain in the rump.
There may not be anything you can do about this, also.. because Youtube seems to not provide content over HTTPS... which is out of your control. I know you don't contest the error you're being given, and just want a workaround, however.
BTW, I think their homepage is HTTPS enabled, just not their video content...so that's why embedding the homepage wouldn't produce the error.
EDIT: Also, I see someone else wrote to use embed instead of iframes, which I would also recommend. The browser treats iframes like another page, but the error your getting indicates the unsecure content is actually combined with the secure content, so everything should be fine with that... but you never know.
Try the page with the Firefox "inspector / network ananlysis" (shift-ctrl-I) to analyze what elements are requested. I guess it's some javascript INSIDE the that you don't have under your control. In any case you should be able to pinpoint the specific trigger with this tool.
Check wheter it makes a difference when switching your browser to HTML5 instead of Flash for the video or vice versa. YouTube recently changed the default protocol to HTML5.
Is it possible by your website design that you could try fetching the youtube videos by an http call instead of an https? I don't know the layout of your site, but if you're just wanting it to stop complaining, that should do it.
That said, youtube DOES have valid https certificates, but that's due to the google integration. Since you aren't google, you wouldn't read as the valid certificate holder when accessing youtube's content (that's the exact kind of thing SSL's are meant to guard against).
So, basically, if you can, just embed via http instead of https. YOUR site can still be https, just not the call to youtube.
Please remove http then u check..
for example
<iframe id="player" src="www.youtube.com/embed/XfI....Ctpo?enablejsapi=1&origin=https://yourdomain.com&showinfo=0&iv_load_policy=3&modestbranding=1&theme=light&color=white&rel=0" frameborder="0"></iframe>
just remove ( http or https ) with colon, it will work perfectly
example
<iframe id="player" src="//www.youtube.com/embed/XfI....Ctpo?enablejsapi=1&origin=https://yourdomain.com&showinfo=0&iv_load_policy=3&modestbranding=1&theme=light&color=white&rel=0" frameborder="0"></iframe>
A much simpler way to do this is to download the video itself and then link to it locally on your server e.g save it in the same directory as your page and then just link to it there.