Promise resolve not called because popup closes too fast
问题 I have the following piece of code: browser.windows.create({ url: urls }).then((newWindow) => { newWindow.tabs.slice(0, pins.length).map((tab, index) => { browser.tabs.update(tab.id, { pinned: true }) }) }) It works great when I prevent the popup from closing (via webdev tools) but in a regular use case, the resolve is not triggered. 回答1: I struggled with this same problem when I started working on my addon (In My Pocket for Firefox, you can have a look at the code on bitbucket if it can help