Vis4Sense / HistoryMap

http://sensemap.io
60 stars 7 forks source link

Closing an ignoredUrl Tab causes an error message #125

Closed HumzahJavid closed 5 months ago

HumzahJavid commented 6 years ago

The issue

What is the issue?

When closing any tab with an ignoredUrl: https://github.com/Vis4Sense/HistoryMap/blob/746e5affd0a6a4b7666697dc592af9c75af608e9/src/historyMap/browser.js#L31-L39 Chrome produces the following error message: image

The function causing the issue was added in the solution to issue #101: https://github.com/Vis4Sense/HistoryMap/blob/746e5affd0a6a4b7666697dc592af9c75af608e9/src/historyMap/browser.js#L153-L157

To re-create the issue:

Start the extension, make sure the history map is active. Open any webpage with an ignored url i.e the extension page or a "new tab" tab. Close the tab view error message in chrome inspector.

HumzahJavid commented 6 years ago

Issue fixed by adding a separate data structure to keep track of tab ids to tab url (for ignored urls). Would have been easier if Chrome provided tab info in "removeInfo" as part of the OnRemoved listener.

It is not possible to detect already open tabs which contain ignoredUrl, (i.e the tab was open when the extension was started but the page was not brought into focus, closing these tabs, will still produce the error message.

Harmless error:

Ps: The error message seems to be harmless as it doesn't obstruct functionality of historyMap