Socket IO not working in Production Ubuntu 18.04

I have the same problem with one of my two instances of ERPNext. They both have the exact same setup (Ubuntu 18.04, latest ERPNext v12 and Frappe v12, …), the only difference is that the instance that is having the problem uses a self-signed ssl certificate and is accessed via https, while the other isn’t.

So I think the culprit here is SSL.

A solution to this problem was suggested her, however it didn’t work for me: