--singleuser flag not working after upgrading to 2.0.2

I upgraded mitmproxy from (if I remember correctly) 0.12 to 2.0.2. I’ve been using it for a long-running script and it’s been working for over a year. After this upgrade the --singleuser user:pass has been causing problems in my setup. The program using my proxy (WhatPulse) has worked fine with such setup and authentication, but now after the upgrade it simply fails with the error

Error while taking to website: Proxy connection closed prematurely

and mitmdump log simply shows


Removing the --singleuser flag makes it work again but I really want to secure my proxy. It seems like something about the flag and its authentication has changed between these two versions of mitmproxy causing my working setup to fail. I’d really want to know what might have changed and how to fix this.