I did check VUE_APP_WORKSPACE_ID was setup correctly
I changed the payload as suggested.
// Create the subscription websocket link
const wsLink = new WebSocketLink({
uri: process.env.VUE_APP_WEBSOCKET_ENDPOINT,
options: {
reconnect: true,
connectionParams: {
/**
* WorkspaceID MUST be set or the Websocket Endpoint won't be able to
* map the request to the appropriate workspace
*/
workspaceId: process.env.VUE_APP_WORKSPACE_ID,
token: `Bearer ${store.state.session.idToken}`
}
}
});
However, the problem still persists (see picture below).
If youâll have the same error you should change workspaceId: 'WS_ID on process.env.VUE_APP_WORKSPACE_ID or any other variable with your workspaceId
Secondly, if the previous point doesnât work:
// Create the subscription websocket link
const wsLink = new WebSocketLink({
uri: "wss://ws.8base.com/",
options: {
reconnect: true,
connectionParams: {
/**
* WorkspaceID MUST be set or the Websocket Endpoint won't be able to
* map the request to the appropriate workspace
*/
workspaceId: process.env.VUE_APP_WORKSPACE_ID
}
},
webSocketImpl: class WebSocketWithoutProtocol extends WebSocket {
constructor(url) {
super(url); // ignore protocol
}
},
});
Itâs a copy of your file with webSocketImpl. Without webSocketImpl - it gives to reproduce your error.
And finally, if it didnât help can you provide please a minimal runnable reproduction so we can diagnose the issue.
Thanks for your support. I did try to insert token: store.state.session.idToken (see end of the previous message), but it systematically returns âWebSocket is closed before the connection is establishedâ
Well, at this stage we did our best. I need to see all you project to help you. Could you send me your project as an archive and wotkspaceID on my email, please?