Skip to content
This repository has been archived by the owner on Dec 3, 2017. It is now read-only.

browser-action-jplib do not meet the criteria of amo #13

Open
Thompsen13 opened this issue Mar 25, 2014 · 7 comments
Open

browser-action-jplib do not meet the criteria of amo #13

Thompsen13 opened this issue Mar 25, 2014 · 7 comments

Comments

@Thompsen13
Copy link

The dokumentation says:

default_title: 'Badge title', // optional; shown in tooltip
default_popup: 'popup.html' // optional
So i have to store the html-file in /data.

AMO editor says:

  1. We cannot allow executable data, such as JavaScript and HTML files, to be stored as data: URLs in static JavaScript strings. Please store them as individual files in your XPI.

  2. console.error: mtag-toolbar-button:
    Message: RequirementError: The contentURL option must be a valid URL.
    Stack:
    @:0

@Rob--W
Copy link
Owner

Rob--W commented Mar 25, 2014

  1. lib/browser-action-jplib-data.js is auto-generated using build.js from https://github.com/Rob--W/browser-action-jplib/tree/master/data to fix https://github.com/Rob--W/browser-action-jplib/issues/1.

    Looking over the Addon review guidelines, I guess that your add-on got rejected because of "Obfuscated, minified or binary code". According to the same source, if you include a link to the original sources, then the review should be passed up to an Admin reviewer (and probably get approved because it's obvious that this library is not harmful).

    See second and third row at https://wiki.mozilla.org/AMO%3aEditors/EditorGuide/AddonReviews#Policies_and_actions_2

  2. Cannot reproduce. Can you provide source code or a xpi file that can be used to reproduce this error? What Firefox version are you using?

@paracetamolo
Copy link

I got another addon rejected because of 1). The proposed solution for 1) was rejected by an AMO reviewer, he said:

The module will need to include the sources as separate files and reference them by the appropriate resource URL. SDK packages are perfectly capable of including resource files, they just need to reference them relative to module.uri rather than using data.url

I'm not sure if there was any progress regarding #1 in the addon-sdk.

@Rob--W
Copy link
Owner

Rob--W commented Apr 8, 2014

@paracetamolo Have you included a link to this issue / the source code? According to the review guidelines, your add-on should be passed up to an admin reviewer in case of "Obfuscated, minified or binary code" . Use the comments box at your add-on to explain that you're using this library.

If that did not help, reply to the email and ask why the add-on was rejected despite the link to the original source code.

@paracetamolo
Copy link

Yes, this issue was linked and I explained it was a workaround for a bug in the sdk. The reviewer claims that the sdk supports loading resource files and, if this is true, he is rightfully asking to load them separately instead of doing a weird hack. The question is if #1 is still around or not.

@Rob--W
Copy link
Owner

Rob--W commented Apr 8, 2014

The SDK indeed supports loading resource files, but not from third-party libraries.

To comply with the review rules, you could copy the files from https://github.com/Rob--W/browser-action-jplib/tree/master/data to your extension's resource directory, and edit https://github.com/Rob--W/browser-action-jplib/blob/master/lib/browser-action-jplib-data.js to use the sdk/self library:

'use strict';
const {load, url} = require('sdk/self');
exports.load = load;
exports.url = url;

This is a terrible solution though, because you -as a library user- should not have to worry about the implementation details of a library in order to use it.

Rob--W referenced this issue in kronoscode/browser-action-jplib May 16, 2014
@fitoria
Copy link

fitoria commented May 16, 2014

Update, the code should be this one:

'use strict';
var self = require('sdk/self');
exports.url = self.data.url;
exports.load = self.data.load;

@vanduc1102
Copy link

Hi all,
My addons : https://addons.mozilla.org/addon/facebook-like-all/
I used your library, and it was approved after rejected two times.
I sent them the link of this issues

Thanks so much you @Rob--W

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants