Same problem here. Even tried the same things.
Only this worked for me:
That is, add the following line at the top of the frappe/socketio.js file: process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
Be careful though, because it is not a good practice.