Why am I getting this error chrome-extension://invalid - javascript

I am facing a wierd problem accessing the Chromecast extension in Chrome.
I made a web page and when the user press connect it call the Cast Api and open the dialog to connect to a Chromecast.
In some pcs it doesn't work the error that appears is:
chrome-extension://invalid Failed to load resource: net::ERR_FAILED
The error just occurs in Windows in non administrator accounts.
I thought it was the proxy, or the company network firewall, but it wasn't we tested without the proxy and the error occurs.
If the account is a Windows Administrator it works!
My guess is that the Chrome or Windows is blocking the access to the extension because is a javascript calling the cast.js and the cast.js calls extension (Maybe CORS).
My website has https. I set in Internet Options as a trusted site.
In old Chromes the error is different:
GET chrome-extension://pkedcjkdefgpdelpbcmbmeomcjbeemfm/cast_sender.js
net::ERR_FAILED
Does anyone know how to fix it(chrome-extension://invalid)?

In my case when I played audio sound/beep.ogg, it worked but console contained same error. I solved it by adding it to web_accessible_resources in manifest.json:
"web_accessible_resources": [
"tileset/*.json", "layer/*.json", "sound/*.ogg"
],

I discovered what happened.
The corporate network is protected by their proxy.
We monitored the calls and discovered that:
The cast lib tries to call the cast extension "pkedcjkdefgpdelpbcmbmeomcjbeemfm", which is not installed at %appdata% folder.
The Chrome tries to download it at: gvt1.com and the network blocked this domain. After talking to the network administrator, we released the domain and it worked.

Sometimes this happens because of a failed extension. If you go to the Network Tab in Chrome Developer tools, and hover over the Initiator column on the line showing invalid in red, you'll see something like
chrome-extension://jjfblogammkiefalfpafidabbnamoknm ...
Then go to the Extensions page for Chrome, and you'll see an extension with that ID. Disable or Remove that extension.

Related

CORS still enforced after disabling Chrome web security?

I'm trying to grab data from one website and use it to write something into another website (using JQuery/Javascript). Understandably, the same origin rules weren't going to let that happen, but I figured disabling web security/CORS on my browser should fix that problem. For some reason, I can't get the policy disabled in Chrome, and I can't figure out why.
I've tried launching Chrome with --disable-web-security --user-data-dir=
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="C:\Users\<username>\Desktop\chromeTemp"
I expected to be able to open a new tab, access 'document' in the console, and find a link I want to 'click', but instead I got
VM186:1 Uncaught DOMException: Blocked a frame with origin <url> from accessing a cross-origin frame.
I thought this would no longer be blocked?
Looks like there might be an open bug for this, possibly try an older chrome version.
https://bugs.chromium.org/p/chromium/issues/detail?id=840124
See Last Comment on workaround:
"The workaround is to download an old version of Chrome as a portable app : https://sourceforge.net/projects/portableapps/files/Google%20Chrome%20Portable/ (version 66.0.3359.181 still works). It's the one I use when I'm developing..."

how to get load my site from server without clean storage in browser console?

I am working on angularjs web application, after hosted web application to server then not working perfectly.
whenever clear the browser console then only my site working perfectly, and following error is there in my console
Failed to load resource: net::ERR_CONNECTION_RESET
If I login and logout from my site then hit the reload button then same problem only images are loading, So here again have to
clear the storage in browser console then it will work fine.
why it is happening, every time irritating me any other solution is there please help me.
Different ways to look into this issue :
start Chrome in incognito mode with extensions disabled (ctrl+shift+n) and see if your page works now. Note that by default all extensions will be already disabled in incognito mode unless you've specifically set them to run (via chrome://extensions).
Reference : https://stackoverflow.com/a/9590757/4116300
If you are requesting the resources over SSL it is likely the certificate is invalid. Either it is self-signed and has not been added to your browser/OS exceptions or it is otherwise invalid.
Try the URI directly in the same browser and inspect the certificate.
Reference : https://stackoverflow.com/a/22083823/4116300

www-embed-player.js:150 GET chrome-extension://eojlgccfgnjlphjnlopmadngcgmmdgpk/cast_sender.js net::ERR_FAILED [duplicate]

I'm having an error running Chromecast sender in Chrome Incognito or if Chromecast extension is not installed:
Failed to load resource: net::ERR_ADDRESS_UNREACHABLE chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js
Failed to load resource: net::ERR_ADDRESS_UNREACHABLE chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/cast_sender.js
Failed to load resource: net::ERR_ADDRESS_UNREACHABLE chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/cast_sender.js
Failed to load resource: net::ERR_ADDRESS_UNREACHABLE chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js
Failed to load resource: net::ERR_ADDRESS_UNREACHABLE chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js
No cast extension found
Google cast sender is trying to send AJAX requests for local "cast_sender.js". Should this happen or is there a better way to check if Chromecast sender extension exists (not by requesting AJAX request)?
I believe these AJAX requests are a way of asking if Chromecast extension exists. Is there a better way to check if Chromecast extension exists?
Update: After several attempts, it looks like this may have been fixed in latest Chrome builds (per Paul Irish's comment below). That would suggest we will see this fixed in stable Chrome June-July 2016. Let's see ...
This is a known bug with the official Chromecast JavaScript library. Instead of failing silently, it dumps these error messages in all non-Chrome browsers as well as Chrome browsers where the Chromecast extension isn't present.
The Chromecast team have indicated they won't fix this bug.
If you are a developer shipping with this library, you can't do anything about it according to Chromecast team. You can only inform users to ignore the errors. (I believe Chromecast team is not entirely correct as the library could, at the least, avoid requesting the extension scipt if the browser is not Chrome. And I suspect it could be possible to suppress the error even if it is Chrome, but haven't tried anything.)
If you are a user annoyed by these console messages, you can switch to Chrome if not using it already. Within Chrome, either:
Install the Chromecast extension from here.
Configure devtools to hide the error message (see David's answer below).
Update [Nov 13, 2014]: The problem has now been acknowledged by Google. A member of the Chromecast team seems to suggest the issue will be bypassed by a change the team is currently working on.
Update 2 [Feb 17, 2015]: The team claim there's nothing they can do to remove the error logs as it's a standard Chrome network error and they are still working on a long-term fix. Public comments on the bug tracker were closed with that update.
Update 3 [Dec 4, 2015]: This has finally been fixed! In the end, Chrome team simply added some code to block out this specific error. Hopefully some combination of devtools and extensions API will be improved in the future to make it possible to fix this kind of problem without patching the browser. Chrome Canary already has the patch, so it should roll out to all users around mid-January. Additionally, the team has confirmed the issue no longer affects other browsers as the SDK was updated to only activate if it's in Chrome.
Update 4 (April 30): Nope, not yet anyway. Thankfully Google's developer relations team are more aware than certain other stakeholders how badly this has affected developer experience. More whitelist updates have recently been made to clobber these log messages. Current status at top of the post.
If you want to temporarily get rid of these console errors (like I did) you can install the extension here: https://chrome.google.com/webstore/detail/google-cast/boadgeojelhgndaghljhdicfkmllpafd/reviews?hl=en
I left a review asking for a fix. You can also do a bug report via the extension (after you install it) here. Instructions for doing so are here: https://support.google.com/chromecast/answer/3187017?hl=en
I hope Google gets on this. I need my console to show my errors, etc. Not theirs.
How about filtering these errors ?
With the regex filter bellow, we can dismiss cast_sender.js errors :
^((?!cast_sender).)*$
Do not forget to check Regex box.
Another quick solution is to "Hide network messages".
i know it is not the best solution, but the only one supposed solution that i have read for all the web is to install chrome cast extension, so, i've decide, not to put the iframe into the website, i just insert the thumnail of my video from youtube like in this post explain.
and here we have two options:
1) Target the video to the channel and play it there
2) Call the video via ajax, like explain here (i've decided for this one) in a colorbox or any another plugin.
and like this, i prevent the google cast sender error make my site slow
By default Chrome extensions do not run in Incognito mode. You have to explicitly enable the extension to run in Incognito.

Google Chromecast sender error if Chromecast extension is not installed or using incognito

I'm having an error running Chromecast sender in Chrome Incognito or if Chromecast extension is not installed:
Failed to load resource: net::ERR_ADDRESS_UNREACHABLE chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js
Failed to load resource: net::ERR_ADDRESS_UNREACHABLE chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/cast_sender.js
Failed to load resource: net::ERR_ADDRESS_UNREACHABLE chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/cast_sender.js
Failed to load resource: net::ERR_ADDRESS_UNREACHABLE chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js
Failed to load resource: net::ERR_ADDRESS_UNREACHABLE chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js
No cast extension found
Google cast sender is trying to send AJAX requests for local "cast_sender.js". Should this happen or is there a better way to check if Chromecast sender extension exists (not by requesting AJAX request)?
I believe these AJAX requests are a way of asking if Chromecast extension exists. Is there a better way to check if Chromecast extension exists?
Update: After several attempts, it looks like this may have been fixed in latest Chrome builds (per Paul Irish's comment below). That would suggest we will see this fixed in stable Chrome June-July 2016. Let's see ...
This is a known bug with the official Chromecast JavaScript library. Instead of failing silently, it dumps these error messages in all non-Chrome browsers as well as Chrome browsers where the Chromecast extension isn't present.
The Chromecast team have indicated they won't fix this bug.
If you are a developer shipping with this library, you can't do anything about it according to Chromecast team. You can only inform users to ignore the errors. (I believe Chromecast team is not entirely correct as the library could, at the least, avoid requesting the extension scipt if the browser is not Chrome. And I suspect it could be possible to suppress the error even if it is Chrome, but haven't tried anything.)
If you are a user annoyed by these console messages, you can switch to Chrome if not using it already. Within Chrome, either:
Install the Chromecast extension from here.
Configure devtools to hide the error message (see David's answer below).
Update [Nov 13, 2014]: The problem has now been acknowledged by Google. A member of the Chromecast team seems to suggest the issue will be bypassed by a change the team is currently working on.
Update 2 [Feb 17, 2015]: The team claim there's nothing they can do to remove the error logs as it's a standard Chrome network error and they are still working on a long-term fix. Public comments on the bug tracker were closed with that update.
Update 3 [Dec 4, 2015]: This has finally been fixed! In the end, Chrome team simply added some code to block out this specific error. Hopefully some combination of devtools and extensions API will be improved in the future to make it possible to fix this kind of problem without patching the browser. Chrome Canary already has the patch, so it should roll out to all users around mid-January. Additionally, the team has confirmed the issue no longer affects other browsers as the SDK was updated to only activate if it's in Chrome.
Update 4 (April 30): Nope, not yet anyway. Thankfully Google's developer relations team are more aware than certain other stakeholders how badly this has affected developer experience. More whitelist updates have recently been made to clobber these log messages. Current status at top of the post.
If you want to temporarily get rid of these console errors (like I did) you can install the extension here: https://chrome.google.com/webstore/detail/google-cast/boadgeojelhgndaghljhdicfkmllpafd/reviews?hl=en
I left a review asking for a fix. You can also do a bug report via the extension (after you install it) here. Instructions for doing so are here: https://support.google.com/chromecast/answer/3187017?hl=en
I hope Google gets on this. I need my console to show my errors, etc. Not theirs.
How about filtering these errors ?
With the regex filter bellow, we can dismiss cast_sender.js errors :
^((?!cast_sender).)*$
Do not forget to check Regex box.
Another quick solution is to "Hide network messages".
i know it is not the best solution, but the only one supposed solution that i have read for all the web is to install chrome cast extension, so, i've decide, not to put the iframe into the website, i just insert the thumnail of my video from youtube like in this post explain.
and here we have two options:
1) Target the video to the channel and play it there
2) Call the video via ajax, like explain here (i've decided for this one) in a colorbox or any another plugin.
and like this, i prevent the google cast sender error make my site slow
By default Chrome extensions do not run in Incognito mode. You have to explicitly enable the extension to run in Incognito.

Javascript web application does not show certificate not trusted in Chrome

I have an application using https to do a jsonp call on my server which is self signed.
If I use the corresponding url in the Chrome address bar, then a warning is showing with 'The site's security certificate is not trusted!'. There the user can proceed anyway.
Now in my web application, there is no such warning and the request just remains pending indefinitely. I can see that in Developer tools. I would expect having something showing on chrome similar to the above behavior.
Chrome version is currently 25.0.1364.172.
Is this normal?
What should I do to address this problem?
Thanks!
Unfortunately this is normal. Try to browse via firefox, backup the Certificate and install it in Chrome again.

Categories

Resources