Closed
Bug 1225791
Opened 10 years ago
Closed 2 years ago
Unexpected error during validation with `new require("foo").bar();`
Categories
(addons.mozilla.org Graveyard :: Add-on Validation, defect)
addons.mozilla.org Graveyard
Add-on Validation
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: mash, Unassigned)
Details
Attachments
(2 files)
Please attach a copy of your add-on, and fill in the following information:
* Whether this error occurred during the submission of a new add-on, a new version of an existing add-on, a new file in an existing version, or an upload to the standalone validator.
New version
* Whether your add-on is listed or unlisted.
Listed
* The URL where you submitted the add-on.
https://addons.mozilla.org/ru/developers/addon/yandex-visual-bookmarks/versions#version-upload
* The approximate time you submitted the add-on, with timezone.
18 nov 2015 14:55 (GMT+4)
Validation results:
https://addons.mozilla.org/ru/developers/upload/1773743aa4f2470b8e72b4b31a899237
Comment 1•10 years ago
|
||
I can confirm this in https://addons.mozilla.org/developers/addon/validate
It could be related to the high number of warnings being generated by the add-on code. The add-on is pretty large as well (2Mb).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•10 years ago
|
||
Danil, please try uploading again using a higher version number.
| Reporter | ||
Comment 3•10 years ago
|
||
Same result
https://addons.mozilla.org/ru/developers/upload/0df9aa9893514ab7aaca03bd7b8dc404
Also, I see lot of "JS Library Detected" for files/dirs that is not libraries. For example,
---
JS Library Detected
Предупреждение: JavaScript libraries are discouraged for simple add-ons, but are generally accepted.
File 'chrome/locale/kk/about/' is a known JS library
chrome/locale/kk/about/
---
| Reporter | ||
Comment 4•10 years ago
|
||
I was remove "cbapp/parts/chrome-backend/chrome/history/db-wrapper.js" file and try again on https://addons.mozilla.org/developers/addon/validate
Many warnings, but no error. Seems like validator does not like
```
get dbWrapper() {
let dbWrapper = new require("app").core.Lib.Database();
dbWrapper.connection = placesUtils.history.DBConnection.clone(true);
Object.defineProperty(this, "dbWrapper", { value: dbWrapper });
return dbWrapper;
},
```
But I don't know why.
How I can rewrite this code for validation?
Comment 5•10 years ago
|
||
What happens if you create a test add-on with only that code? Do you still see the error?
| Reporter | ||
Comment 6•10 years ago
|
||
Yes, I still see error. Minimum code:
`new require("foo").bar();`
This code is valid, but I'm going to write it. It seems it's not quite what I wanted. And might confuse other developers.
But first result (https://addons.mozilla.org/ru/developers/upload/1773743aa4f2470b8e72b4b31a899237) was confusing. Just "unexpected error" without code.
Thank you!
| Reporter | ||
Comment 7•10 years ago
|
||
>> but I'm going to write it
rewrite it. Sorry my english.
Comment 8•10 years ago
|
||
Thank you for figuring out the code causing this error. Let me know if you have any more problems submitting your add-on.
Summary: Unexpected error during validation → Unexpected error during validation with `new require("foo").bar();`
| Assignee | ||
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•