Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon Validation Error when using static initialization blocks in add-on code #1403

Closed
qt-kaneko opened this issue Apr 1, 2022 · 6 comments
Assignees
Milestone

Comments

@qt-kaneko
Copy link

qt-kaneko commented Apr 1, 2022

So, the problem is in class static initialization block. When it exists, error occurres, even if it is empty, even if there is no other code. (See in scripts/player.js:13)

P.S. In browser all works fine.

publish.zip

@diox
Copy link
Member

diox commented Apr 1, 2022

Hi,

It looks like an error with our scanners, yes. Weirdly, I can't reproduce locally with the version we use in production... But I see it in the logs, and you're right, it's caused by the class static block. We'll investigate.

@diox
Copy link
Member

diox commented Apr 13, 2022

Depends on estools/estraverse#120

@diox diox self-assigned this Apr 19, 2022
@diox diox added this to the 2022.04.21 milestone Apr 19, 2022
@diox
Copy link
Member

diox commented Apr 20, 2022

We've made a fix in our private scanners that should resolve the problem. It should be in production on 2022-04-21 after 19:00 UTC+2.

@diox diox closed this as completed Apr 20, 2022
@diox diox changed the title Addon Validation Error Addon Validation Error when using static initialization blocks in add-on code Apr 20, 2022
@ioanarusiczki
Copy link

@diox

A bit confusing that the reporter says
P.S. In browser all works fine.

But I tested the .zip file attached above on dev and stage and I could upload it plus a new version.
Also, it works through the API (the new feature) on dev and stage.

Right now on -prod the validation fails from dev hub or using the APIs.

@diox
Copy link
Member

diox commented Apr 21, 2022

P.S. In browser all works fine.

That's because it works if you install the unsigned xpi through about:debugging (or when disabling signatures). i.e. that was purely something on the AMO side, Firefox supported that syntax correctly.

@ioanarusiczki
Copy link

@diox Ah ok, which means that my testing method was correct.

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

No branches or pull requests

3 participants