Page MenuHomePhabricator

Aphlict master doesn't handle connection failures
Closed, ResolvedPublic

Description

It seems that the AphlictMaster will happily "connect" to the Aphlict server, even if the Aphlict server (that is, the NodeJS server) is not running. Possibly the AphlictMaster should raise some sort of error in this case (notifications are enabled but don't seem to be working) or, at least, the AphlictMaster should just die quietly.

Event Timeline

joshuaspence claimed this task.
joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Aphlict.
joshuaspence added subscribers: joshuaspence, epriestley.

This might be tricky to handle correctly.

It seems that, if the AphlictMaster fails to connect to the Aphlict server after 20 seconds (the default socket timeout), a SecurityErrorEvent will be triggered. I'm not quite sure how we can differentiate between a SecurityErrorEvent triggered by a connection failure versus a SecurityErrorEvent triggered by a legitimate security error.

Source: http://helpx.adobe.com/flash/kb/flash-player-10-socket-connection.html

Also, this explains why users have been reporting that Aphlict was generating an "Error #2048" error. This was largely fixed by D9418, but the root cause was that the Aphlict client was being created (even though notifications were disabled) and failing to connect to the (non-running) Aphlict server.

(I think the underlying cause of the security error is that the Aphlict server isn't running on port 843, so the client isn't able to read the policy file)

Can I steal this and T5365, or do you have local progress on them?

No, I haven't gotten around to these. Go ahead.

I'm going to close this since we have a way to do something mostly reasonable-ish now (i.e., not scary and confusing) and do something reasonable-ish for the most common issue (flash policy server issues). The actual behavior in response to various errors can be improved, but T5365 can cover that.