Socket.io cannot verified after setup SSL

Hello,

I recently added SSL to my Frappe instance by following this guide: Configuring HTTPS
Everything is functioning perfectly; my Frappe website works great and accessible via HTTPS.

However, I’ve encountered an issue where socket.io is no longer working. It used to operate smoothly over HTTP. I suspect the problem arose after setting up SSL, as indicated by the following errors:

  1. “Unauthorized: Error: unable to verify the first certificate” (Image showing the error message)
  2. “WebSocket is closed before the connection is established.” (Image showing the WebSocket error)

Additionally, before switching to HTTPS, I frequently used frappe.publish_realtime, which functioned correctly.
But now, it doesn’t work at all, and there’s no incoming network activity either, when i run frappe.publish_realtime