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

Invalid or corrupt add-on file. #14796

Closed
1 task done
HarlemSquirrel opened this issue May 20, 2024 · 4 comments
Closed
1 task done

Invalid or corrupt add-on file. #14796

HarlemSquirrel opened this issue May 20, 2024 · 4 comments
Assignees

Comments

@HarlemSquirrel
Copy link

HarlemSquirrel commented May 20, 2024

What happened?

Trying to follow this guide to publish our add-on that was removed when the creator deleted their Firefox account several months ago.

keeweb/keeweb-connect#55
https://github.com/keeweb/keeweb-connect/actions/runs/9162885880/job/25190819248?pr=55

Uploading 190.27KB file web-ext-artifacts/keeweb_connect-0.3.7.13.zip
response.status: 201
response.body: {
  uuid: '85e4db483b1b4cd1a745ff1138335dc1',
  channel: 'listed',
  processed: false,
  submitted: false,
  url: 'https://addons.mozilla.org/api/v5/addons/upload/85e4db483b1b4cd1a745ff1138335dc1/',
  valid: false,
  validation: null,
  version: null
}
Will check validation status in a 60s...
validationData {
  uuid: '85e4db483b1b4cd1a745ff1138335dc1',
  channel: 'listed',
  processed: true,
  submitted: false,
  url: 'https://addons.mozilla.org/api/v5/addons/upload/85e4db483b1b4cd1a745ff1138335dc1/',
  valid: false,
  validation: {
    errors: 1,
    warnings: 0,
    notices: 0,
    success: false,
    compatibility_summary: { notices: 0, errors: 0, warnings: 0 },
    metadata: { listed: true },
    messages: [ [Object] ],
    message_tree: {},
    ending_tier: 5
  },
  version: null
}
validationData.validation.messages [
  {
    id: [ 'validator', 'unexpected_exception' ],
    message: 'Invalid or corrupt add-on file.',
    description: [
      'Validation was unable to complete successfully due to an unexpected error.',
      'Check https://developer.mozilla.org/en-US/Add-ons/WebExtensions to ensure your webextension is valid or file a bug at http://bit.ly/1POrYYU'
    ],
    type: 'error',
    fatal: true,
    tier: 1,
    for_appversions: null,
    uid: '35432f419340461897aa8362398339c4'
  }
]
/home/runner/work/keeweb-connect/keeweb-connect/.github/publish-firefox-addon.js:93
            throw new Error('Extension did not validate in time.');
                  ^
Error: Extension did not validate in time.
    at /home/runner/work/keeweb-connect/keeweb-connect/.github/publish-firefox-addon.js:93:19
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.20.2
Error: Process completed with exit code 1.

What did you expect to happen?

I am able to load the addon using Firefox Developer Edition just fine and the lint returns only a single warning so I expect the addon to publish correctly.

Uploading the same file using the web page I see the same one warning and I am not blocked from uploading and continuing to publish the addon.

image

Is there an existing issue for this?

  • I have searched the existing issues

┆Issue is synchronized with this Jira Task

@diox
Copy link
Member

diox commented May 20, 2024

Hi,

Could you post the exact zip somewhere so we could investigate ?

@HarlemSquirrel
Copy link
Author

@diox Sure! Here it is
keeweb_connect-0.3.7.13.zip

@diox
Copy link
Member

diox commented May 21, 2024

At first glance I don't see anything wrong with this file. The fact that it works using the Developer Hub upload is quite strange, it's the same validation code underneath.

Could you try with https://github.com/mozilla/web-ext/ instead of your custom JS code to submit an add-on ? It may be a bug in your code or our API docs (Maybe a missing Content-Type? Completely wrong file contents ? That error indicates we couldn't open the file as a zip file)

@diox diox self-assigned this May 21, 2024
@HarlemSquirrel
Copy link
Author

OK well using the submission API with npx web-ext sign --use-submission-api --channel=listed worked perfectly!

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

2 participants