PlexExternalPlayer icon indicating copy to clipboard operation
PlexExternalPlayer copied to clipboard

xmlhttp error on Firefox

Open WireCrazii opened this issue 7 years ago • 14 comments

Windows 10, Firefox 58(latest)

Plex External Player
Error getting metadata from http://192.168.10.220:32400/library/metadata/18486?checkFiles=1&includeExtras=1Error: ReferenceError: GM_xmlhttpRequest is not defined

WireCrazii avatar Feb 14 '18 14:02 WireCrazii

Hm, that's weird. Works for me on 58.0.2. Could you please doublecheck your current script? In Tampermonkey go to Dashboard, click Plex External Player and look for the // @grant GM_xmlhttpRequest line inside the ==UserScript== area. Should be similar for Greasemonkey.

My guess is it's either not granted for some reason, or that's just new Firefox vs old extensions drama. Please update Tamper/Greasemonkey and Firefox if possible, and try again.

enchained avatar Feb 14 '18 17:02 enchained

@enchained Thank you for the quick reply. All of my addons plus Firefox is up to date. And my script looks like this:

// ==UserScript==
// @name         Plex External Player
// @namespace    https://github.com/Kayomani/PlexExternalPlayer
// @version      1.15
// @description  Play plex videos in an external player
// @author       Kayomani
// @include     /^https?://.*:32400/web.*
// @include     http://*:32400/web/index.html*
// @require     http://code.jquery.com/jquery-3.2.1.min.js
// @connect     *
// @require     https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js
// @grant       GM_xmlhttpRequest
// ==/UserScript==

WireCrazii avatar Feb 15 '18 09:02 WireCrazii

What version of tampermonkey do you have?

On Thu, 15 Feb 2018, 09:22 WireCrazii, [email protected] wrote:

@enchained https://github.com/enchained Thank you for the quick reply. All of my addons plus Firefox is up to date. And my script looks like this:

// ==UserScript== // @name Plex External Player // @namespace https://github.com/Kayomani/PlexExternalPlayer // @version 1.15 // @description Play plex videos in an external player // @author Kayomani // @include /^https?://.:32400/web. // @include http://:32400/web/index.html // @require http://code.jquery.com/jquery-3.2.1.min.js // @connect * // @require https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js // @grant GM_xmlhttpRequest // ==/UserScript==

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Kayomani/PlexExternalPlayer/issues/22#issuecomment-365869047, or mute the thread https://github.com/notifications/unsubscribe-auth/AQBtz7eFNSNhaifdQyY6G7d6I9-yp2Hvks5tU_dmgaJpZM4SFasj .

Kayomani avatar Feb 15 '18 09:02 Kayomani

@Kayomani I'm sorry it's Greasemonkey 4.2 not Tampermonkey. And Firefox version is 58.0.2(64bit).

WireCrazii avatar Feb 15 '18 09:02 WireCrazii

Greasemonkey 4 isn't supported yet, use tampermoney.

On Thu, 15 Feb 2018, 09:27 WireCrazii, [email protected] wrote:

@Kayomani https://github.com/kayomani I'm sorry it's Greasemonkey 4.2 not Tampermonkey. And Firefox version is 58.0.2(64bit).

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/Kayomani/PlexExternalPlayer/issues/22#issuecomment-365870292, or mute the thread https://github.com/notifications/unsubscribe-auth/AQBtz1Id3LUiT_UCGwS6mujpX3afphyHks5tU_h7gaJpZM4SFasj .

Kayomani avatar Feb 15 '18 09:02 Kayomani

@Kayomani I see, didn't saw the README was updated. Installed Tampermonkey 4.5.5660 and got another errors. Should I make another issue?

The error messages are:

Plex External Player
Playing C:\movies\Video Folder\Video.mkv
Plex External Player
Could not find authentication info
Plex External Player
Failed to connect to agent, is it running or firewalled?

WireCrazii avatar Feb 15 '18 09:02 WireCrazii

@WireCrazii what about [Plex External] logs in the JS console when this happens?

I actually did have the auth error before, but it went away by itself I think, so you can try generic things like clear cookies and cache, restart browser, log out of plex and login again.

enchained avatar Feb 15 '18 12:02 enchained

@enchained Tried all of them still getting same error messages. I've also tried on chromium(64.0.3282.119) without any extensions and same error messages. Here is the log message from Firefox:

[Plex External] Calling http://192.168.10.220:32400/library/metadata/17687?checkFiles=1&includeExtras=1 clientId 5ghkmgzp8ifwmjoce2igtoz2Token xiGz4m2HsBjXtSMfZ4qB
userscript.html:69:5
[Plex External] Called sucessfully to http://192.168.10.220:32400/library/metadata/17687?checkFiles=1&includeExtras=1
userscript.html:69:5
[Plex External] Playing C:\movies\Video Folder\Video.avi
userscript.html:69:5
[Plex External] Calling http://localhost:7251/?protocol=2&item=C%3A%5Cmovies%5CVideo%20Folder%5CVideo.avi clientId 5ghkmgzp8ifwmjoce2igtoz2Token xiGz4m2HsBjXtSMfZ4qB
userscript.html:69:5
[Plex External] Could not find authentication info
userscript.html:69:5
[Plex External] Failed to connect to agent, is it running or firewalled?

WireCrazii avatar Feb 16 '18 09:02 WireCrazii

@WireCrazii Looks like there's something with the agent indeed (and from the code it looked like the auth error happens only when there's wrong plex user/server info). Is the agent running in the tray? Did you try to restart it? Add it to the firewall exceptions?

When the agent works, if you enter that http://localhost:7251/?protocol=2&item=C%3A%5Cmovies%5CVideo%20Folder%5CVideo.avi url into a browser, it'll normally say Recieved.

enchained avatar Feb 17 '18 10:02 enchained

@enchained Yes, the agent is running in the tray. Restarted few times, firewall exceptions added.

Yes the normal download link works without a problem.

I've also tried on different client(Windows 7, Firefox) computer still same messages.

WireCrazii avatar Feb 18 '18 10:02 WireCrazii

@WireCrazii Do you have localhost whitelisted in the Tampermonkey script settings? Go to Dashboard - Plex External Player - Settings - XHR Security. User domain whitelist field should contain localhost entry.

enchained avatar Feb 18 '18 12:02 enchained

@enchained Looks localhost already in the whitelist.

WireCrazii avatar Feb 19 '18 15:02 WireCrazii

Hello, I have exactly the same problem with Plex 1.14.0.5465 + Firefox Quantum 63.0.3 (64 bits) + TamperMonkey 4.8.5847 OR with Chrome 70.0.3538.102 + TamperMonkey 4.7.44. Did you find a solution ? In any case, even if it does not work for me yet, thank you for considering this need for an external player for PLex! I hope it will work ... although I have done all the steps described here and it does not work now ...

M-RiC-French avatar Nov 17 '18 08:11 M-RiC-French

Works fine, I reinstalled PlexExternalPlayerAgentInstall.v1.12.0.exe from https://github.com/Kayomani/PlexExternalPlayer/releases

M-RiC-French avatar Nov 17 '18 11:11 M-RiC-French