Safari cannot open the page due to the error 'WebKit encountered an internal error.' We are using https://github.com/stleamist/BetterSafariView.git, and it was working fine before we updated to Xcode 16.
WebKit
RSS for tagDisplay web content in windows and implement browser features using WebKit.
Posts under WebKit tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I have a Safari extension that plays audio via the javascript AudioContext API. It was working fine under iOS 17 and is now broken under iOS 18. It does not play audio at all.
I've tried in both the iOS 18 public beta and the iOS 18.1 developer beta. It is broken in both of them.
I've also created Feedback item FB15170620 which has a url attached to a page I created which demonstrates the issue.
Hi
Is it possible to render webview in Widget?
Basically i want to show some content of website in Widget on homescreen using webview.
I tried to use WKWebview in WidgetView, but it's not rendering .
Thanks with regards
iOSProfessionals
After the release of iOS17, our app has collected JavaScriptCore crashes, and the crash has recently appeared in iOS17 and above. The number of crashes collected recently is increasing.
We have tried various methods to troubleshoot and locate。
2024-05-08_20-45-00.5216_+0800-fdb980f66f56d73b944ccc3466922d7fd0690089.crash
2024-05-09_12-35-57.5470_+0800-70e61e8796f6967e04d1f523c54dde7b19dea31c.crash
T
2024-05-13_14-30-03.2084_+0800-d9598b08a153f5214b51257400423d4079049578.crash
he crash stack is as follows:
After the release of iOS17, our app has collected JavaScriptCore crashes, and the crash has recently appeared in iOS17 and above. The number of crashes collected recently is increasing.
The following are several complete crash log information. Currently, crashes are only collected on iOS17 and above systems.
2024-05-08_20-45-00.5216_+0800-fdb980f66f56d73b944ccc3466922d7fd0690089.crash
2024-05-11_02-42-46.0303_+0800-5ea1f23ba38c4782b80bd6304a9625e305c296a2.crash
2024-05-13_14-30-03.2084_+0800-d9598b08a153f5214b51257400423d4079049578.crash
I'm developing a ScreenSaverView which uses WKWebview internally.
This screensaver responsds to mouse events, and I'm using a helper app which is granted Accessibility permissions to watch mouseEvents and then serializes them to the Screen Saver, where they are recreated and send to the WKWebView.
This all works fine - the WKWebView can respond to mouseDown, mouseUp, MouseDrag, scrollWheel (etc.) events.
The one exception is that mouseMoved events are ignored.
I see a similar issue posted here: https://stackoverflow.com/questions/17057254/when-webview-is-added-to-a-specific-view-in-nswindow-hover-stops-working-how?rq=2 but that's from 2016 so not sure if it's relevant.
Things I've tried:
adding a NSTrackingArea to the WKWebView
setting the parent NSWindow.acceptsMouseEvents = true
Hello there,
We are having a problem when trying to repdorucir videos with videojs in a webview on devices with iOS older than 17.4. When playing them you see that the player restarts several times until crashing the webview. This are the xcode logs when this happens:
Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}>
0x114029980 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebKit Media Playback' for process with PID=64167, error: Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.assertions.webkit AND originator doesn't have entitlement com.apple.multitasking.systemappassertions)}
0x1140180c0 - [PID=64164] WebProcessProxy::didClose: (web process 0 crash)
0x1140180c0 - [PID=64164] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=Crash
After iOS 17.4, Passkey Autofill stopped working inside ASWebAuthenticationSession.
iOS 17.5 re-enabled users to pick passkeys if they tap "🔑" icon on right bottom of keyboard and opened Safari password manager.
However, it still doesn't recommend passkeys on the first view.
Even on the latest iOS 18.0 developer beta, the behaviour is not fixed yet.
Topic:
Safari & Web
SubTopic:
General
Tags:
WebKit
Safari and Web
Safari
Passkeys in iCloud Keychain
iOS 18 beta have issue when we load html string having secure media remote images those are unable to load on web view. shing question mark in place of images.
I have a hybrid mobile app which loads web server screens in its iframe(which is under the WKWebView); an https request is initiated from the mobile app to the web server which returns the html page to be loaded in the iframe.
The calls which are initiated from outside the iframe have cookies maintained in their requests, while the ones initiated from inside the iframe(web server page) loose the cookies and do not inherit them in IOS beta 18 while It worked fine in the previous IOS versions.
Anybody has infos about this or similar cases?
Hi, I'm trying to capture some images from WKWebView on visionOS. I know that there's a function 'takeSnapshot()' that can get the image from the web page. But I wonder if 'drawHierarchy()' cannot work properly on WKWebView because of GPU content, is there any other methods I can call to capture images correctly?
Furthermore, as I put my webview into an immersive space, is there any way I can get the texture of this UIView attachment? Thank you
We use ASWebAuthenticationSession in our app to perform SAML auth on iOS devices. It works fine with Safari. However, if we config other browsers, such as Chrome, as a default browser on iOS device, ASWebAuthenticationSession still load Safari in embedded window and auth cookies is only stored in Safari. Can ASWebAuthenticationSession work with default browser on iOS similar as it works on MacOS?
Thanks,
Ying
Hello,
I am developing a Mac application via Mac Catalyst and encountering an issue with WKWebView. Specifically, I'm loading a webpage (e.g., https://translate.google.com) in WKWebView, but when I press the copy button on the page, the content doesn't actually copy to the clipboard.
I've attempted modifying the UserAgent without any success. Here is the relevant part of my code:
override func viewDidLoad() {
super.viewDidLoad()
let config = WKWebViewConfiguration()
config.preferences = WKPreferences()
config.defaultWebpagePreferences.preferredContentMode = .desktop
let webView = WKWebView(frame: .zero, configuration: config)
webView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(webView)
webView.scrollView.showsVerticalScrollIndicator = false
webView.backgroundColor = UIColor.white
webView.scrollView.backgroundColor = UIColor.white
webView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
webView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true
webView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
webView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
if let url = URL(string: "https://translate.google.com") {
let req = URLRequest(url: url)
webView.load(req)
}
}
_lookup and _share apis from webkit are crashing in iOS18 with bellow errors.
Received unexpected call to -[WKContentView(WKInteraction) _lookupForWebView:]
Received unexpected call to -[WKContentView(WKInteraction) _shareForWebView:]
I’m working on an iOS app using WKWebView, and I’ve implemented the following authentication flow:
Sign-In Process: The sign-in process is handled natively.
Access Token Storage: Once the user is signed in, the access token is stored within the app. WebView Cookie Setting: When a webview is opened, the app sets the access token in the webview’s cookies.
Token Validation: The web server validates the access token from the cookie.
Problem:
I’m encountering an issue where the authentication state between the native app and the webview doesn’t always synchronize correctly. Specifically:
Sign-In Issue: If a user signs in while the webview is already open, the native app attempts to set the cookie in the webview. However, there are cases where the cookie isn’t set properly, and the server fails to retrieve the access token, similar to when a user is signed out.
Sign-Out Issue: When a user signs out, the native app deletes the cookie. Although the app reports success in deleting the cookie, the webview sometimes still retains the cookie, which can cause inconsistencies.
These issues don’t happen consistently, and the behavior seems to be somewhat random.
My Questions:
Is there a problem with how I’m sharing authentication between the native app and the webview?
Do you have any suggestions or best practices for ensuring that the cookie management between the native app and WKWebView is reliable?
Thank you in advance for your help!
I believe that the native app should manage the cookies for the WKWebView. However, I’m encountering issues where the cookies are not always synchronized properly between the native app and the webview.
Unable to create a cookie using WebKit API or manually create a cookie in Safari with SameSite=None on a device using iPadOS 18 beta. In Safari, the None option is still in the drop down as a selection for SameSite which leads me to believe this is a bug. Is this going to be fixed in the release version of iOS 18?
Currently on Xcode 15.4 in a SwiftUI App when you attach a UIView to the rootViewControllers view, which contains a WKWebView, the view will display and allow interaction to it (i.e opening new pages/pressing buttons). However in Xcode 16 beta 4 this is no longer the case. The view will still appear but will no longer be interactive. This happens only on iOS 18 Beta (1-7) and iOS 18.1 Beta.
When voiceover is turned on in IOS devices the video controls like pause/resume, forward , backward are not working in
inline mode and works fine in fullscreen.
The controls are announced properly in voiceover,but when we press it, it is not performing any action at all.
We used HTML5 video tag to display mp4 video in our app.we have added all necessary accessibility tags as well.
We also observe the same issue is happening in the w3school web page. Attaching the link here for reference. (https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_video)
Could you please guide us why the video controls are not working. Is there anything we want to change or any update needed from the safari side.
I have a few pdfs that contains images/grayscale images that opened properly on my app with IOS 16.5 but since upgrading to 17.5, the app crashes with “A problem has repeatedly occured on...” this means the IOS itself is not able to handle the pdf otherwise we would get an error from our app.
Previously, while we got a warning in the console saying that the max canvas has been exceeded. The app did not crash.
Would it be possible to know what was the changes coming in version 17.0+ that could have caused this? And if so, should this be a bug that gets fixed? I’ve looked at the release note and can’t pinpoint which changes could have caused this new behaviour. This occurs on safari and chrome.
以下是包含完整日誌的回報範本:
Title: WKWebView File Upload Causes App Crash When Selecting Camera or Recording Options
Body:
Hello,
I am experiencing a critical issue with WKWebView in our iOS app when handling file uploads. We are using the following HTML element to allow users to capture images or videos, select from their photo library, or choose a file from the file system:
<input type="file" accept="image/*;capture=camera" id="cameraInput">
Issue Description:
When a user selects the camera or recording option, the app immediately crashes and returns to the WKWebView screen. This issue does not occur when selecting a file from the photo library or file system.
Logs:
Below are the relevant logs captured when the issue occurs:
Presenting view controller <_UIContextMenuActionsOnlyViewController: 0x1034349e0> from detached view controller <MailVwCtl: 0x103838800> is not supported, and may result in incorrect safe area insets and a corrupt root presentation. Make sure <MailVwCtl: 0x103838800> is in the view controller hierarchy before presenting from it. Will become a hard exception in a future release.
RotateN2:<MailVwCtl: 0x103838800>
RotateN2:<MailVwCtl: 0x103838800>
RotateN1:<Mail2000ViewController: 0x10350b780>
RotateN2:<Mail2000ViewController: 0x10350b780>
RotateN2:<MailVwCtl: 0x103838800>
RotateN2:<MailVwCtl: 0x103838800>
RotateN2:<Mail2000ViewController: 0x10350b780>
RotateN1:<Mail2000ViewController: 0x10350b780>
RotateN2:<Mail2000ViewController: 0x10350b780>
RotateN2:<Mail2000ViewController: 0x10350b780>
RotateN2:<Mail2000ViewController: 0x10350b780>
RotateN2:<Mail2000ViewController: 0x10350b780>
Unknown chipRevisionID (0xffffffff)
Attempted to change to mode Portrait with an unsupported device (BackWideDual). Auto device for both positions unsupported, returning Auto device for same position anyway (BackAuto).
Attempted to change to mode Portrait with an unsupported device (BackWideDual). Auto device for both positions unsupported, returning Auto device for same position anyway (BackAuto).
Attempted to change to mode Portrait with an unsupported device (BackAuto). Auto device for both positions unsupported, returning Auto device for same position anyway (BackAuto).
Attempted to change to mode Portrait with an unsupported device (BackWideDual). Auto device for both positions unsupported, returning Auto device for same position anyway (BackAuto).
RotateN2:<Mail2000ViewController: 0x10350b780>
RotateN2:<Mail2000ViewController: 0x10350b780>
RotateN2:<Mail2000ViewController: 0x10350b780>
WillDsAr:<MailVwCtl: 0x103838800>
RotateN1:<Mail2000ViewController: 0x10350b780>
RotateN2:<Mail2000ViewController: 0x10350b780>
DidDsAr:<MailVwCtl: 0x103838800>
<Mail2000ViewController: 0x10350b780>:VwWillAppear:1:x0
willAr:1,Fm:0,20,375,792-<MailVwCtl: 0x103838800>
willAr:1,Bd:0,0,375,792-<MailVwCtl: 0x103838800>
<MailVwCtl: 0x103838800>:VwDidAP:
VwDidAP:Bd:0,0,375,792-<MailVwCtl: 0x103838800>
VwDidAP:Fm:0,20,375,792-<MailVwCtl: 0x103838800>
VwDiDAP:SetFm:0,20,375,792-<MailVwCtl: 0x103838800>
ToolVwSetVwSize0:main,0,24,w=375,h=668,stepInd=0
ToolVwSetVwSize0:toobar_self,0,692,w=375,h=66
ToolVwSetVwSize:w=375,h=792
ToolVwSetVwSize1:main,0,0,w=375,h=727
ToolVwSetVwSize1:ToolBar,0,727,w=375,h=792
RotateN2:<Mail2000ViewController: 0x10350b780>
RotateN2:<Mail2000ViewController: 0x10350b780>
<Mail2000ViewController: 0x10350b780>:VwDidAppear:1:x0
M2KVC_DidAp0:0.000000 0.000000 375.000000 812.000000
Additional Context:
This issue is critical as it affects the user experience severely. Notably, we have a similar issue in our Android app using WebView. In that case, the file upload options for camera, recording, and file selection do not appear at all, restricting users to only upload files from the phone's storage.
We would like to inquire whether there have been recent changes to the APIs related to WKWebView and WebView or any known issues that could be causing this behavior. We are also concerned this might be a side effect of recent bug fixes or updates to WKWebView.
Additional Context:
This issue appears to be specific to iOS 17. We have tested the same functionality on devices running iOS versions below 17, and the camera and recording options work as expected without any crashes. This suggests that the issue may be introduced in iOS 17.
You can view a video demonstrating the issue at this link:
https://share.icloud.com/photos/001voevXriVXsEUmhzGsFBtSA
Environment:
iOS version: 17.6.1&17.5.1
Device: iPhone 15 Pro Max& iPhone 12
WKWebView version: [Your WKWebView version, if known]
App platform: iOS
Xcode version: 15.1
We appreciate any insights or guidance you can provide on this matter.
Thank you.