Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile Safari & Chrome on iOS 15.1 crash when publishing an H264 local video track #1611

Closed
8 tasks done
Bumbolio opened this issue Oct 22, 2021 · 32 comments
Closed
8 tasks done
Assignees
Labels
bug filed A bug has been filed upstream for this issue

Comments

@Bumbolio
Copy link

  • I have verified that the issue occurs with the latest twilio-video.js release and is not marked as a known issue in the CHANGELOG.md.
  • I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
  • I verified that the Quickstart application works in my environment.
  • I am not sharing any Personally Identifiable Information (PII)
    or sensitive account information (API keys, credentials, etc.) when reporting this issue.

Code to reproduce the issue:
Here is a live example using twilio-video 2.18
https://switcher-video-chat.switcher-studio.workers.dev/3ca560d9-dda0-4f7e-bf34-8bf720fe34a8

Expected behavior:
When connecting to an H264 only Group Room, the local video track should be published successfully while using Safari or Chrome on iOS 15.1 (beta).

Actual behavior:
When connecting to an H264 only Group Room, if a local video track is provided when connecting while using Safari or Chrome on iOS 15.1 (beta), the browser tab crashes and the browser reloads the page.

Additional Information
This is happening on the latest iOS 15.1 beta which appears to be the release candidate for iOS 15.1. There is a Webkit bug filed for a similar issue that has already been patched, but it's not clear if this will make it into the final release of iOS 15.1. According to the bug filed with Webkit, it appears to crash the tab when switching the video track off or on, but we're not doing that in our example. The tab crashes as soon as we connect to the room and the local video track is published.

I was also able to reproduce this bug in the twilio-video-app-react reference project.

Software versions:

  • Browser(s): Safari & Chrome on iOS 15.1 (beta)
  • Operating System: iOS 15.1 (beta)
  • twilio-video.js: 2.18
  • Third-party libraries (e.g., Angular, React, etc.): React
@PikaJoyce PikaJoyce self-assigned this Oct 22, 2021
@PikaJoyce
Copy link
Contributor

Hey there @Bumbolio!

Thank you for opening this issue with us! I'm currently updating to iOS 15.1 in order to investigate this issue. I'll keep this thread updated.

Best,
Joyce

@PikaJoyce PikaJoyce added the bug filed A bug has been filed upstream for this issue label Oct 22, 2021
@PikaJoyce
Copy link
Contributor

Folks,

As I've been able to reproduce this, I've filed an internal ticket (VIDEO-7491) in order to investigate this issue further. @Bumbolio, thank you for providing all of the useful information. We appreciate your patience as we navigate these WebKit issues! I will keep this issue open and update as we have more developments.

Best,
Joyce

@rkiller
Copy link

rkiller commented Oct 24, 2021

I can confirm that I am seeing the same issue on ios15.1 beta.In my case it seems to crash when publishing remote audio or video tracks...

@Bumbolio
Copy link
Author

Thanks for your help @PikaJoyce, let me know if you need any other info!

@fippo
Copy link

fippo commented Oct 26, 2021

known issue: https://bugs.webkit.org/show_bug.cgi?id=232006
The fix didn't make it in time for 15.1 (release). This makes @dagingaa look very sad.

@rkiller
Copy link

rkiller commented Oct 27, 2021

Can @twilio advise on how to resolve this issue now that iOS 15.1 is released??

@charliesantos
Copy link
Collaborator

Please use VP8 as a workaround for now, until apple fixes this bug: https://bugs.webkit.org/show_bug.cgi?id=231505

@aponski
Copy link

aponski commented Nov 5, 2021

@twilio any update on this issue?

@aponski
Copy link

aponski commented Nov 5, 2021

As a workaround I've set preferredVideoCodecs: ['VP8']

@leslie-heinzen
Copy link

@twilio any update on this issue?

Based on our own testing, this appears to be resolved in the iOS 15.2 beta.

@MEGApixel23
Copy link

As a workaround I've set preferredVideoCodecs: ['VP8']

Thank you for the suggestion, but it doesn't work for us. It still crashes.

@taylor1791
Copy link

We used the preferredVideoCodecs: ['VP8'] workaround successfully in two different applications.

import TwilioVideo from 'twilio-video';

await TwilioVideo.connect(token, {
  name,
  preferredVideoCodecs: [ 'VP8' ]
});

@MEGApixel23
Copy link

We used the preferredVideoCodecs: ['VP8'] workaround successfully in two different applications.

import TwilioVideo from 'twilio-video';

await TwilioVideo.connect(token, {
  name,
  preferredVideoCodecs: [ 'VP8' ]
});

That's how we tried to apply suggested fix:

import { connect, LocalVideoTrack, createLocalTracks } from 'twilio-video'

connect(data.token, {
  tracks,
  name: roomName,
  networkQuality: {
    local: 3
  },
  preferredVideoCodecs: [{ codec: 'VP8', simulcast: false }]
})

Actually, I've tried all of the available combinations from their docs: https://www.twilio.com/docs/video/tutorials/developing-high-quality-video-applications#collaboration-mode

Additionally I've tried several twilio-video package versions starting from
"twilio-video": "^2.16.0", up to the latest.

Unfortunatelly it still crashed on my iPhone 12 iOS 15.1 😞

@MisterJimson
Copy link

Maybe we should update the title and pin the issue? Its not beta only anymore and this is a pretty big issue.

@charliesantos charliesantos changed the title Mobile Safari & Chrome on iOS 15.1 (beta) crash when publishing an H264 local video track Mobile Safari & Chrome on iOS 15.1 crash when publishing an H264 local video track Nov 15, 2021
@charliesantos charliesantos pinned this issue Nov 15, 2021
@charliesantos
Copy link
Collaborator

Unfortunatelly it still crashed on my iPhone 12 iOS 15.1 😞

@MEGApixel23 are you still seeing the issue on iOS 15.2 beta?

@MEGApixel23
Copy link

Unfortunatelly it still crashed on my iPhone 12 iOS 15.1 😞

@MEGApixel23 are you still seeing the issue on iOS 15.2 beta?

We haven't tested with iOS 15.2 yet. Is there a safe way to do it considering that I have only one iPhone 😅 ?

@charliesantos
Copy link
Collaborator

Unfortunatelly it still crashed on my iPhone 12 iOS 15.1 😞

@MEGApixel23 are you still seeing the issue on iOS 15.2 beta?

We haven't tested with iOS 15.2 yet. Is there a safe way to do it considering that I have only one iPhone 😅 ?

@MEGApixel23 Not sure if there's other more reliable way to test. Can you please try it on our quick deploy react app? This is configured to use VP8. If you are able to reproduce the crash with the quick deploy app using VP8, please file a separate ticket.

@charliesantos
Copy link
Collaborator

I verified and this seems to have been resolved on iOS 15.2 beta

@vatson
Copy link

vatson commented Nov 16, 2021

@charliesantos is right. iOS 15.2 beta works well with h264

@Bikash-lama
Copy link

We used the preferredVideoCodecs: ['VP8'] workaround successfully in two different applications.

import TwilioVideo from 'twilio-video';

await TwilioVideo.connect(token, {
  name,
  preferredVideoCodecs: [ 'VP8' ]
});

This workaround not working for me. Any feedback would be appreciated.

@charliesantos
Copy link
Collaborator

@Bikash-lama can you please try on iOS 15.2 beta and see if you're still having this issue? If you're still seeing it, please submit a different ticket. It may be something that is not related to h264

@MEGApixel23
Copy link

@charliesantos Confirmed working on iOS 15.2 beta 3. However, the same app crashes on iOS 15.1 😞

@leslie-heinzen
Copy link

@charliesantos Confirmed working on iOS 15.2 beta 3. However, the same app crashes on iOS 15.1 😞

iOS 15.2 will probably be generally available around the end of this month. Apple is not going to patch this in iOS 15.1.

@juneroy1
Copy link

juneroy1 commented Nov 28, 2021

Bros this works for me thank you so much in IOS15.1

We used the preferredVideoCodecs: ['VP8'] workaround successfully in two different applications.

import TwilioVideo from 'twilio-video';

await TwilioVideo.connect(token, {
  name,
  preferredVideoCodecs: [ 'VP8' ]
});

this works in me in IOS15.1 BRO
image

@Bumbolio
Copy link
Author

Yes,if you can get away with using VP8 then this is a good workaround. Our application requires H264, so the only solution for us is to wait for iOS 15.2 to be generally available.

@Bikash-lama
Copy link

Yes,if you can get away with using VP8 then this is a good workaround. Our application requires H264, so the only solution for us is to wait for iOS 15.2 to be generally available.

it's still not working for me. I am currently using Twilio 2.8.0 CDN approach rather than a package. May be thats why the workaround is not working for me.

CDN url: https://media.twiliocdn.com/sdk/js/video/releases/2.8.0/twilio-video.min.js

@juneroy1
Copy link

Yes,if you can get away with using VP8 then this is a good workaround. Our application requires H264, so the only solution for us is to wait for iOS 15.2 to be generally available.

it's still not working for me. I am currently using Twilio 2.8.0 CDN approach rather than a package. May be thats why the workaround is not working for me.

CDN url: https://media.twiliocdn.com/sdk/js/video/releases/2.8.0/twilio-video.min.js

I think you have to update your SDK bro

@darrenmhill
Copy link

This is a serious issue for us. Is there anything that can be done to circumvent this via the Twilio SDK? I'm not expecting a production iOS release for another few weeks.

@charliesantos
Copy link
Collaborator

Hi @darrenmhill , unfortunately we cannot really do anything on the sdk. Your application needs to use vp8 for now if possible.

@arun3528
Copy link

arun3528 commented Dec 7, 2021

HI Team we are seeing another issue where On Android 12 H264 preferred codec does not encode video properly

tried the same url on Pixcel 3a

https://switcher-video-chat.switcher-studio.workers.dev/3ca560d9-dda0-4f7e-bf34-8bf720fe34a8

WhatsApp Image 2021-12-07 at 7 03 52 PM
Result

Does not happen on android 11.0

@PikaJoyce
Copy link
Contributor

Hi @arun3528

Thank you for your comment. We currently have an open issue with regards to your comment! To forward that information from that thread over, we don't have any workarounds currently for this issue. So we're currently waiting on a Chrome fix which should be coming soon.

Thanks,
Joyce

@charliesantos
Copy link
Collaborator

We verified this is fixed on iOS 15.2.

@charliesantos charliesantos unpinned this issue Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug filed A bug has been filed upstream for this issue
Projects
None yet
Development

No branches or pull requests