Regarding our add-on rejected by mozilla team

Hi Team,

Our wallet has been uploaded as a Firefox extension. However, we received an error notification via email from the Firefox team a few days after the upload. The error details have been attached below. Kindly Assist.

Thanks in Advance.

Error:

A reviewer at addons.mozilla.org found an issue when reviewing version 1.0.3 of the add-on Metatron and requests additional information. You are receiving this email because you are listed as an author of this add-on.

An add-on reviewer wrote:

  • Sources, specifically Sources or instructions missing: Your add-on contains minified, concatenated or otherwise machine-generated code. You need to provide the original sources, together with instructions on how to generate the exact same code used in the add-on. Source code must be provided as an archive and uploaded using the source code upload field, which can be done during submission or on the version page in the developer hub. Instructions can be provided in a top-level README file inside the source code package or in the “Notes to Reviewers” field on the version page in the developer hub.

To respond, please reply to this email or visit https://addons.mozilla.org/en-US/developers/addon/metatron/versions.

Thank you for your attention.

–
Mozilla Add-ons
https://addons.mozilla.org

Hello @pemaju02. It looks like the review team is having issues building your add-on due to “minified, concatenated or otherwise machine-generated code.” If you are not certain how to address, please reply to the review team.

We have previously attempted to address the issue by reviewing the team’s feedback via email. However, they have also replied that same error what we were mentioned above. We kindly request your guidance on alternative approaches to tackle this issue.

Thank you.

What build system/steps do you use?
Did you uploaded also your “package-lock.json” file?
Also, make sure to use “npm ci” instead of “npm install”, that will create same node_modules folder on each device.

  1. What build system/steps do you use?
    step 1: create the dist folder using “yarn dist” command.
    step2: compress the dist file in .zip format.
    step3: upload the dist(zip format) folder in firefox addon.

  2. Did you uploaded also your “package-lock.json” file? - No, we have been uploaded dist file only

  3. Also, make sure to use “npm ci” instead of “npm install”, that will create same node_modules folder on each device. - same node modules files have been used on each device, but we have used yarn package for install the node modules.

Firefox store requires original source code (unlike other stores) and reviewer needs to be able to reproduce the exact final build from the provided source code.

More info here:

1 Like

Thank you for your support. I have a further question regarding the original source code. Is it possible to upload the original source code without including the “node_modules” folder? Can you confirm this for me?

Yes, as long as you provide script for creating the “node_modules” folder.
For example, my README.md file for reviewer has these instructions:

# How to Build extension: #
Using NodeJS 20, go to folder with `package.json` file and run:
1) `npm ci`
2) `npm run prod`

Minified version will be created in "dist/firefox_prod.zip" archive.

This will first create the node modules and then run the “prod” script that builds the addon.

It’s best if you can test it yourself, for example create virtual machine with Ubuntu and try your build steps to see if you get the same result.

I’ve actually wrote a simple bash script for verifying that my build produces the same result in Ubuntu using git (for inspiration):

#!/bin/bash
echo "Starting build"
rm -rf ~/Desktop/build
mkdir ~/Desktop/build
cd /media/sf_tmp/_build
unzip firefox_prod.zip -d ~/Desktop/build/firefox_prod
unzip firefox-source-files.zip -d ~/Desktop/build/firefox-source-files
cd ~/Desktop/build/firefox_prod
# use Git to track changes
git init
git add .
git commit -m 'test'
# delete all files
mkdir ../deleteme
mv * ../deleteme
rm -rf ../deleteme

# build files from sources:
cd ../firefox-source-files
npm ci
npm run prod
unzip ./dist/firefox_prod.zip -d ../firefox_prod
cd ../firefox_prod
git status
# wait for user input
read -p "Press enter to continue"
2 Likes