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

Getting "Error decoding signature" with `web-ext sign` #11597

Open
bfred-it opened this issue Jun 6, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@bfred-it
Copy link

commented Jun 6, 2019

Describe the problem and steps to reproduce it:

Our extension has been being published via web-ext-submit (a plain shell script that only filters the output of $ web-ext sign) and for the past couple of weeks we've been having issues.

First it was https://travis-ci.org/sindresorhus/refined-github/builds/540130635#L691

Building web extension from /home/travis/build/sindresorhus/refined-github/distribution
Error: Received bad response from the server while requesting https://addons.mozilla.org/api/v3/addons/%7Ba4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad%7D/versions/19.5.30.1925/
status: 403
response: {"detail":"Before starting, please read and accept our Firefox Add-on Distribution Agreement as well as our Review Policies and Rules. The Firefox Add-on Distribution Agreement also links to our Privacy Notice which explains how we handle your information."}

I have no idea of what that referred to; I found the agreement on Google but there was nothing to accept, even in the AMO Developer Hub.


Then I published the extension locally with $ web-ext sign using my keys — it worked! So I changed the keys on Travis (which had had @sindresorhus's keys for 1+ years) and now we've been getting this message: https://travis-ci.org/sindresorhus/refined-github/builds/540188019#L692

Building web extension from /home/travis/build/sindresorhus/refined-github/distribution
Error: Received bad response from the server while requesting https://addons.mozilla.org/api/v3/addons/%7Ba4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad%7D/versions/19.6.3/
status: 401
response: {"detail":"Error decoding signature."}

I don't know what could cause this either but... replacing web-ext-submit with a plain web-ext sign fixed it. See deployment in https://travis-ci.org/sindresorhus/refined-github/jobs/542204643#L675

Now I wonder why that would happen. web-ext-submit is a plain shell script that runs web-ext sign and pipes its content out; why would web-ext be affected by that? And what does these two errors even mean? Can you make them more clear?

Thanks for reading :)

@diox

This comment has been minimized.

Copy link
Member

commented Jun 6, 2019

Hi,

The first error is because the keys you used belonged to a user that hasn't validated the latest Firefox Add-on Distribution Agreement. Logging in with that user and trying to submit an add-on or go to the API keys page should prompt that user to accept the agreement. The fact that it worked previously was a bug on our end, you shouldn't have been able to submit anything with an account that hasn't validated the latest agreement (it doesn't change very often, but it has).

The second error indicates that your JWT is incorrect - You're receiving a 401 because, as the message suggests, we're unable to decode the signature inside the authentication token. Are you sure both attempts were using the same credentials ?

@bfred-it

This comment has been minimized.

Copy link
Author

commented Jun 6, 2019

go to the API keys page should prompt that user to accept the agreement

Can the error be updated to include a URL to that page?

Are you sure both attempts were using the same credentials ?

👍 That looks like it's the issue. To be doubly-sure I also had updated the keys when switching to web-ext sign. I guess that last week I copy-pasted the keys incorrectly.

It works now.

Can the error be improved? e.g. "The provided keys weren't valid" because I don't know what signature the current error is referring to.

@bfred-it bfred-it changed the title Getting "Error decoding signature" with `web-ext sign` run a in shell script Getting "Error decoding signature" with `web-ext sign` Jun 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.