Closed ankushagarwal closed 5 years ago
This is because of Firefox's code generation policy. They require the source code to be submitted along with the extension bundle, and they want this to be fully reproducible; however, by default the webpack configuration uses hashes to create unique file names in the resulting build to prevent cache collisions, therefore the build is not exactly reproducible in the sense of character-by-character equivalence. We need an improvement for this which would disable the hash-naming of Webback to allow fully-reproducible builds.
Thanks for your response! Is there a way I can locally install the extension from the repo?
On Fri, Nov 23, 2018 at 3:12 AM Burak Karakan notifications@github.com wrote:
This is because of Firefox's code generation policy. They require the source code to be submitted along with the extension bundle, and they want this to be fully reproducible; however, by default the webpack configuration uses hashes to create unique file names in the resulting build to prevent cache collisions, therefore the build is not exactly reproducible in the sense of character-by-character equivalence. We need an improvement for this which would disable the hash-naming of Webback to allow fully-reproducible builds.
— You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/karakanb/devo/issues/15#issuecomment-441214311, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwpFaDZ4COVRGoFiOOIzlExLwg5PU1Iks5ux9gZgaJpZM4YwX3c .
-- Ankush Agarwal
Sure, just clone the repo, run npm install
, then run npm run build
, which will generate the extension build into build
directory. Then use the browser's extensions page, click on Load unpacked extension
and select the build
directory.
Thanks @karakanb! That worked for me.
No worries, I am glad that it worked. I'll leave the issue open in case someone would like to submit a PR or I can get the time to investigate this.
I know how to fix this, it should be 3 lines in webpack's configuration, but where it is located ? I will look deeper and hopefully do a PR this evening.
EDIT : found this => https://cli.vuejs.org/guide/webpack.html#simple-configuration, can't find it either, where should it be located if I needed to create one ?
I think the configuration needs to be extracted into a seperate file called vue.config.js
in the project root, next to the package.json
. A sample content of that config file from another project of mine is as follows, just to set an example:
module.exports = {
runtimeCompiler: true,
chainWebpack: config => {
config.module.rules.delete('svg');
},
configureWebpack: {
devtool: 'source-map',
module: {
rules: [
{
test: /\.svg$/,
loader: 'vue-svg-loader',
},
],
},
},
};
Perfect, I'll give it a try this evening, this should be easy.
Thanks a lot, I think it should be relatively easy as well, also please make sure that the build result is reproducible when/if you submit the PR, which means the output files in the dist
directory of two consecutive builds should be exactly the same, both for the content and the file names, this is the requirement of the Firefox store.
Found some time, it was reaaaaaally simple. https://github.com/karakanb/devo/pull/16 Associated documentation : https://cli.vuejs.org/guide/html-and-static-assets.html#disable-index-generation
This one is closed by #16.
For your information, I have published it on Firefox Add-ons again, which can be found here.
@karakanb It is 404 again
Thanks for informing, I didn't get any warnings from Mozilla this time. I am gonna investigate.
Hey, any news ?
Unfortunately, not yet. I have resubmitted the code, and they rejected again saying the maps are not matching even though there are no maps. I am trying to reproduce it, but couldn't look into it in the last 2 weeks.
When uploading the extension, you basically build the code, bundle it into a zip file, submit it, and then bundle the source code itself into another zip file and submit that as well. At that point, when they get the extension into the review process they basically get the source code, follow the instructions in readme and compare the output of the build process with the submitted extension file. In this case, they say those two results are not matching, but that is how I build the extension as well, therefore I don't know what I'll do exactly.
I have updated the dependencies just now, bumped the version to 1.1.3
and uploaded to both of the stores again, let's see how Mozilla reacts to the new version, I have compared the outputs of multiple builds and they seem identical.
Firefox version seems to be live again: https://addons.mozilla.org/tr/firefox/addon/devo-new-tab/
The link is still working, I assume it is fixed and closing the issue. Feel free to open it if you guys still find it missing, I'll try to be more careful about the Firefox store updates.
https://addons.mozilla.org/en-US/firefox/addon/devo-new-tab/ - this 404s