Giter Club home page Giter Club logo

Comments (4)

jlaine avatar jlaine commented on May 28, 2024

Can you please indicate whether you can reproduce this on one of the examples we provide? If it's reproducible with our code I'm happy to investigate, but I cannot go debugging third party code.

from aiortc.

el07694 avatar el07694 commented on May 28, 2024

Ok, i will try to post tomorrow night

from aiortc.

el07694 avatar el07694 commented on May 28, 2024

Ok after a few tries i can reproduce a almost same error with server example.
The only change i made i server example is in server.py file i replace the default ip from 0.0.0.0 to 192.168.1.188
Then i run the python server.py command, i open the browser and i navigated to http://192.168.1.188:8080, i select to send video from the checkbox and i push the start button. The connection was established well, i can't see and video element playing (connectionstate doesn't go from connecting to connected) but this is not the only error (the light in the client area camera is enabled). After that i open a second tab, i close the first one and here is the output from console:


======== Running on http://192.168.1.188:8080 ========
(Press CTRL+C to quit)
INFO:pc:PeerConnection(ddbcdb13-5698-4eb3-9f43-c6a5a02ef310) Created for 192.168.1.188
INFO:pc:PeerConnection(ddbcdb13-5698-4eb3-9f43-c6a5a02ef310) Track audio received
INFO:pc:PeerConnection(ddbcdb13-5698-4eb3-9f43-c6a5a02ef310) Track video received
INFO:aioice.ice:Connection(3) Could not bind to 169.254.119.55 - [WinError 10049] The requested address is not valid in its context
INFO:aioice.ice:Connection(3) Could not bind to 169.254.248.136 - [WinError 10049] The requested address is not valid in its context
INFO:aioice.ice:Connection(4) Could not bind to 169.254.119.55 - [WinError 10049] The requested address is not valid in its context
INFO:aioice.ice:Connection(4) Could not bind to 169.254.248.136 - [WinError 10049] The requested address is not valid in its context
INFO:aioice.ice:Connection(0) Could not bind to 169.254.119.55 - [WinError 10049] The requested address is not valid in its context
INFO:aioice.ice:Connection(0) Could not bind to 169.254.248.136 - [WinError 10049] The requested address is not valid in its context
INFO:aioice.ice:Connection(3) Could not bind to 169.254.144.162 - [WinError 10049] The requested address is not valid in its context
INFO:aioice.ice:Connection(4) Could not bind to 169.254.144.162 - [WinError 10049] The requested address is not valid in its context
INFO:aioice.ice:Connection(0) Could not bind to 169.254.144.162 - [WinError 10049] The requested address is not valid in its context
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b08:7c00:d807:7791:5584:8e87', 58976) -> ('2a02:587:4b08:7c00:7523:c33b:cc49:66f9', 51182)) State.FROZEN -> State.WAITING
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b08:7c00:7523:c33b:cc49:66f9', 58979) -> ('2a02:587:4b08:7c00:7523:c33b:cc49:66f9', 51182)) State.FROZEN -> State.WAITING
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b2a:9700:2edd:267f:a8c1:a4c0', 58982) -> ('2a02:587:4b08:7c00:7523:c33b:cc49:66f9', 51182)) State.FROZEN -> State.WAITING
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b08:7c00:d807:7791:5584:8e87', 58976) -> ('2a02:587:4b08:7c00:d807:7791:5584:8e87', 51183)) State.FROZEN -> State.WAITING
INFO:aioice.ice:Connection(0) Check CandidatePair(('192.168.1.188', 58985) -> ('192.168.1.188', 51181)) State.FROZEN -> State.WAITING
INFO:pc:PeerConnection(ddbcdb13-5698-4eb3-9f43-c6a5a02ef310) Connection state is connecting
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b08:7c00:d807:7791:5584:8e87', 58976) -> ('2a02:587:4b08:7c00:7523:c33b:cc49:66f9', 51182)) State.WAITING -> State.IN_PROGRESS
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b08:7c00:7523:c33b:cc49:66f9', 58979) -> ('2a02:587:4b08:7c00:7523:c33b:cc49:66f9', 51182)) State.WAITING -> State.IN_PROGRESS
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b2a:9700:2edd:267f:a8c1:a4c0', 58982) -> ('2a02:587:4b08:7c00:7523:c33b:cc49:66f9', 51182)) State.WAITING -> State.IN_PROGRESS
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b08:7c00:d807:7791:5584:8e87', 58976) -> ('2a02:587:4b08:7c00:d807:7791:5584:8e87', 51183)) State.WAITING -> State.IN_PROGRESS
INFO:aioice.ice:Connection(0) Check CandidatePair(('192.168.1.188', 58985) -> ('192.168.1.188', 51181)) State.WAITING -> State.IN_PROGRESS
INFO:aioice.ice:Connection(0) Check CandidatePair(('192.168.1.188', 58985) -> ('192.168.1.188', 51181)) State.IN_PROGRESS -> State.SUCCEEDED
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b08:7c00:7523:c33b:cc49:66f9', 58979) -> ('2a02:587:4b08:7c00:d807:7791:5584:8e87', 51183)) State.FROZEN -> State.IN_PROGRESS
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b2a:9700:2edd:267f:a8c1:a4c0', 58982) -> ('2a02:587:4b08:7c00:d807:7791:5584:8e87', 51183)) State.FROZEN -> State.FAILED
INFO:aioice.ice:Connection(0) ICE completed
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b2a:9700:2edd:267f:a8c1:a4c0', 58982) -> ('2a02:587:4b08:7c00:d807:7791:5584:8e87', 51183)) State.FAILED -> State.IN_PROGRESS
INFO:aioice.ice:Connection(0) Check CandidatePair(('2a02:587:4b2a:9700:2edd:267f:a8c1:a4c0', 58982) -> ('2a02:587:4b08:7c00:d807:7791:5584:8e87', 51183)) State.IN_PROGRESS -> State.FAILED
INFO:aioice.ice:Connection(0) Consent to send expired
INFO:pc:PeerConnection(ddbcdb13-5698-4eb3-9f43-c6a5a02ef310) Connection state is failed
Traceback (most recent call last):
  File "C:\Python\Lib\site-packages\aiortc\rtcsctptransport.py", line 1339, in _send_chunk
    await self.__transport._send_data(
  File "C:\Python\Lib\site-packages\aiortc\rtcdtlstransport.py", line 578, in _send_data
    raise ConnectionError("Cannot send encrypted data, not connected")
ConnectionError: Cannot send encrypted data, not connected

INFO:pc:PeerConnection(ddbcdb13-5698-4eb3-9f43-c6a5a02ef310) Connection state is closed

The problem is related with the last lines: ConnectionError: Cannot send encrypted data, not connected

Tip: Try to hide the log messages, close the index.html tab (by opening a new tab and closing the previous) and wait the error to appear in server side.
When this error happens sometimes await pc.close() terminates well but some other never return a result (program freezes).

Also i cannot exit the server with ctrl+C without an error.

On possible solution is to use javascript onbeforeunload event to stop the communication from client.

Note that after few repeats: 9 or 10 times then there is a bigger related error.

First of all, can someone reproduce it?

from aiortc.

el07694 avatar el07694 commented on May 28, 2024

Any update?

from aiortc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.