Websocket set up error(Witness != Tree in ic-certification)

I am trying to use websocket in my website.
I referred ic-websocket-cdk-mo and ic-websockets-chat-mo.

But getting error.
Screenshot from 2024-07-13 21-53-21

My code :

class wsServices {
    constructor() {
        this.ws = null;
    }

    init({ _identity,actor}) {
        try{
            this.ws = new IcWebSocket(gatewayUrl, undefined, {
                canisterId: canisterId,
                canisterActor : actor,
                identity:_identity,
                networkUrl: icUrl,
            });
            return true
        }
        catch(e){
            console.error('initWs error', e)
            return false
        }
    }

}
const wsServiceInstance = new wsServices();
export default wsServiceInstance;

@ilbert @massimoalbarello

Sorry for the late reply.

This looks like the same issue as in Certificate validation failed · Issue #37 · omnia-network/ic-websocket-gateway · GitHub.

I think the temporary solution, while we update the SDKs, is the one that I wrote in this comment.

Let me know if it works!

1 Like

Solved.
Thank you for response.

1 Like