adafruit / circuitpython-org

CircuitPython's website
https://circuitpython.org
152 stars 555 forks source link

If board supports two circuitpython versions then sometimes ignores language drop down when downloading firmware #1390

Open tyeth opened 6 months ago

tyeth commented 6 months ago

Noticed this a while ago but couldn't quite work out the problem, it turns out the first firmware panel on a download page works as expected, but the second ignores the language preference drop down and always gets en-US for en-GB / English (UK).

I've previously seen the web installer similarly download the wrong one and install it, I've seen it at least three times. My normal route involves web installer, or bin download, UF2 only for upgrading existing running boards.

To recreate the download issue, goto Wiznet 5500 EVB, and choose English UK for the second firmware panel (less stable version) 9.1 firmware, choose English UK, and download UF2, then notice it got you en-US firmware instead.

I've checked the feather-s2 and it downloads the correct version, so something funny going on. Just trying to establish a more reliable recreation using web installer

tyeth commented 6 months ago

The weird bit is sometimes I see US english in one box and UK english in another, but when recreating in an incognito window both my language dropdowns were prepopulated with UK for one board but not another.

I can visually see on a new page the language start at English US then swap to UK (for the wiznet page in incognito), but only the first drop down updated in that one observed occurrence.

image

image

tyeth commented 6 months ago

These are the recent versions where I've ended up with en-US (occasionally I may have left at en-US so take this list with a pinch of salt) image image

tyeth commented 6 months ago

Looks like the second language drop down doesn't get set if the web installer button isn't found in the first firmware box: image

download.js:49 Uncaught TypeError: Cannot read properties of null (reading 'setAttribute')
    at download.js:49:50
    at Array.forEach (<anonymous>)
    at updateFileLinks (download.js:46:9)
    at findAndSetLocale (download.js:63:11)
    at download.js:73:11
    at NodeList.forEach (<anonymous>)
    at updateLanguageMenus (download.js:56:18)
    at HTMLDocument.<anonymous> (download.js:13:7)

Can't see how the web installer would pick the wrong one, I'll add to this ticket if I spot it again