shinyoshiaki / werift-webrtc

WebRTC Implementation for TypeScript (Node.js), includes ICE/DTLS/SCTP/RTP/SRTP/WEBM/MP4
MIT License
463 stars 29 forks source link

TransactionFailed uncaught exception #364

Open diogeneshamilton opened 6 months ago

diogeneshamilton commented 6 months ago

Getting this sometimes, after the connection is open for a while or it tries to reconnect:

Screenshot 2024-02-01 at 11 41 12 AM

Is there any way to prevent this error or catch it so it doesn't crash the server?

diogeneshamilton commented 6 months ago

It appears werift is not handling a 438 stale nonce response correctly? I see they handled it in aioice: https://github.com/aiortc/aioice/issues/28

shinyoshiaki commented 6 months ago

Thanks for the report, werift-ice has a similar problem because it references the old aioice code. I will fix it.

diogeneshamilton commented 6 months ago

Awesome, thank you!

diogeneshamilton commented 6 months ago

Not trying to rush or be difficult, but curious what the timeline might be for fixing this? I'm still having issues here and want to either catch the exception or the library doesn't throw it. Any other workarounds you can suggest?

shinyoshiaki commented 6 months ago

I've been busy lately, so a fundamental solution will take time. If I just avoid throwing exceptions, I think it can be accomplished relatively quickly. However, it is not a fundamental solution and there will still be problems using the TURN feature. Just to confirm, are you sure you are not using the TURN function? If not using, I think the problem can be solved by simply not using TURN when setting up peerConnection.

diogeneshamilton commented 6 months ago

To be clear, we are using TURN function. Maybe we're not implementing it correctly? Either way, thanks for the responses and we'll make do in the meantime!

diogeneshamilton commented 6 months ago

I guess I was a bit quick to close this issue- it seems this happens right after a connection is closed, is there any thing I can do in addition to connection.close() that would stop this from happening?

shinyoshiaki commented 3 months ago

@diogeneshamilton 438 error handling is now supported

diogeneshamilton commented 3 months ago

Amazing, thank you! I will look out for a new release.

havardholvik commented 2 months ago

Hi there @shinyoshiaki 👋 Do you have an idea when you will be releasing this fix?

shinyoshiaki commented 2 months ago

@diogeneshamilton @havardholvik released v0.19.2

havardholvik commented 2 months ago

That was fast! Thank you 🙏

On Thu, May 30, 2024 at 10:57 AM Shin Yoshiaki @.***> wrote:

@diogeneshamilton https://github.com/diogeneshamilton @havardholvik https://github.com/havardholvik released v0.19.2

— Reply to this email directly, view it on GitHub https://github.com/shinyoshiaki/werift-webrtc/issues/364#issuecomment-2139083530, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF6CJTCJANS7MREOJCZ45LZE3SYVAVCNFSM6AAAAABCVHLJ4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZZGA4DGNJTGA . You are receiving this because you were mentioned.Message ID: @.***>