Unable to connect to Kodi in Chrome Canary
See original GitHub issueSymptom
In Google Chrome Canary (version 59.0.3059.0, 64-bit, OS X), trying to play a video has no effect; opening the extension pop-up shows the message “Unable to connect to Kodi”.
Cause
Chrome is phasing out support for sending credentials in the URL - viewing the extension’s console messages shows the following warning:
[Deprecation] Subresource requests whose URLs contain embedded credentials (e.g. `https://user:pass@host/`) are blocked. See https://www.chromestatus.com/feature/5669008342777856 for more details.
I know that this extension isn’t directly doing this, but it seems that you’re getting caught up in the change anyway. This results in all your calls to ajaxPost being blocked with an origin error:
Workaround
I’ve found a workaround for a specific case - if the user isn’t using authentication, getCredentials() currently returns [“anonymous”,“”]. Changing this to return [null,null] allows the request to be sent and the extension to function as normal.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (7 by maintainers)
Top GitHub Comments
Nope, Google has actually changed their mind on this, thankfully!
As described in https://bugs.chromium.org/p/chromium/issues/detail?id=707761#c31, they’re allowing credentials to be used in XHR going forward - the changes have already landed in Chrome Canary.
That issue isn’t closed yet so I suppose they could change their mind again, but unless that happens we should be able to consider this issue fixed 😃
Running Canary 60.0.3076.0 built 4/20 and it works! Awesome fix that I guess required zero work 😉