Closed jmariani closed 1 week ago
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.
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
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).
Upstream issue report: https://github.com/Tampermonkey/tampermonkey/issues/2201
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?
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.
Is there a way that users could fix this manually until there's an update?
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.
The bug has been fixed in Tampermonkey 5.3.2
So the solution is to upgrade to Tampermonkey 5.3.2 or higher and reinstall the broken userscripts (per the upstream issue comment).
Running in Safari using userscripts extension