I have Firefox ver 61.0.2 and was getting the “Connection Failure” dialogue upon trying to install BTTV. After disabling both my antivirus programs (Malwarebytes and Bitdefender) I was still getting the error message.
Well I found this solution on Reddit and it worked for me: https://www.reddit.com/r/Twitch/comments/5wp6aa/workaround_betterttv_connection_failure_during/
Thought I would post this here in case anyone else is having the issue.