DataChannels not supported

Sorry for firing issues so fast. I appreciate your help beforehand…

My node app controls the KMS via 8888. I’m opening the webRtcEndpoint with data channels enabled. At least I hope so:

        let kurentoClient = await kurento('ws://localhost:8888/kurento', { failAfter: 5 })
        let pipeline = await kurentoClient.create('MediaPipeline')
        let webRtcEndpoint = await pipeline.create('WebRtcEndpoint', {useDataChannels: true})

Later, before making KMS generating an offer I call

       await webRtcEndpoint.connect(webRtcEndpoint)
       await webRtcEndpoint.createDataChannel()
       console.log(await webRtcEndpoint.generateOffer())
       await webRtcEndpoint.gatherCandidates()

I expected to see the data channel pattern in the offer, but instead I get:

Trace: Error: Data channels are not supported
    at /home/ubuntu/kms-test/node_modules/kurento-client/lib/KurentoClient.js:365:24
    at Object.dispatchCallback [as callback] (/home/ubuntu/kms-test/node_modules/kurento-jsonrpc/lib/index.js:546:9)
    at processResponse (/home/ubuntu/kms-test/node_modules/kurento-jsonrpc/lib/index.js:667:15)
    at RpcBuilder.decode (/home/ubuntu/kms-test/node_modules/kurento-jsonrpc/lib/index.js:723:5)
    at Stream.transportMessage (/home/ubuntu/kms-test/node_modules/kurento-jsonrpc/lib/index.js:208:10)
    at Stream.emit (events.js:314:20)
    at Stream.EventEmitter.emit (domain.js:483:12)
    at drain (/home/ubuntu/kms-test/node_modules/through/index.js:36:16)
    at Stream.stream.queue.stream.push (/home/ubuntu/kms-test/node_modules/through/index.js:45:5)
    at WebsocketStream.onMessage (/home/ubuntu/kms-test/node_modules/websocket-stream/index.js:45:15) {
  code: 40111,
  data: { type: 'MEDIA_OBJECT_OPERATION_NOT_SUPPORTED' }
}
    at Object.noop (/home/ubuntu/kms-test/node_modules/kurento-client-elements/lib/WebRtcEndpoint.js:35:22)
    at callback2 (/home/ubuntu/kms-test/node_modules/promisecallback/index.js:27:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async test (/home/ubuntu/kms-test/index.js:42:9)

I can’t find the origin of this error in the sources.

Is this in the end just working in the browser?

Anybody able to guide me here?

In the OpenVidu forum we give support for OpenVidu related issues.

There is some overlap between Kurento and OpenVidu forums as OpenVidu is based on Kurento.

But using KurentoClient API directly is out of scope of this forum. Please use Kurento forum https://groups.google.com/g/kurento

Regards

OK, thanks, Micael. Will do