WebSocket connection to 'wss://ws.8base.com/' failed:

Hi all,
I’m just giving 8base a spin and have followed plenty of Sebastians tutorials which have been super helpful. I’m currently having issues with setting up websockets atm. In console I am receiving the following message: WebSocket connection to ‘wss://ws.8base.com/’ failed:

The Message in the Network is also blank. I am using gatsby & apollo client to set this up. This is how my apollo config is set up:

The environment variables are being pulled in correctly (I also tried adding them in as a string just to be sure.) Have I missed something? I am currently testing it on the free plan so I wasn’t sure if maybe this could be to do with it.

If anyone could point me in the right direction that would be great.
Thanks,
Matt

Hello!

Welcome to the 8base! I hope you like it.

We’ll check what’s wrong. I’ll let you know soon.

Lada Kokotova | Technical Support Engineer

Hi Lada,
Thanks for looking in to it. I’m fairly new to websockets so it may be an issue on my end!
I am developing locally at the moment and I’ve been reading up on the wss protocol. Is it because you need an SSL to connect to wss? This may be causing the issue as I am running on http://localhost

No, it’s not a problem. It looks that it’s about authorization.

Try to reed our documentation, it should help:
https://docs.8base.com/docs/development-tools/sdk/api/subscriptions/

If it can’ t help, send me what’s going on in your network tab and send me the code where you use subscriptions, please.

Lada Kokotova | Technical Support Engineer