// inside capture.setThirdParty
if (this.isVisibleTab(response.tabId)) {
const tab = await browser.tabs.get(response.tabId);
firstPartyUrl = new URL(tab.url);
}
// ...
If the user closes a tab, and we have requests that tab previously made still in our queue, when capture tries to process these requests, we get the following error:
Error: Invalid tab ID: X where X is the closed tab's ID and X !== -1 (i.e. the tab is visible)
This happens on browser.tabs.get...TypeError: tab is undefined
This happens immediately afterwards on firstPartyUrl = new URL(tab.url)
From
capture.setThirdParty
:If the user closes a tab, and we have requests that tab previously made still in our queue, when capture tries to process these requests, we get the following error:
Error: Invalid tab ID: X
where X is the closed tab's ID and X !== -1 (i.e. the tab is visible)browser.tabs.get...
TypeError: tab is undefined
firstPartyUrl = new URL(tab.url)
We should consider how to handle these requests.