Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[discogs] ReferenceError: Can't find variable: MBLinks #579

Open
jmariani opened this issue Oct 6, 2024 · 9 comments
Open

[discogs] ReferenceError: Can't find variable: MBLinks #579

jmariani opened this issue Oct 6, 2024 · 9 comments

Comments

@jmariani
Copy link

jmariani commented Oct 6, 2024

Running in Safari using userscripts extension

@akritm
Copy link

akritm commented Oct 16, 2024

Same for me in Chrome tampermonkey. And I see errors in console:

 @require: couldn't load @require from URL 'lib/mbimport.js': internal error
 @require: couldn't load @require from URL 'lib/logger.js': internal error
 @require: couldn't load @require from URL 'lib/mblinks.js': internal error
 @require: couldn't load @require from URL 'lib/mbimportstyle.js': internal error
chrome-extension://d…5d8-9caa96c2eb3d:49 Uncaught (in promise) ReferenceError: MBLinks is not defined
    at Proxy.<anonymous> (userscript.html?name…-9caa96c2eb3d:49:17)
    at Pt (<anonymous>:10:89)
    at userscript.html?name…8-9caa96c2eb3d:1:88
    at window.__f__m2c9s3xc.rco (userscript.html?name…-9caa96c2eb3d:1:355)
    at Pt (<anonymous>:10:89)
    at r.setMessageListener.r (<anonymous>:86:186)
    at <anonymous>:89:107
    at _ (<anonymous>:22:406)

Seems like external libs stopped working for some reason in userscript manager. @require instruction just don't load them.

@akritm
Copy link

akritm commented Oct 16, 2024

Same for me in Chrome tampermonkey. And I see errors in console:

 @require: couldn't load @require from URL 'lib/mbimport.js': internal error
 @require: couldn't load @require from URL 'lib/logger.js': internal error
 @require: couldn't load @require from URL 'lib/mblinks.js': internal error
 @require: couldn't load @require from URL 'lib/mbimportstyle.js': internal error
chrome-extension://d…5d8-9caa96c2eb3d:49 Uncaught (in promise) ReferenceError: MBLinks is not defined
    at Proxy.<anonymous> (userscript.html?name…-9caa96c2eb3d:49:17)
    at Pt (<anonymous>:10:89)
    at userscript.html?name…8-9caa96c2eb3d:1:88
    at window.__f__m2c9s3xc.rco (userscript.html?name…-9caa96c2eb3d:1:355)
    at Pt (<anonymous>:10:89)
    at r.setMessageListener.r (<anonymous>:86:186)
    at <anonymous>:89:107
    at _ (<anonymous>:22:406)

Seems like external libs stopped working for some reason in userscript manager. @require instruction just don't load them.

fyi - temporary solved it changing to direct paths to github in tampermonkey script e.g.:

// @require        https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/refs/heads/master/lib/mbimport.js
// @require        https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/refs/heads/master/lib/logger.js
// @require        https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/refs/heads/master/lib/mblinks.js
// @require        https://raw.githubusercontent.com/murdos/musicbrainz-userscripts/refs/heads/master/lib/mbimportstyle.js

@zas
Copy link
Collaborator

zas commented Oct 17, 2024

I got this issue with Bandcamp Importer and TamperMonkey 5.3.1 (deployed on 2024-10-16), relative links ceased to work (with similar errors on console).

@zas
Copy link
Collaborator

zas commented Oct 17, 2024

See #581

@kellnerd
Copy link
Collaborator

Upstream issue report: Tampermonkey/tampermonkey#2201

@zas
Copy link
Collaborator

zas commented Oct 18, 2024

So, either we merge this to avoid this recurring issue, or we wait for upstream fix and hope it doesn't happen again.
I would prefer the second option, because relative require makes much more sense for a library (and, as said, it works better with branches).

@kellnerd what do you think?

@kellnerd
Copy link
Collaborator

I totally agree. Let's hope the upstream issue gets solved fast, there were already two more issue reports (one on GitHub, one on the forums) since you opened the PR yesterday.

@psychoadept
Copy link

Is there a way that users could fix this manually until there's an update?

@zas
Copy link
Collaborator

zas commented Oct 18, 2024

Is there a way that users could fix this manually until there's an update?

Yes, at least with TamperMonkey one can edit the file directly. But that's not really convenient for most users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants