ROpdebee's userscripts support thread

Good to hear that it was fixed by a browser restart.

In the meantime, I’ve migrated all of my other scripts. Nothing should have changed functionality-wise, but it’ll make future maintenance a lot easier. If you’d like to do some beta testing to make sure there are no regressions, the preview installation links are here (the same caveat as mentioned in a previous post applies). Note also that “MB: Validate work codes” will be merged into “MB: Bulk copy work codes” and the latter will be renamed into “MB: Work code toolbox” (if you have a better name, feel free to suggest one!), so if you install the preview, you’ll likely have to disable the two old scripts.

There’s also a super-exclusive pre-release version of a not-yet-announced new userscript available for testing. You’ll find more information in the linked thread. I’m mostly looking for feedback from editors who do lots of East Asian language releases (but everyone is welcome to try it out of course!).

1 Like

Note: This post was written more than 2 hours ago

Currently using the new previews. Looking good so far just some minor bugs/regressions.

Enhanced Cover Art Uploads

When pasting a link in quick succession images are duplicates. In both cases the message said Successfully added 6 image(s)

https://beta.musicbrainz.org/release/18454f8d-2f9b-4d04-891f-82fe64a7718b
 * https://ia902308.us.archive.org/0/items/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b-30048597202.jpg
 * https://ia902308.us.archive.org/0/items/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b-30048598139.jpg
 * https://ia902308.us.archive.org/0/items/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b-30048598972.jpg
…and 3 additional image(s)
https://beta.musicbrainz.org/release/18454f8d-2f9b-4d04-891f-82fe64a7718bhttps://beta.musicbrainz.org/release/18454f8d-2f9b-4d04-891f-82fe64a7718b
 * https://ia802308.us.archive.org/0/items/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b-30048597202.jpg
 * https://ia802308.us.archive.org/0/items/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b-30048598139.jpg
 * https://ia802308.us.archive.org/0/items/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b-30048598972.jpg
–
MB: Enhanced Cover Art Uploads 2022.6.15
https://github.com/ROpdebee/mb-userscripts
https://beta.musicbrainz.org/release/18454f8d-2f9b-4d04-891f-82fe64a7718b/cover-art
 * https://ia902308.us.archive.org/0/items/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b-30048597202.jpg
 * https://ia902308.us.archive.org/0/items/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b-30048598139.jpg
 * https://ia902308.us.archive.org/0/items/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b/mbid-18454f8d-2f9b-4d04-891f-82fe64a7718b-30048598972.jpg
…and 3 additional image(s)
https://beta.musicbrainz.org/release/18454f8d-2f9b-4d04-891f-82fe64a7718b/cover-arthttps://beta.musicbrainz.org/release/18454f8d-2f9b-4d04-891f-82fe64a7718b/cover-art
–
MB: Enhanced Cover Art Uploads 2022.6.15
https://github.com/ROpdebee/mb-userscripts

Paste multiple external links at once

  1. First link is pasted. Others apparently only appear after onblur, e.g. after I Tab or click outside.
    But if I type in the pasted URL and then Tab it just “forgets” to add the others.
  2. Wasn’t it supposed to run on other pages too? While it does seem to run I’m not seeing much action in iframes, Don't split links option is also missing in those cases:
    https://beta.musicbrainz.org/release/add → add new artist via inline search

Supercharged Cover Art Edits

  1. Stray semicolons:
Release details:	Status: ; Official; Packaging: ; None; Format: ; Digital Media
Release events:	2014-08-22; (XW)
Labels:	Perfecto Records
Identifiers:	Cat#: ??; Barcode: 8718522047978

Update
Looks better now:

Release details:	Status: Official; Packaging: None; Format: Digital Media
Release events:	2014-08-22; (XW)
Labels:	Perfecto Records
Identifiers:	Cat#: ??; Barcode: 8718522047978
  1. Still running on too many pages :stuck_out_tongue:
    Non-exhaustive list:
  • https://musicbrainz.org/release/add
  • https://musicbrainz.org/release-group/create
  • https://musicbrainz.org/release-group/<MBID>/edit_annotation
  • https://musicbrainz.org/release/<MBID>/annotations-differences

Inline all recordings’ tracks on releases

Still no luck with this one. The new TypeScript version doesn’t even seem to add a button on MBS beta. The old version at least gives an error:
https://musicbrainz.org/release/b695d146-2c96-412d-9d50-957b0e236598

MB: QoL: Inline all recording's tracks on releases.user.js:88 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'insertAdjacentHTML')
    at insertRows (MB: QoL: Inline all recording's tracks on releases.user.js:88:9)
    at MB: QoL: Inline all recording's tracks on releases.user.js:100:40
    at Array.forEach (<anonymous>)
    at MB: QoL: Inline all recording's tracks on releases.user.js:100:15
insertRows @ MB: QoL: Inline all recording's tracks on releases.user.js:88
(anonymous) @ MB: QoL: Inline all recording's tracks on releases.user.js:100
(anonymous) @ MB: QoL: Inline all recording's tracks on releases.user.js:100
await in (anonymous) (async)
loadAndInsert @ MB: QoL: Inline all recording's tracks on releases.user.js:98
r @ helpers.js:71
MB: QoL: Inline all recording's tracks on releases.user.js:88 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'insertAdjacentHTML')
    at insertRows (MB: QoL: Inline all recording's tracks on releases.user.js:88:9)
    at MB: QoL: Inline all recording's tracks on releases.user.js:100:40
    at Array.forEach (<anonymous>)
    at MB: QoL: Inline all recording's tracks on releases.user.js:100:15
insertRows @ MB: QoL: Inline all recording's tracks on releases.user.js:88
(anonymous) @ MB: QoL: Inline all recording's tracks on releases.user.js:100
(anonymous) @ MB: QoL: Inline all recording's tracks on releases.user.js:100
await in (anonymous) (async)
loadAndInsert @ MB: QoL: Inline all recording's tracks on releases.user.js:98
r @ helpers.js:71

Needless to say it’s freaking out when it can’t find the required element while running on a page where it shouldn’t run:

MB: QoL: Inline all recordings' tracks on releases.user.js:143 Error: Could not find required element
    at assert (MB: QoL: Inline all recordings' tracks on releases.user.js:27:1569)
    at assertNonNull (MB: QoL: Inline all recordings' tracks on releases.user.js:27:1646)
    at qs (MB: QoL: Inline all recordings' tracks on releases.user.js:27:1769)
    at MB: QoL: Inline all recordings' tracks on releases.user.js:128:21
    at MB: QoL: Inline all recordings' tracks on releases.user.js:142:3
    at window.VMin8xkpxf3845fesit6 (MB: QoL: Inline all recordings' tracks on releases.user.js:143:3)
    at i (injected-web.js:1:16503)
    at Vt (injected-web.js:1:16615)
    at set (injected-web.js:1:16344)
    at MB: QoL: Inline all recordings' tracks on releases.user.js:1:28
window.VMin8xkpxf3845fesit6 @ MB: QoL: Inline all recordings' tracks on releases.user.js:143
1 Like

The issues with Supercharged and “Inline recordings’ tracks” should’ve been fixed in the latest previews. I’ve also rewritten the script’s @include rules to hopefully prevent them from running on pages they’re not supposed to run on. However, knowing my tendency to make my scripts run on pages that they shouldn’t be running on while not running on pages they should run on, I’m going to guess something broke, so please let me know if you find any regressions :slight_smile:


Edit

@chaban Could you try this preview and see if that fixes it? I couldn’t reproduce this on Firefox, but apparently Chrome support was entirely borked.

helpers.js:88 Uncaught TypeError: Cannot read properties of null (reading 'children')
    at onIframeReady (MB: QoL: Paste multiple external links at once.user.js:31:3376)
    at MB: QoL: Paste multiple external links at once.user.js:31:3413
    at r (helpers.js:71:23)
onIframeReady @ MB: QoL: Paste multiple external links at once.user.js:31
(anonymous) @ MB: QoL: Paste multiple external links at once.user.js:31
r @ helpers.js:71
setTimeout (async)
(anonymous) @ trycatch.js:28
onIframeReady @ MB: QoL: Paste multiple external links at once.user.js:31
(anonymous) @ MB: QoL: Paste multiple external links at once.user.js:31
r @ helpers.js:71
setTimeout (async)
(anonymous) @ trycatch.js:28
onIframeReady @ MB: QoL: Paste multiple external links at once.user.js:31
onIframeAdded @ MB: QoL: Paste multiple external links at once.user.js:167
(anonymous) @ MB: QoL: Paste multiple external links at once.user.js:185
childList (async)
(anonymous) @ jquery.js:5756
domManip @ jquery.js:5959
append @ jquery.js:5753
EVdnBjI.m.each.m.fn.<computed> @ jquery.js:6011
_getAddEntityContainer @ Autocomplete.js:248
e.each.e.isFunction.l.<computed> @ jquery-ui.custom.js:401
action @ Autocomplete.js:498
_selectAction @ Autocomplete.js:628
e.each.e.isFunction.l.<computed> @ jquery-ui.custom.js:401
s @ jquery-ui.custom.js:702
dispatch @ jquery.js:4665
v.handle @ jquery.js:4333
r @ helpers.js:71

Another small fry:
Supercharged Cover Art Edits and Display CAA image dimensions don’t run on collections edit listings

Preview updated with a fix (hopefully). If that still doesn’t do the trick, could you check whether the old (JS) version of “Bulk copy work codes” adds its interface in iframes when adding new works on the relationship editor for you?

Bulk copy-paste work codes v2022.3.31 seems to work fine.

But the updated preview still didn’t? Because I managed to reproduce it eventually on Violentmonkey Beta (yep, turned out to be another VM Beta issue) and it did seem to fix it for me. Regardless, I’ve updated the preview with yet another fix that should address this properly. Apologies for the noise.

1 Like

I just retried all three versions in incognito mode, all extensions disabled except VM beta 2.13.0.20, all userscripts disabled except mb_multi_external_links:

def082ca6f8822a81295e1fcec888fa22e614fa4 doesn’t work
2ea9cead2f6c3a9e78f32584d2c43c732b1a1a1e doesn’t work
a35e7651c68b623dc607d0520cdb74cd843ed748 works

then I went back to normal mode and restored the VM backup I created before this test. It no longer works.

I reinstall a35e7651c68b623dc607d0520cdb74cd843ed748 and it works. Reinstalling 2ea9cead2f6c3a9e78f32584d2c43c732b1a1a1e makes it stop working.

I didn’t see any errors the entire time.


Enhanced cover art uploader

  1. Omit unnecessary parentheses

Guess language and script

  1. Use id instead of name in dropdown. User interface can be translated :stuck_out_tongue:
instrument.js:102 [mb_guess_language] An error occurred Error: Label Japanese not found in selection dropdown list
    at selectOption (MB: Guess language and script.user.js:239:17)
    at guessScript (MB: Guess language and script.user.js:251:7)
    at MB: Guess language and script.user.js:189:15
(anonymous) @ instrument.js:102
onError @ MB: Guess language and script.user.js:28
(anonymous) @ MB: Guess language and script.user.js:28
fireHandlers @ MB: Guess language and script.user.js:28
error @ MB: Guess language and script.user.js:28
(anonymous) @ MB: Guess language and script.user.js:28
Promise.catch (async)
logFailure @ MB: Guess language and script.user.js:28
(anonymous) @ MB: Guess language and script.user.js:261
r @ helpers.js:71
  1. Some detection feedback:

https://musicbrainz.org/release/f76b563d-e87b-4720-a725-fdeeb4ce7c20
mul / Qaaa → jpn / Jpan

instrument.js:102 [mb_guess_language] Failed to guess language Error: Could not detect language reliably
    at MB: Guess language and script.user.js:76:13
    at o (MB: Guess language and script.user.js:25:531)
    at _settle (MB: Guess language and script.user.js:25:840)
    at t (MB: Guess language and script.user.js:25:1982)
(anonymous) @ instrument.js:102
onError @ MB: Guess language and script.user.js:28
(anonymous) @ MB: Guess language and script.user.js:28
fireHandlers @ MB: Guess language and script.user.js:28
error @ MB: Guess language and script.user.js:28
(anonymous) @ MB: Guess language and script.user.js:187
Promise.then (async)
_catch @ MB: Guess language and script.user.js:25
(anonymous) @ MB: Guess language and script.user.js:184
Promise.then (async)
_call @ MB: Guess language and script.user.js:25
doGuess @ MB: Guess language and script.user.js:183
(anonymous) @ MB: Guess language and script.user.js:261
r @ helpers.js:71
instrument.js:102 [mb_guess_language] Identified as Japanese with confidence 98.54%, of which 78.95% Latin

https://musicbrainz.org/release/422544a5-c27e-4ac1-8c48-011ecc5db09f
jpn / Qaaa → jpn / Jpan

instrument.js:102 [mb_guess_language] Failed to guess language Error: Could not detect language reliably
    at MB: Guess language and script.user.js:76:13
    at o (MB: Guess language and script.user.js:25:531)
    at _settle (MB: Guess language and script.user.js:25:840)
    at t (MB: Guess language and script.user.js:25:1982)
(anonymous) @ instrument.js:102
onError @ MB: Guess language and script.user.js:28
(anonymous) @ MB: Guess language and script.user.js:28
fireHandlers @ MB: Guess language and script.user.js:28
error @ MB: Guess language and script.user.js:28
(anonymous) @ MB: Guess language and script.user.js:187
Promise.then (async)
_catch @ MB: Guess language and script.user.js:25
(anonymous) @ MB: Guess language and script.user.js:184
Promise.then (async)
_call @ MB: Guess language and script.user.js:25
doGuess @ MB: Guess language and script.user.js:183
(anonymous) @ MB: Guess language and script.user.js:261
r @ helpers.js:71
instrument.js:102 [mb_guess_language] Identified as Japanese with confidence 91.04%, of which 35.82% Latin

https://musicbrainz.org/release/c69a350e-5103-4556-873f-59b077b9c812
jpn / Qaaa → jpn / Jpan

instrument.js:102 [mb_guess_language] Identified as ja with confidence 83%
instrument.js:102 [mb_guess_language] Identified as Japanese with confidence 82.55%, of which 20.13% Latin

https://musicbrainz.org/release/0309d375-7f4b-43d0-9a4c-57255603de01
→ deu / Latn

instrument.js:102 [mb_guess_language] Failed to guess language Error: Could not detect language reliably
    at MB: Guess language and script.user.js:76:13
    at o (MB: Guess language and script.user.js:25:531)
    at _settle (MB: Guess language and script.user.js:25:840)
    at t (MB: Guess language and script.user.js:25:1982)
(anonymous) @ instrument.js:102
instrument.js:102 [mb_guess_language] Identified as Latin with confidence 96.85%

https://musicbrainz.org/release/f2bc581d-b5af-439c-bf41-806bea8065c9
→ eng / Latn

instrument.js:102 [mb_guess_language] Identified as en with confidence 92%
instrument.js:102 [mb_guess_language] Could not determine script
(anonymous) @ instrument.js:102

https://musicbrainz.org/release/e5bc7429-f28c-4d18-ae5b-f7472da3e511
→ eng / latn

instrument.js:102 [mb_guess_language] Failed to guess language Error: Could not detect language reliably
    at MB: Guess language and script.user.js:76:13
    at o (MB: Guess language and script.user.js:25:531)
    at _settle (MB: Guess language and script.user.js:25:840)
    at t (MB: Guess language and script.user.js:25:1982)
(anonymous) @ instrument.js:102
instrument.js:102 [mb_guess_language] Identified as Latin with confidence 100.00%

https://musicbrainz.org/release/2464d67d-a675-4017-9153-765a21cdd1a4
→ deu / Latn

instrument.js:102 [mb_guess_language] Identified as en with confidence 99%
instrument.js:102 [mb_guess_language] Identified as Latin with confidence 99.34%

https://musicbrainz.org/release/d2bc383d-a4d3-4248-8a78-2820c6facc8a
→ deu / latn

Trouble with punctuation?

instrument.js:102 [mb_guess_language] Identified as en with confidence 92%
instrument.js:102 [mb_guess_language] Could not determine script
(anonymous) @ instrument.js:102

Trivia:

While looking at the language statistics I noticed something that looks like a 10 year old bug

1 Like

mb_multi_external_links broke again, this time it’s the new MBS beta: I suspect:

instrument.js:102 [mb_multi_external_links] An error occurred TypeError: Cannot read properties of null (reading 'handleUrlBlur')
    at createLinkSplitter (MB: QoL: Paste multiple external links at once.user.js:124:35)
    at MB: QoL: Paste multiple external links at once.user.js:67:24
(anonymous) @ instrument.js:102
onError @ MB: QoL: Paste multiple external links at once.user.js:31
(anonymous) @ MB: QoL: Paste multiple external links at once.user.js:31
fireHandlers @ MB: QoL: Paste multiple external links at once.user.js:31
error @ MB: QoL: Paste multiple external links at once.user.js:31
(anonymous) @ MB: QoL: Paste multiple external links at once.user.js:31
Promise.catch (async)
logFailure @ MB: QoL: Paste multiple external links at once.user.js:31
(anonymous) @ MB: QoL: Paste multiple external links at once.user.js:205
(anonymous) @ MB: QoL: Paste multiple external links at once.user.js:208
window.VMin2jvmu32u36na0dao @ MB: QoL: Paste multiple external links at once.user.js:209
i @ injected-web.js:1
Vt @ injected-web.js:1
set @ injected-web.js:1
(anonymous) @ MB: QoL: Paste multiple external links at once.user.js:1
pt @ VM710 injected.js:1
mt @ VM710 injected.js:1
await in mt (async)
ft @ VM710 injected.js:1
ut @ VM710 injected.js:1
await in ut (async)
(anonymous) @ VM710 injected.js:1
await in (anonymous) (async)
(anonymous) @ VM710 injected.js:1
Re @ VM710 injected.js:1
dt @ VM710 injected.js:1
qt @ VM710 injected.js:1
await in qt (async)
(anonymous) @ VM710 injected.js:1
n @ VM710 injected.js:1
(anonymous) @ VM710 injected.js:1
(anonymous) @ VM710 injected.js:1
1 Like

Small possible improvement for mb_caa_dimensions:

Use the actual image URL as key for release group cover.

When I changed the release group cover for https://musicbrainz.org/release-group/d3a36b48-9a42-376a-bee8-f97b96eee7a6 it was still displaying the image info for the previous file.

The RG cover was previously taken from https://musicbrainz.org/release/857a0d26-17c8-435e-a547-319c4d642b9c


Re: mb_enhanced_cover_art_uploads

  1. I accidentally uploaded some duplicate images, maybe just didin’t pay attention but this one took me by surprise, see the note: https://musicbrainz.org/edit/90933014

  2. I’ve noticed the network related error message differs depending on pasting the direct image URL or letting it parse the Bandcamp page.
    When using the direct image URL it says there is a network error but when it parses the Bandcamp page it said it couldn’t retrieve image dimensions :thinking:

https://musicbrainz.org/release/91765522-2577-4e50-8d8f-f3140b7106f2

instrument.js:102 [mb_enhanced_cover_art_uploads] Attempting to fetch https://f4.bcbits.com/img/a2015745957_0.jpg
instrument.js:102 [mb_enhanced_cover_art_uploads] Skipping maximised candidate https://f4.bcbits.com/img/a2015745957_0.jpg NetworkError: Network error
    at onerror (MB: Enhanced Cover Art Uploads.user.js:106052:9130)
    at Oe (injected-web.js:1:5505)
    at Boolean.HttpRequested (injected-web.js:1:6415)
    at Object.onHandle (injected-web.js:1:3451)
    at injected-web.js:1:4134
(anonymous) @ instrument.js:102
onWarn @ MB: Enhanced Cover Art Uploads.user.js:106052
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106052
fireHandlers @ MB: Enhanced Cover Art Uploads.user.js:106052
warn @ MB: Enhanced Cover Art Uploads.user.js:106052
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108068
Promise.then (async)
_catch @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108057
a @ MB: Enhanced Cover Art Uploads.user.js:106049
Promise.then (async)
_forAwaitOf @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108048
_call @ MB: Enhanced Cover Art Uploads.user.js:106049
fetchMaximisedImage @ MB: Enhanced Cover Art Uploads.user.js:108046
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108083
_call @ MB: Enhanced Cover Art Uploads.user.js:106049
fetchImageFromURL @ MB: Enhanced Cover Art Uploads.user.js:108082
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108033
_call @ MB: Enhanced Cover Art Uploads.user.js:106049
fetchImages @ MB: Enhanced Cover Art Uploads.user.js:108018
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108640
_catch @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108639
_call @ MB: Enhanced Cover Art Uploads.user.js:106049
_processURL @ MB: Enhanced Cover Art Uploads.user.js:108636
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108620
_finallyRethrows @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108617
_call @ MB: Enhanced Cover Art Uploads.user.js:106049
processURL @ MB: Enhanced Cover Art Uploads.user.js:108616
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108520
t @ MB: Enhanced Cover Art Uploads.user.js:106049
_forOf @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108512
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
r @ helpers.js:71
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to grab images NetworkError: Network error
    at onerror (MB: Enhanced Cover Art Uploads.user.js:106052:9130)
    at Oe (injected-web.js:1:5505)
    at Boolean.HttpRequested (injected-web.js:1:6415)
    at Object.onHandle (injected-web.js:1:3451)
    at injected-web.js:1:4134
(anonymous) @ instrument.js:102
onError @ MB: Enhanced Cover Art Uploads.user.js:106052
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106052
fireHandlers @ MB: Enhanced Cover Art Uploads.user.js:106052
error @ MB: Enhanced Cover Art Uploads.user.js:106052
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108644
Promise.then (async)
_catch @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108639
_call @ MB: Enhanced Cover Art Uploads.user.js:106049
_processURL @ MB: Enhanced Cover Art Uploads.user.js:108636
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108620
_finallyRethrows @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108617
_call @ MB: Enhanced Cover Art Uploads.user.js:106049
processURL @ MB: Enhanced Cover Art Uploads.user.js:108616
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108520
t @ MB: Enhanced Cover Art Uploads.user.js:106049
_forOf @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108512
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
r @ helpers.js:71
instrument.js:102 [mb_enhanced_cover_art_uploads] Searching for images in Bandcamp release…
instrument.js:102 [mb_enhanced_cover_art_uploads] Checking for Bandcamp track images, this may take a few seconds…
instrument.js:102 [mb_enhanced_cover_art_uploads] Found no unique track images this time
instrument.js:102 [mb_enhanced_cover_art_uploads] Getting image dimensions for https://f4.bcbits.com/img/a2015745957_0.jpg
a2015745957_0.jpg:1          Failed to load resource: net::ERR_CONNECTION_CLOSED
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to retrieve image dimensions: Image failed to load for unknown reason. Retrying…
(anonymous) @ instrument.js:102
instrument.js:102 [mb_enhanced_cover_art_uploads] Getting image dimensions for https://f4.bcbits.com/img/a2015745957_0.jpg
a2015745957_0.jpg:1          Failed to load resource: net::ERR_CONNECTION_CLOSED
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to retrieve image dimensions: Image failed to load for unknown reason. Retrying…
(anonymous) @ instrument.js:102
instrument.js:102 [mb_enhanced_cover_art_uploads] Getting image dimensions for https://f4.bcbits.com/img/a2015745957_0.jpg
a2015745957_0.jpg:1          Failed to load resource: net::ERR_CONNECTION_CLOSED
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to retrieve image dimensions: Image failed to load for unknown reason. Retrying…
(anonymous) @ instrument.js:102
instrument.js:102 [mb_enhanced_cover_art_uploads] Getting image dimensions for https://f4.bcbits.com/img/a2015745957_0.jpg
a2015745957_0.jpg:1          Failed to load resource: net::ERR_CONNECTION_CLOSED
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to retrieve image dimensions: Image failed to load for unknown reason. Retrying…
(anonymous) @ instrument.js:102
instrument.js:102 [mb_enhanced_cover_art_uploads] Getting image dimensions for https://f4.bcbits.com/img/a2015745957_0.jpg
a2015745957_0.jpg:1          Failed to load resource: net::ERR_CONNECTION_CLOSED
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to retrieve image dimensions: Image failed to load for unknown reason. Retrying…
(anonymous) @ instrument.js:102
instrument.js:102 [mb_enhanced_cover_art_uploads] Getting image dimensions for https://f4.bcbits.com/img/a2015745957_0.jpg
a2015745957_0.jpg:1          GET https://f4.bcbits.com/img/a2015745957_0.jpg net::ERR_CONNECTION_CLOSED
Image (async)
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106879
_getImageDimensions @ MB: Enhanced Cover Art Uploads.user.js:106839
pRetry.retries @ MB: Enhanced Cover Art Uploads.user.js:106883
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
_catch @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
r @ helpers.js:71
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to retrieve image dimensions: Image failed to load for unknown reason. Retrying…
(anonymous) @ instrument.js:102
onWarn @ MB: Enhanced Cover Art Uploads.user.js:106052
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106052
fireHandlers @ MB: Enhanced Cover Art Uploads.user.js:106052
warn @ MB: Enhanced Cover Art Uploads.user.js:106052
onFailedAttempt @ MB: Enhanced Cover Art Uploads.user.js:106886
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
_catch @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
_invokeIgnored @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
_invokeIgnored @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
Promise.then (async)
_catch @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
r @ helpers.js:71
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to grab images Error: Image failed to load for unknown reason
    at HTMLImageElement.dimensionsFailed (MB: Enhanced Cover Art Uploads.user.js:106859:18)
    at HTMLImageElement.r (helpers.js:71:23)
(anonymous) @ instrument.js:102
onError @ MB: Enhanced Cover Art Uploads.user.js:106052
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106052
fireHandlers @ MB: Enhanced Cover Art Uploads.user.js:106052
error @ MB: Enhanced Cover Art Uploads.user.js:106052
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:108682
error (async)
(anonymous) @ trycatch.js:74
e @ instrument.js:328
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106870
_getImageDimensions @ MB: Enhanced Cover Art Uploads.user.js:106839
pRetry.retries @ MB: Enhanced Cover Art Uploads.user.js:106883
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
_catch @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:106049
r @ helpers.js:71
3 Likes

RE the duped uploads: That’s super weird and obviously shouldn’t happen. As far as I can tell, all of the dupe checks (multiple for URLs and one for edit note content) work fine, and the only way they can be “busted” is if there are multiple instances of the script running on the same page. Did you happen to notice duplicate buttons or URL inputs too? I guess it can happen if the script or userscript addon is updated or reinstalled without reloading the page. (When I installed VM beta again, it did spawn a second instance on the page so that led to dupe submissions when seeding from a-tisket, but the edit note wasn’t duplicated.) Let me know if it happens a lot, I can probably add something to prevent a second initialisation on the same page (but I would expect the buttons to be duplicated too, if that’s the root cause).

Looks like I’m a bit too late.

mb_enhanced_cover_art_uploads

dd1bbf8226d093ee611b2cb2684cdedc9521125b:

After loading all of these at once only half had links.
Looks like an a-tisket issue

When seeding those four in quick succession one failed:
Failed to fetch or enqueue images: Failed to construct 'URL': Invalid URL

Sometimes the error occurs after starting the import which causes it to skip maximasing
Skipping maximised candidate https://f4.bcbits.com/img/a4040679453_0.jpg: Failed to construct 'URL': Invalid URL

https://musicbrainz.org/release/e2c2bdc3-e1c1-4415-8c59-b6f7259ad08a

Then I have to reload the whole page as the script only allows importing a URL once.
Would be nice if it was possible to retry. Also when network errors occur, like a transient disconnect.

After going back to 2022.7.3 it seems the URL constructor errors disappeared.

Re: Dupe uploads, it was partly due to me. These two releases have the same Deezer link:

I used a-tisket to find the Apple Music equivalent for the original image:
https://atisket.pulsewidth.org.uk/?deez_id=507397

The “Add to release” link references the same MB release so that’s how I ended up uploading it twice:
https://musicbrainz.org/edit/91231571

Could it be that the VGMdb cover seeding links are affected similarly? Didn’t test Nope

f80d133924881f902e0d2b688d2ecb148705fd0c:

When using the cover seeding link on e.g. VGMdb rather than showing "Fetching " it shows "Attempting to fetch ". In that case the image count is also missing.

I haven’t noticed this before and it was just auto-updated

Other than that there don’t seem to be any issues with the new progress indicator version :slight_smile:


The VGMdb NSFW placeholder is uploaded if not disabled (Preferences → “Explicit Images”) when importing from MB:

Some types are not parsed

Types not parsed correctly

Map “Disc (reverse)” or “Disc (Back)” to “Matrix/Runout”

Wrap long URLs, e.g. Discogs image URLs are quite long and don’t wrap well

mb_supercharged_caa_edits

  • Display comments for the compared image
1 Like

Are those URL errors on Chrome? Firefox tends to give more descriptive URL errors, but I’ve never seen this happen on FF, but I also cannot seem to reproduce this on Chrome either… Does this happen somewhat consistently? Because I’m afraid I’ll need a guinea pig to figure out what’s causing this. There should also be a traceback in the browser console. On Chrome it’ll look something like at MB: Enhanced Cover Art Uploads.user.js:108355:30, on Firefox more like fetchImageContents moz-extension://fc2846ed-2976-674d-b677-6dbc1278153a/ MB: Enhanced Cover Art Uploads.user.js#43:108332. The line numbers are pretty meaningless, unfortunately, so could you click the link in the top-most of those lines? That should bring you to the sources/debugger tab, could you paste the line on which it focuses? That way I at least know where exactly the problem is occurring. It’s possible that the lines will be different for the maximisation problem and the seeding problem though.

In any case, I’ll try to get a patch out soon that would allow retries under more circumstances.

The seeding links not showing up on a-tisket is indeed an a-tisket issue: It’s not showing the “Release … already has this UPC and Deezer URL”, which we need in order to determine which release to seed to.

I don’t see the relation to the example, so I think you may have misplaced this?

I’m using Chrome. Unfortunately those errors happen quite randomly, couldn’t see much of a pattern. A race condition? I’ll try to get more info.

Indeed, it was supposed to be a separate item. Discogs image URLs are quite long and don’t wrap well, at least on Chrome. IIRC Firefox wraps more stuff by default.

1 Like

Here is a recent one that occurred when trying to import on MB:

instrument.js:102 [mb_enhanced_cover_art_uploads] Searching for images in VGMdb release…
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to fetch or enqueue images TypeError: Failed to construct 'URL': Invalid URL
    at MB: Enhanced Cover Art Uploads.user.js:101220:102
(anonymous) @ instrument.js:102
onError @ MB: Enhanced Cover Art Uploads.user.js:100349
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:100381
fireHandlers @ MB: Enhanced Cover Art Uploads.user.js:100379
error @ MB: Enhanced Cover Art Uploads.user.js:100401
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:103900
Promise.then (async)
_catch @ MB: Enhanced Cover Art Uploads.user.js:99797
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:103895
t @ MB: Enhanced Cover Art Uploads.user.js:99707
_forOf @ MB: Enhanced Cover Art Uploads.user.js:99716
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:103888
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:99662
runInSection @ MB: Enhanced Cover Art Uploads.user.js:100649
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:103886
_call @ MB: Enhanced Cover Art Uploads.user.js:99776
_processURLs @ MB: Enhanced Cover Art Uploads.user.js:103885
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:103923
_call @ MB: Enhanced Cover Art Uploads.user.js:99776
processSeedingParameters @ MB: Enhanced Cover Art Uploads.user.js:103921
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:104555
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:104568
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:104570
window.VMinbhgcrgqc6q9xl9te @ MB: Enhanced Cover Art Uploads.user.js:104572
i @ injected-web.js:1
Vt @ injected-web.js:1
set @ injected-web.js:1
(anonymous) @ MB: Enhanced Cover Art Uploads.user.js:1
pt @ VM118 injected.js:1
mt @ VM118 injected.js:1
await in mt (async)
ft @ VM118 injected.js:1
ut @ VM118 injected.js:1
await in ut (async)
(anonymous) @ VM118 injected.js:1
await in (anonymous) (async)
(anonymous) @ VM118 injected.js:1
Re @ VM118 injected.js:1
dt @ VM118 injected.js:1
qt @ VM118 injected.js:1
await in qt (async)
(anonymous) @ VM118 injected.js:1
n @ VM118 injected.js:1
(anonymous) @ VM118 injected.js:1

Enhanced Cover Art Uploads.user.js:101220:102

          if (resp.finalUrl !== url.href && !_this.isSafeRedirect(url, new URL(resp.finalUrl))) {

1 Like

A couple of the reported issues have been fixed in today’s patches and I might push some other patches to fix some more issues, thanks!

RE: the URL problem, I already had a hunch that it had something to do with finalUrl. It might be a userscript extension issue (Violentmonkey Beta again?) I’ve created a small debug build which you can install from here, it’ll log some additional diagnostic stuff to the console which will hopefully shed some light on what’s actually happening. If you could check those logs when it happens again and send them over, I’ll take a look. Make sure to enable the “verbose” level in Chrome’s console (it’s in a dropdown somewhere, in my case next to the filter textbox). Also send over your browser and userscript extension versions, in case it is a userscript extension issue.

Edited to add: I’ve also improved the VGMdb type/comment mappings, which should go live soon-ish. Here’s a list of test cases with the resulting types and comments. I think all the cases you mentioned above should now be handled properly, except for the one with the Disc prefixes on all images. It could become quite complicated to handle those and already breaks the “Disc 01 Back”-as-matrix parsing. However, if you do encounter these on the regular, let me know and I’ll see what I can do.

I’ve also updated the debug build to include the latest patches but you’ll have to manually update it. The URL has changed too, I’ve updated the one above.

3 Likes

Finally got the error with the debug build.

instrument.js:102 [mb_enhanced_cover_art_uploads] Searching for images in Apple Music release…
instrument.js:102 Response finalUrl is undefined
instrument.js:102 Response is {"responseHeaders":null,"readyState":4,"status":200,"statusText":"","lengthComputable":false,"loaded":413040,"total":0,"response":null,"responseText":null}
instrument.js:102 [mb_enhanced_cover_art_uploads] Failed to fetch or enqueue images TypeError: Failed to construct 'URL': Invalid URL
    at MB: Enhanced Cover Art Uploads.user.js:106220:72
(anonymous) @ instrument.js:102

https://musicbrainz.org/release/561e8a53-bd69-4609-ac6e-01b87a04b6c1/add-cover-art?x_seed.image.0.url=https%3A%2F%2Fmusic.apple.com%2Fgb%2Falbum%2F1582667542&x_seed.origin=https%3A%2F%2Fatisket.pulsewidth.org.uk%2F%3Fcached%3D00602438517848-d_0-s_0bztigq9w8sLg2nHdmq4Td-i_1582667542

Another one:

instrument.js:102 [mb_enhanced_cover_art_uploads] Fetching https://mikehuguenor.bandcamp.com/album/the-gateless-gate
instrument.js:102 [mb_enhanced_cover_art_uploads] Searching for images in Bandcamp release…
instrument.js:102 Response finalUrl is https://mikehuguenor.bandcamp.com/album/the-gateless-gate
instrument.js:102 Response is {"finalUrl":"https://mikehuguenor.bandcamp.com/album/the-gateless-gate","responseHeaders":null,"readyState":4,"status":200,"statusText":"OK","lengthComputable":false,"loaded":177341,"total":0,"response":null,"responseText":null}
instrument.js:102 [mb_enhanced_cover_art_uploads] Checking for Bandcamp track images, this may take a few seconds…
instrument.js:102 Response finalUrl is https://mikehuguenor.bandcamp.com/track/the-gateless-gate
instrument.js:102 Response is {"finalUrl":"https://mikehuguenor.bandcamp.com/track/the-gateless-gate","responseHeaders":null,"readyState":4,"status":200,"statusText":"OK","lengthComputable":false,"loaded":144784,"total":0,"response":null,"responseText":null}
instrument.js:102 [mb_enhanced_cover_art_uploads] Checking for Bandcamp track images, this may take a few seconds… (1/2)
instrument.js:102 Response finalUrl is https://mikehuguenor.bandcamp.com/track/mumons-commentary
instrument.js:102 Response is {"finalUrl":"https://mikehuguenor.bandcamp.com/track/mumons-commentary","responseHeaders":null,"readyState":4,"status":200,"statusText":"OK","lengthComputable":false,"loaded":144847,"total":0,"response":null,"responseText":null}
instrument.js:102 [mb_enhanced_cover_art_uploads] Checking for Bandcamp track images, this may take a few seconds… (2/2)
instrument.js:102 [mb_enhanced_cover_art_uploads] Found no unique track images this time
instrument.js:102 [mb_enhanced_cover_art_uploads] Getting image dimensions for https://f4.bcbits.com/img/a3563316698_0.jpg
instrument.js:102 [mb_enhanced_cover_art_uploads] Found 1 image(s) in Bandcamp release
instrument.js:102 [mb_enhanced_cover_art_uploads] Fetching https://f4.bcbits.com/img/a3563316698_10.jpg (1/1)
instrument.js:102 Response finalUrl is undefined
instrument.js:102 Response is {"readyState":4,"status":200,"statusText":"","lengthComputable":true,"loaded":8958943,"total":8958943,"response":null,"responseHeaders":null,"responseText":null}
instrument.js:102 [mb_enhanced_cover_art_uploads] Skipping maximised candidate https://f4.bcbits.com/img/a3563316698_0.jpg TypeError: Failed to construct 'URL': Invalid URL
    at MB: Enhanced Cover Art Uploads.user.js:110528:30
(anonymous) @ instrument.js:102
instrument.js:102 Response finalUrl is https://f4.bcbits.com/img/a3563316698_10.jpg
instrument.js:102 Response is {"finalUrl":"https://f4.bcbits.com/img/a3563316698_10.jpg","readyState":4,"status":200,"statusText":"","lengthComputable":true,"loaded":335879,"total":335879,"response":null,"responseHeaders":null,"responseText":null}
instrument.js:102 [mb_enhanced_cover_art_uploads] Successfully added 1 image(s)

https://musicbrainz.org/release/8f6c79b7-4603-422b-bd21-5fa9a58316fd

Violentmonkey BETA 2.13.0.22
Google Chrome 103.0.5060.132

2 Likes

That definitely does look like another VM Beta problem. I’ve submitted a bug report but I’m not sure whether they’ll have enough information to fix this problem, and I haven’t had it happen to me before.

Here’s an updated debug build with a potential fix. There’s also some additional checks and logging to collect some more diagnostics. If anything interesting occurs, it should emit a warning asking to send the logs over :slight_smile:

Edit: @chaban according to VM developers it may be a conflict with another extension. There’s a test build with their fix included in their reply, if you want to try it. In any case, I’ll try to get a fix from the ECAU side deployed soon.

1 Like

I’ve been using both, the new debug build and the VM test build for a while. No errors so far :slight_smile:

I already suspected it might be a conflict as I had a similar problem before although on Firefox related to CSP headers.

The theory of a conflict doesn’t seem to hold true. I’ve gone back to the normal VM 2.13.0.22 build and mb_enhanced_cover_art_uploads, disabled other extensions with webRequest permission and yet there is the error again

Enabled extensions:

1 Like

Please tell if you find that it’s because of another userscript.