why doesn't trigger event the transport.on('connect')

in this my code… make by typescript react.js

const newSendTransport = _device.createSendTransport(transportInfo);
newSendTransport.on(‘connect’, ({ dtlsParameters }, callback, errback) => {
console.log(‘connect send transport!!!’);
socket?.emit(
‘connect-transport’,
{
transportId: newSendTransport.id,
dtlsParameters,
},
(error: any) => {
if (error) {
console.error(‘Error connecting transport:’, error);
errback(error);
} else {
callback();
}
},
);
});

expect newSendTransport.on(‘connect’ , …) but is not trigger!
however, other event is works well! like connect socket create worker, router, create transport, else …
why doesn’t trigger transport connect?
please help…

The transport emits ‘connect’ event during the first call to transport.produce(). This is mentioned in the documentation, btw.