Closed Bug 1727988 Opened 4 years ago Closed 4 years ago

browserAction.setIcon() throws "IconPath not found" error

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

Thunderbird 91
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1725144

People

(Reporter: r-a-y, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

This is a simplified version of the code I'm using to change the button icon when a button is clicked:

browser.browserAction.onClicked.addListener(() => {
const icon = 'icons/heart-outline.svg'

browser.browserAction.setIcon({ path: { '16': icon, '32': icon } })
})

Note that "icon" is a relative path.

Actual results:

In v78, when I clicked on my browserAction button, my button would also change its icon.

In v91, I get the following error:

13:13:21.008 Error: Internal error: Type IconPath not found Schemas.jsm:1602:13
get targetType resource://gre/modules/Schemas.jsm:1602
normalize resource://gre/modules/Schemas.jsm:1609
<anonymous> resource://gre/modules/Schemas.jsm:1508
withChoices resource://gre/modules/Schemas.jsm:601
normalize resource://gre/modules/Schemas.jsm:1500
r resource://gre/modules/Schemas.jsm:2014
withPath resource://gre/modules/Schemas.jsm:639
checkProperty resource://gre/modules/Schemas.jsm:2013
normalize resource://gre/modules/Schemas.jsm:2086
fixedArgs resource://gre/modules/Schemas.jsm:2691
map self-hosted:221
checkParameters resource://gre/modules/Schemas.jsm:2686
stub resource://gre/modules/Schemas.jsm:2792
setBrowserAction moz-extension://a01d4993-3d74-47e9-890f-43b80f873ae1/background.js:25
<anonymous> moz-extension://a01d4993-3d74-47e9-890f-43b80f873ae1/background.js:31

Expected results:

In v91, the button icon should change as it did in previous versions.

It doesn't appear that browserAction.setIcon has changed since v78.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.