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

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)?

enter image description here

Upvotes: 26

Views: 47548

Answers (4)

Sergey Lubeckiy
Sergey Lubeckiy

Reputation: 21

For Manifest 3 add to manifest.json:

 "host_permissions": ["*://*/*"]

Upvotes: 2

Scott C Wilson
Scott C Wilson

Reputation: 20016

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.

Upvotes: 6

asdjfiasd
asdjfiasd

Reputation: 1730

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"
],

Upvotes: 23

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.

Upvotes: 8

Related Questions