webrtc / samples

WebRTC Web demos and samples
https://webrtc.github.io/samples
BSD 3-Clause "New" or "Revised" License
13.94k stars 5.71k forks source link

End-to-end encryption sample crashes in Safari #1574

Closed vitaly-castLabs closed 2 years ago

vitaly-castLabs commented 2 years ago

Browser affected

Both regular Safari 16.0 and Safari Technology Preview, Release 154 (Safari 16.0, WebKit 17615.1.6.2) on macOS 12.6, MacBookAir (M1, 2020). From npm logs (when I run it locally): "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15"

Description

https://webrtc.github.io/samples/src/content/insertable-streams/endtoend-encryption/ causes Safari to throw "This page was reloaded because a problem occurred"

Steps to reproduce

Open the sample page, type in some Crypto key in the box, press Start and then Call

Expected results

Garbled video in Middlebox

Actual results

The page apparently crashes and Safari reloads the page.

I see about a dozen "send" and "recv" records in the JS console with both audio and video (key & delta) present, i.e. it works for a little while before crashing.

When there's no crypto key specified it works flawlessly. Works fine with Chrome, both crypto/no-crypto scenarios

alvestrand commented 2 years ago

@youennf should this be reclassified as a Safari bug?

saghul commented 2 years ago

Looks like a Safari bug indeed. It works for me on Safari TP 153:

Screenshot 2022-09-30 at 10 26 48
youennf commented 2 years ago

Yes, @vitaly-castLabs, can you file a bug in bugs.webkit.org? I'll file one otherwise.

vitaly-castLabs commented 2 years ago

@youennf Done: https://bugs.webkit.org/show_bug.cgi?id=245870

vitaly-castLabs commented 2 years ago

@saghul it works for me on my old MBP (macOS 10.15.7, Safari 15.6.1) too, it's just unbelievably slow (I guess this is the issue: https://bugs.webkit.org/show_bug.cgi?id=229190) when encryption is on

youennf commented 2 years ago

Thanks for the reminder on bug 229190, I'll fix it.

fippo commented 2 years ago

acted upon in the respective bugtracker 👍