jannispinter / indicatetls

Addon for Mozilla Firefox that displays the TLS protocol version of websites you visit
https://addons.mozilla.org/firefox/addon/indicatetls/
Mozilla Public License 2.0
64 stars 12 forks source link

Browser console error: `tabMainProtocolMap.get(...) is undefined` #45

Open johnp opened 4 years ago

johnp commented 4 years ago

The extension frequently causes the following error to be displayed in the browser console:

20:13:31.782 can't access property "protocolVersion", tabMainProtocolMap.get(...) is undefined 2 background.js:54
    loadSavedSecurityInfoAndUpdateIcon moz-extension://18647e97-ca2d-4bbb-979a-557087b95623/background.js:54
    apply self-hosted:1870
    applySafeWithoutClone resource://gre/modules/ExtensionCommon.jsm:614
    fire resource://gre/modules/ExtensionChild.jsm:775
    recvRunListener resource://gre/modules/ExtensionChild.jsm:779
    recvRunListener self-hosted:844
    _recv resource://gre/modules/ConduitsChild.jsm:78
    receiveMessage resource://gre/modules/ConduitsChild.jsm:169
    run resource://gre/modules/ConduitsChild.jsm:160
    receiveMessage resource://gre/modules/ConduitsChild.jsm:161
    map self-hosted:240
    receiveMessage resource://gre/modules/ConduitsChild.jsm:161

This happens on Firefox Nightly with, among other things, fission enabled.

Most likely broken by ea5d372ef0d1620097457134fb6312c9d2f4cc91:

 async function loadSavedSecurityInfoAndUpdateIcon(details) {
-    cached_version = tabMainProtocolMap.get(details.tabId);
+    cached_version = tabMainProtocolMap.get(details.tabId).protocolVersion;
     if (typeof cached_version !== "undefined" && cached_version !== "unknown") {
Radagast commented 4 years ago

Confirming this on Nightly.

jannispinter commented 4 years ago

Thank you for reporting this, I've just committed a change that should fix the problem.