I've encountered the same kind of issue and tried evertything I could (several virus scans, applying the avast "solutions" etc). I was ready to reinstall avast, but even the download of the "avast_internet_security_setup_offline" exe was failing again and again.
Until I decided to switch the "GAME MODE" off (in Avast), some 30 mins ago. Since then, no more issue but I cross my fingers...
Update: unfortunately, it took more time than previously but the issue reappeared