userscripts icon indicating copy to clipboard operation
userscripts copied to clipboard

Battledome and Food club neopets scripts seem to be breaking.

Open minicoz opened this issue 1 year ago • 4 comments

I have been using your scripts for years... This is the first time i get an xpath undefined error. I dont even know if you are maintaining these anymore but I would really appreciate it if you could look into this

Browser: Firefox 131.0.3
Plugin: Tampermonkey X.Y.Z
Script: Battledome | Foodclub name X.Y.Z
Accessed url: Put here the URL that you were when the error occurred
Installation url: Put here the URL that you used to install the script (Optional, only if the script doesn't work since installation)
Error Message: Error that appeared on Error Console containing stacktrace, filename and line number (a printscreen of the Error Console also is welcome)
Obs.: Put here some other observations that you consider relevant (Optional)
Expected behavior: Fill here what you expected to happen
Actual behavior: Fill here what actually happened
Steps to reproduce:

FOOD Club error:

This page is in Almost Standards Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”. foodclub.phtml
Cookie warnings 8
GET
https://images.neopets.com/themes/041_myi_d3u7l/events/
NS_BINDING_ABORTED

Loading failed for the <script> with source “https://dn0qt3r0xannq.cloudfront.net/neopets-yiBnqlhMOK/neopets-longform/prebid-load.js”. foodclub.phtml:1:1
Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. jquery-1.7.1.min.js:4:24488
Loading failed for the <script> with source “https://www.googletagmanager.com/gtm.js?id=GTM-T9FXFSN3”. foodclub.phtml:1:1
A resource is blocked by OpaqueResponseBlocking, please check browser console for details. events
@require: couldn't load @require from URL '../../includes/Includes_XPath/63808.user.js': internal error Neopets-:-Food-Club.user.js:690:9
@require: couldn't load @require from URL '../../includes/Includes_HttpRequest/56489.user.js': internal error Neopets-:-Food-Club.user.js:692:9
@require: couldn't load @require from URL '../../includes/Includes_Neopets_[BETA]/main.user.js': internal error Neopets-:-Food-Club.user.js:694:9
@require: couldn't load @require from URL '../../includes/Includes_Neopets_FoodClub/main.user.js': internal error Neopets-:-Food-Club.user.js:696:9
@require: couldn't load @require from URL '../../includes/Includes_Neopets_FoodClub/resources/templates.js': internal error Neopets-:-Food-Club.user.js:698:9
@require: couldn't load @require from URL '../../includes/Includes_WinConfig/163374.user.js': internal error Neopets-:-Food-Club.user.js:700:9
Uncaught (in promise) ReferenceError: xpath is not defined
    window["__f__m2fw17eh.pfd"]/< moz-extension://73516daf-ecb8-405e-809a-1cd0d30a8ff5/userscripts/Neopets-:-Food-Club.user.js?id=eb49bb1c-0496-436d-acc8-3c06b9f0bd91:751
    Pt https://www.neopets.com/pirates/foodclub.phtml?type=bet:10
    window["__f__m2fw17eh.pfd"]/< moz-extension://73516daf-ecb8-405e-809a-1cd0d30a8ff5/userscripts/Neopets-:-Food-Club.user.js?id=eb49bb1c-0496-436d-acc8-3c06b9f0bd91:1
    "__f__m2fw17eh.pfd" moz-extension://73516daf-ecb8-405e-809a-1cd0d30a8ff5/userscripts/Neopets-:-Food-Club.user.js?id=eb49bb1c-0496-436d-acc8-3c06b9f0bd91:1
    Pt https://www.neopets.com/pirates/foodclub.phtml?type=bet:10
    r https://www.neopets.com/pirates/foodclub.phtml?type=bet:85
    <anonymous> https://www.neopets.com/pirates/foodclub.phtml?type=bet:88
    _ https://www.neopets.com/pirates/foodclub.phtml?type=bet:22
foodclub.phtml:751:15

Battldome error:

Cookie warnings 7
Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. jquery-3.4.1.min.js:2:52150
Loading failed for the <script> with source “https://www.googletagmanager.com/gtm.js?id=GTM-T9FXFSN3”. arena.phtml:1:1
Loading failed for the <script> with source “https://dn0qt3r0xannq.cloudfront.net/neopets-yiBnqlhMOK/neopets-longform/prebid-load.js”. arena.phtml:1:1
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. arena.phtml
This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://firefox-source-docs.mozilla.org/performance/scroll-linked_effects.html for further details and to join the discussion on related tools and features! arena.phtml
@require: couldn't load @require from URL '../../includes/Includes_XPath/63808.user.js': internal error Neopets-:-Battledome-:-Fight!.user.js:6:9
@require: couldn't load @require from URL '../../includes/Includes_HttpRequest/56489.user.js': internal error Neopets-:-Battledome-:-Fight!.user.js:8:9
@require: couldn't load @require from URL '../../includes/Includes_WinConfig/163374.user.js': internal error Neopets-:-Battledome-:-Fight!.user.js:10:9
@require: couldn't load @require from URL '../../includes/Includes_Translate/85618.user.js': internal error Neopets-:-Battledome-:-Fight!.user.js:12:9
@require: couldn't load @require from URL '../../includes/Includes_I18n/87940.user.js': internal error Neopets-:-Battledome-:-Fight!.user.js:14:9
@require: couldn't load @require from URL '../../includes/Includes_Updater/87942.user.js': internal error Neopets-:-Battledome-:-Fight!.user.js:16:9
injected: @resource: can't load @resource 'winConfigBattledomeCss' from URL 'resources/default.css': internal error content.js:9:1280
Uncaught ReferenceError: WinConfig is not defined
    window["__f__m2fxbmfe.bjr"]/</< moz-extension://73516daf-ecb8-405e-809a-1cd0d30a8ff5/userscripts/Neopets-:-Battledome-:-Fight!.user.js?id=38993fe1-5e8c-48a0-b854-c9142a91fe3c:95
    Pt https://www.neopets.com/dome/arena.phtml:10
    n https://www.neopets.com/dome/arena.phtml:76
    Pt https://www.neopets.com/dome/arena.phtml:10
    r https://www.neopets.com/dome/arena.phtml:31
    Xo https://www.neopets.com/dome/arena.phtml:32
    _ https://www.neopets.com/dome/arena.phtml:22
    _ https://www.neopets.com/dome/arena.phtml:22
    Pt https://www.neopets.com/dome/arena.phtml:10
    m https://www.neopets.com/dome/arena.phtml:21
    l https://www.neopets.com/dome/arena.phtml:24
    send https://www.neopets.com/dome/arena.phtml:24
    oo https://www.neopets.com/dome/arena.phtml:18
    send https://www.neopets.com/dome/arena.phtml:24
    Xo https://www.neopets.com/dome/arena.phtml:32
    zo https://www.neopets.com/dome/arena.phtml:33
    Pt https://www.neopets.com/dome/arena.phtml:10
    a https://www.neopets.com/dome/arena.phtml:76
    value https://www.neopets.com/dome/arena.phtml:81
    window["__f__m2fxbmfe.bjr"]/< moz-extension://73516daf-ecb8-405e-809a-1cd0d30a8ff5/userscripts/Neopets-:-Battledome-:-Fight!.user.js?id=38993fe1-5e8c-48a0-b854-c9142a91fe3c:87
    Pt https://www.neopets.com/dome/arena.phtml:10
    window["__f__m2fxbmfe.bjr"]/< moz-extension://73516daf-ecb8-405e-809a-1cd0d30a8ff5/userscripts/Neopets-:-Battledome-:-Fight!.user.js?id=38993fe1-5e8c-48a0-b854-c9142a91fe3c:1
    "__f__m2fxbmfe.bjr" moz-extension://73516daf-ecb8-405e-809a-1cd0d30a8ff5/userscripts/Neopets-:-Battledome-:-Fight!.user.js?id=38993fe1-5e8c-48a0-b854-c9142a91fe3c:1
    Pt https://www.neopets.com/dome/arena.phtml:10
    r https://www.neopets.com/dome/arena.phtml:85
    <anonymous> https://www.neopets.com/dome/arena.phtml:88
    _ https://www.neopets.com/dome/arena.phtml:22
arena.phtml line 10 > injectedScript:95:11

minicoz avatar Oct 19 '24 08:10 minicoz

I figured it out, you for some reason, the raw.github scripts are not being resolved. I hardcoded the location path:

For example on Price Checker I updated all @resources as:

// @connect        raw.githubusercontent.com
// @resource       meta https://github.com/w35l3y/userscripts/raw/master/scripts/Neopets_Price_Checker/112692.user.js
// @resource       i18n https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_I18n/resources/default.json
// @resource       updaterWindowHtml https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_Updater/resources/default.html
// @resource       updaterWindowCss https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_Updater/resources/default.css
// @resource       winConfigCss https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_WinConfig/resources/default.css
// @resource       winConfigPriceCheckerCss https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/scripts/Neopets_Price_Checker/resources/default.css
// @require        https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_XPath/63808.user.js
// @require        https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_HttpRequest/56489.user.js
// @require        https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_WinConfig/163374.user.js
// @require        https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_Translate/85618.user.js
// @require        https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_I18n/87940.user.js
// @require        https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_Updater/87942.user.js
// @require        https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_Neopets_Safety_Deposit_Box/56528.user.js
// @require        https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_Neopets_The_National_Neopian_Bank/56533.user.js
// @require        https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_Neopets_Shop_Wizard/56503.user.js
// @require        https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/Includes_Neopets_Shop_[BETA]/56562.user.js
// @contributor    nozkfox

minicoz avatar Oct 28 '24 05:10 minicoz

If you hardcore https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/

instead of the ../../include

it resolves and the scripts all work.

minicoz avatar Oct 28 '24 05:10 minicoz

Hi @minicoz I stumbled upon this while looking for a BD script. Can you please tell me how to implement this hardcode fix that you speak of?

ixpyro avatar Apr 06 '25 07:04 ixpyro

Hi @minicoz I stumbled upon this while looking for a BD script. Can you please tell me how to implement this hardcode fix that you speak of?

Simply replace all instances of "../../includes/" with "https://raw.githubusercontent.com/w35l3y/userscripts/refs/heads/master/includes/" in the big block of comments labelled ==Userscript== above where the actual code begins

Septimustache avatar Apr 06 '25 08:04 Septimustache