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

App crashes during WebView initialization in Lockdown Mode #122

Open
1 task done
omersayshi opened this issue Mar 7, 2025 · 1 comment
Open
1 task done

App crashes during WebView initialization in Lockdown Mode #122

omersayshi opened this issue Mar 7, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@omersayshi
Copy link

Prerequisites

  • I have verified this issue is specific to YouTubePlayerKit and not a limitation or bug of the YouTube Player iFrame API.

What happened?

During the WebView initialization YouTubePlayerWebView.init at YouTubePlayerWebView.swift LINE 41. WebKit checks for the web policies API::WebsitePolicies::WebsitePolicies and app consistently crashes at this level WebKit::WebPagePreferencesLockdownModeObserver::WebPagePreferencesLockdownModeObserver -> WebKit::lockdownModeObservers -> WebKit::lockdownModeObservers at that line the app crashes.

What are the steps to reproduce?

It was a user reported issue. I was not able to personally reproduce the bug, I suspect it has something to do with Apple's newly introduced lockdown mode. I verified that the player works on my device with lockdown mode enabled.

What is the expected behavior?

App doesn't crash.

@omersayshi omersayshi added the bug Something isn't working label Mar 7, 2025
@SvenTiigi
Copy link
Owner

Hi @omersayshi,

Thanks for your bug report.
Certainly I'm not able to reproduce this crash.
I have tested it with LockDown Mode enabled on an iPhone 15 Pro with iOS 18.3.1 and on an iPhone XS with iOS 17.0.1.

Based on the crash information you provided, I suspect that there is an internal bug in the WebKit Framework. This bug may be triggered by various factors, as the crash involves an internal WebKit component "lockdownModeObservers".

It would be best to gather more information about the crash such as the specific device, OS version, parameters and configuration of the YouTubePlayer as well as debug logs.

@SvenTiigi SvenTiigi changed the title App crashes during WebView initialization App crashes during WebView initialization in Lockdown Mode Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants