quickmove-extension icon indicating copy to clipboard operation
quickmove-extension copied to clipboard

TB76.0b1: type error for parameter accounts (Error processing 0: Unexpected property "identities") for quickmove.sortAccounts. at popup.js:22:38

Open tessarakt opened this issue 5 years ago • 2 comments

I'm using 2.0.0pre1.

With Thunderbird 76.0b1, the folder list does not get displayed.

Steps to reproduce:

  1. In Inbox, focus on the message list, press "G".

Actual result: The popup opens, but the list of folders is empty. Expected result: After max. 1 second, the list in the popup contains folders.

In the debugger, I see the following:

Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf inline blockiert ("default-src"). panel.js:62:24 Error: Type error for parameter accounts (Error processing 0: Unexpected property "identities") for quickmove.sortAccounts. popup.js:22:38

popup.js:22 is:

accounts = await browser.quickmove.sortAccounts(accounts);

Indeed this no longer matches schema.json, identities apparently has been added.

tessarakt avatar Apr 16 '20 20:04 tessarakt

I tried to update schema.json as follows:

[{
  "namespace": "quickmove",
  "types": [
    {
      "id": "Identity",
      "type": "object",
      "properties": {
        "accountId": { "type": "string" },
        "email": { "type": "string" },
        "id": { "type": "string" },
        "label": { "type": "string" },
        "name": { "type": "string" },
        "organization": { "type": "string" },
        "replyTo": { "type": "string", "optional": true }
      }
    },
    {
      "id": "MailAccount",
      "type": "object",
      "properties": {
        "folders": { "type": "array", "items": { "$ref": "folders.MailFolder" }},
        "id": { "type": "string" },
        "name": { "type": "string" },
        "type": { "type": "string" },
        "identities": { type: "array", "items": { "$ref": "Identity" }}
      }
    }
  ],

But I still get the same error message ... Any ideas why?

tessarakt avatar Apr 16 '20 20:04 tessarakt

Now I just put

    {
      "id": "MailAccount",
      "type": "object",
      "properties": {
        "folders": { "type": "array", "items": { "$ref": "folders.MailFolder" }},
        "id": { "type": "string" },
        "name": { "type": "string" },
        "type": { "type": "string" },
        "identities": { "type": "any" }
      }
    }

This works.

tessarakt avatar Apr 20 '20 10:04 tessarakt

This should work in Thunderbird 115

kewisch avatar Aug 19 '23 19:08 kewisch