Comments (4)
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.
Ok, i will try to post tomorrow night
from aiortc.
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.
Any update?
from aiortc.
Related Issues (20)
- [Example][Server] MediaRecorder is not saving audio (mp3) from the web HOT 2
- Establish one-way video from server to client HOT 2
- Data channel stuck in connecting state while still receiving messages on it HOT 1
- Request for Guidance on Extracting WHEP Save as MP4 Files from AIORTC
- MediaPlayer HTTP stream from the same EndPoint does work
- Cannot connect to video stream: BINDING ERROR / 400 Bad Request HOT 1
- Can aiortc module be used for professional or semi-professional use?
- Implement MediaStreamTrack.enabled HOT 3
- Setting RTCRtpTransceiver.direction to `inactive` does not have any effect HOT 1
- Issue encountered when installing aiortc from source
- JS and PYTHON communication are available in the LAN, and the Internet connection fails HOT 1
- 'server' example failed when served in a remote machine HOT 2
- example videostream-cli not working HOT 1
- addTrack failing inside datachannel message receive handler
- chopping sounds with AudioStreamTrack HOT 2
- Recording video on server discards beyond a few seconds.
- Combining multiple mp3 files to be returned as a single MediaStreamTrack
- Server Python to Client Python Q/A (INCLUDE FULL SCRIPTS!)
- Webrtc initial negotiation succeeds but renegotiation fails
- Set packet_time = 125 msec instead of 20 msec (both side) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiortc.