Addon Validation Error
few feature updates, didn't change the manifest, no errors running it unpacked
- The URL where you submitted the add-on.
https://addons.mozilla.org/en-US/developers/upload/953cfb75bd8340c2bd3463be0bf7ec73
https://addons.mozilla.org/en-US/firefox/addon/youtube-addon/
┆Issue is synchronized with this Jira Task
Likely https://mozilla.sentry.io/issues/7583175139/. Need to investigate further what's going on, the attached zip should help, let's see if we can reproduce locally.
Hey. It looks like your zip file has a problem. When I try to unzip it locally (macOS), I am getting this:
checkdir error: /private/tmp/wip/_locales/bn_BD exists but is not directory
unable to process _locales/bn_BD/.
checkdir error: /private/tmp/wip/_locales/bn_BD exists but is not directory
unable to process _locales/bn_BD/messages.json.
unzip -l -v ~/Downloads/improvedtube_firefox.zip |grep bn_BD
31647 Defl:N 5808 82% 05-30-2026 02:02 aca13cf9 _locales/bn_BD
0 Stored 0 0% 06-30-2026 00:12 00000000 _locales/bn_BD/
31647 Defl:N 5808 82% 06-30-2026 00:12 aca13cf9 _locales/bn_BD/messages.json
Looks like your archive has both a bn_BD/ folder and a bn_BD text file in _locales/, which does not seem to be valid?
Looks like your archive has both a bn_BD/ folder and a bn_BD text file in _locales/, which does not seem to be valid?
That helped.
It could mention the detail and/or allow to refuse the strictness.
We should raise an error if we find symlinks - we're already validating each individual member of the zipfile, so something like stat.S_ISLNK(member.external_attr) in that. We should probably still allow that for source uploads though?
From what I've read, the zip format doesn't preserve symlinks so I am not sure we can determine whether a file is a symlink or not when reading the archive.
It's definitely possible (though I would imagine not well supported), the zip command on my linux machine has a -y option for that:
% zip --help | fgrep -- -y
-y store symbolic links as the link instead of the referenced file
% ln -s foo bar
'bar' -> 'foo'
% zip -y lol.zip bar
adding: bar (stored 0%)
% unzip -t lol.zip
Archive: lol.zip
testing: bar OK
And then in Python (according to a bit of googling, we need to add an obscure bit shift to get the info from external_attr (*)):
>>> z = zipfile.ZipFile('lol.zip')
>>> z.infolist()
[<ZipInfo filename='bar' filemode='lrwxrwxrwx' file_size=3>]
>>> i = z.infolist()[0]
>>> stat.S_ISLNK(i.external_attr >> 16)
True
However, looking at this zip, it's not exactly what happened here - here bn_BD is not stored as a link, but as an extra file with the same name as a directory (which I imagine did come from a link originally). At the cost of looping around the members of the zip an extra time, we could see if there are any clashes between files and directories to catch that.
(*) From zipfile's ZipInfo.__repr__():
hi = self.external_attr >> 16
lo = self.external_attr & 0xFFFF
if hi:
result.append(' filemode=%r' % stat.filemode(hi))
Thank you for caring. Left such .zip for review as our Chrome Web Store Testing Version, just out of curiosity, resulting in a later "Rejection notification" ... "Could not unzip extension " - So Mozilla still wins this time (as of no delay)
May we¹ join your team?😃 While serving 850k+ users, i'm more motivated contributing to more complex code with more usage and it is strange that FOSS has no global coordinated priority To-Do list, is it? (Like the biggest repo² does have https://en.wikipedia.org/wiki/Special:WantedPages)
¹ 176 People joined this Github Org with no money. Several awesome contributors are in very poor places, rural West Bengal and Africa.
² Wikpedia is also a repo, even if largely backwards compatible to real brain processing.