Locally, Events & Pusher working as expected. However on Forge Pusher is not reaching the app and vise versa. Haven't found any guides, etc. Solution? Tnx.
Console error: WebSocket connection to 'wss://localhost/.../ failed.
TIP: for debugging the connection, Pusher has a Debug Console that shows connections and events. So at least you can see what's connecting or not.
It sounds like you may need to configure your Forge server to allow for incoming connections from Pusher. You can do this by adding the following to your .env file:
PUSHER_ENDPOINT=tcp://127.0.0.1:6379
You may also need to configure your firewall to allow for incoming connections from Pusher. You can do this by running the following command:
sudo ufw allow 6379/tcp
Once you have done this, you should be able to connect to Pusher from your Forge server.
The solution for the time being was to comment out the wss entry in bootstrap.js
wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, // comment out
I think a line of inquiry to solve this properly is to see how wssPort needs to be setup with Nginx. This issue probably has to do with the SSL/Nginx setup, so on.