glamrock/cupcake

Status lists itself as "dead" inaccurately

Closed this issue · 2 comments

So right now, rapid network changes will trigger a false dead signal and seemingly remain that way. However, it is not actually dead or disabled in any way, just idle. It will still become active, and after it returns to an idle state, it displays the correct icon.

This happens in a no-internet environment and when behind a captive portal. (Which, given that I am frequently behind captive portals, this likely happens more than with most users).

Proposed initial fixes:

  • A) set background to re-initialize flashproxy.js at regular intervals, if the status is something other than active.
  • B) force dead-status flash proxies to retry connection every 10 minutes.

Future upstream fixes:

  • Change dead to waiting, since it seems to be waiting for a real connection
  • Ensure that flash proxies with dead/waiting status occasionally re-check connection

Edit: this is also Tor issue #11400.

After more testing, this seems to be an upstream quirk. It's idle but declaring its status as dead for some reason. Still working on an upstream fix (B) but setting an interim patch to keep users from mistakenly thinking that their network settings are broken.

This bug is resolved with an upstream patch contributed by David Fifield:

Index: proxy/flashproxy.js
===================================================================
--- a/proxy/flashproxy.js
+++ b/proxy/flashproxy.js
@@ -589,7 +589,6 @@ function FlashProxy() {
                like "Component returned failure code: 0x805e0006
                [nsIXMLHttpRequest.open]" on Firefox. */
             puts("Facilitator: exception while connecting: " + repr(err.message) + ".");
-            this.die();
             return;
         }
         xhr.responseType = "text";
@@ -599,7 +598,6 @@ function FlashProxy() {
                     this.fac_complete(xhr.responseText);
                 } else {
                     puts("Facilitator: can't connect: got status " + repr(xhr.status) + " and status text " + repr(xhr.statusText) + ".");
-                    this.die();
                 }
             }
         }.bind(this);
@@ -681,7 +679,6 @@ function FlashProxy() {
             proxy_pair.connect();
         } catch (err) {
             puts("ProxyPair: exception while connecting: " + safe_repr(err.message) + ".");
-            this.die();
             return;
         }