Post not yet marked as solved
Hello!
We have a web app that uses WebRTC to get the camera stream and we display it using a video element. We also have an option to take a photo capture that basically draws the video element to a canvas and returns the image data. We do something like:
function triggerCapture() {
let canvas = document.createElement('canvas');
let context = canvas.getContext('2d');
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
context.drawImage(video, 0, 0, canvas.width, canvas.height);
const imageData = context.getImageData(0, 0, canvas.width, canvas.height);
context.clearRect(0, 0, canvas.width, canvas.height);
return imageData;
}
On iOS 16 Beta the imageData always represents a black image. We noticed that on iOS 16 the GPU Process: DOM Rendering is now enabled by default and if we disable it the triggerCapture method works as expected. However, it seems this issue is not solely due to the DOM rendering feature because if it's enabled on iOS 15.5 the issue does not occur. To reproduce this issue you can use the WebRTC samples (Use getUserMedia with canvas) and you'll see every time you take a snapshot a black image will be displayed.
Are you aware of this issue?
Thanks!
Post not yet marked as solved
It seems to be a question that comes up often in different ways, but despite several hours of research I still haven't found a solution.
I currently face an issue in Safari 14 on MacOS BigSur where cookies are never sent by Safari on XmlHttpRequests to an api on the same root domain.
Indeed, i'm working on an Angular SPA where the client app is locally hosted at https://myapp.local and for tests purpose I have an api running locally on https://api.myapp.local.
For some requests, we need to attach 2 cookies that are originally set by the API. I am able to see the said cookies in the API responses and in the "storage" section of Safari's DevTools, however they are never sent back to the server for subsequent XHR requests. (XHR with credentials)
I did try different cookie's attributes but none of my tries were successful :
sameSite=None, domain=myapp.local, Secure, httpOnly
sameSite=Lax, domain=myapp.local, Secure, httpOnly
The only way I found to get around the problem was to disable the "prevent cross-site tracking" option in Safari's privacy settings (which is not a proper solution for our users since this option is enabled by default...)
Nevertheless, I don't understand why Safari consider those cookies as 3rd party cookies (and blocks them) since the API is hosted on the same domain (on a subdomain to be more accurate) than the client web app. And, if I understood correctly, cookies should be sent by browsers for subdomains requests, both with sameSite=Lax and sameSite=None. Especially since it works perfectly on Firefox and Chromium browsers.
Anyway, if anyone has an idea or a solution I would be very interested to hear it because I don't know what to try anymore!
Thanks a lot !
Hello!
I have this scrollable container. It works fine across browsers and devices until it hits iOS14. Behaves just the way it should iOS 12 - (cant test iOS13 right now)
The goal is to always show the scrollbar. On iOS14 only the native scrollbar is shown when scrolling is happening.
Is there any way to fix this for iOS14 users?
thanks in advance!
div {	
max-height: 20rem;
	overflow-x: hidden;
	overflow-y: auto;
	margin-right: 0.25rem;
	::-webkit-scrollbar-track {
		border-radius: 0.125rem;
		background-color: lightgray;
	}
	::-webkit-scrollbar {
		width: 0.25rem;
		border-radius: 0.125rem;
	}
	::-webkit-scrollbar-thumb {
		border-radius: 0.125rem;
		background-color: gray;};
	}
}
Post not yet marked as solved
SSL certificate from "Starfield Root Certificate Authority - G2 SSL certificate" seems not be trusted anymore by current Safari / iOS.
Were recently any changes made in the certificate policy on the Apple side? Other plattfroms seems not having this issue.
Best regards,
Ben
Post not yet marked as solved
Hi there,
I'm interested in understanding how to solve the following scenario:
having AppTrackingTransparency implemented, let's assume that the user has denied the app to track. At some point, the app presents the user a webpage (WKWebView), which provides additional functionalities to the app. How should the app inform the webpage that tracking must be disabled?
Is there any way to force the WKWebView to disable tracking?
I've read this post. So I know that redirecting the user to Safari, therefore outside of the app, is an alternative solution.
And according to this answer on stack overflow doing something like
self.webView.configuration.processPool.perform(Selector(("_setCookieAcceptPolicy:")), with: HTTPCookie.AcceptPolicy.never) is not allowed and the application will be rejected.
Does anyone have any suggestions?
Post not yet marked as solved
We have an organization of about 500 employees, and we have developed an app for internal use only. I want our employees to use this app.
So we have built the app ( we choose EAS build CLI with all valid certificates, provisioning profile and unique bundleIdentifier)
Then, we got a link which we can open on our iOS devices (or scan the QR code) and follow the instructions to install the development profile.
Then we got a link to download an application on our device.
And it seems an app icon in our device but when we try to open it by touching the icon we are getting a message "Unable to install App, This app cannot be installed because its integrity could not be verified."
In short we can say ,Our organization is facing the following error when downloading an "enterpriseProvisioning": "universal" EAS Build app from Expo.
Post not yet marked as solved
I'm trying to use browser.storage.onChanged - https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/onChanged to detect when changes are made to browser.storage.local where I save all the preferences for my Safari Web Extension.
This works on Chrome, Firefox, Edge, and Opera. But I can't get it to work on Safari. When I call browser.storage.local.set, the onChanged listener is not called.
Below is the code I'm using to test this in Safari. This has to be in an extension with the Storage permission. - https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions
Given this works in all other browsers and I'm following the documentation, I'm inclined to believe this is a bug in Safari. Am I missing something?
/* Function to handle changes to storage */
function handleChange(changes) {
	for (var key in changes) {
		var storageChange = changes[key];
		console.log('onChanged triggered. '+
				 'Storage key "%s" changed. ' +
				 'Old value was "%s", new value is "%s".',
				 key,
				 storageChange.oldValue,
				 storageChange.newValue);
	}
}
/* Add listener for storage changing */
browser.storage.onChanged.addListener(handleChange)
/* Confirm that the listener has been attached (expect "true" to be returned)*/
browser.storage.onChanged.hasListener(handleChange)
/* Set value for ['testKey] (should trigger onChanged event which calls handleChange) */
browser.storage.local.set({testKey: true}, () => { console.log('Storage updated'); });
/* Get current value for ['testKey] in storage.local, should return {testKey: true}*/
browser.storage.local.get(['testKey'], (result) => { console.log(result); });
/* Change value for ['testKey] (should trigger onChanged event which calls handleChange) */
browser.storage.local.set({testKey: false}, () => { console.log('Storage updated'); });
Post not yet marked as solved
Hi,
I'm trying to convert my chrome extension to work in Safari. I've got it mostly working but there is one issue with the webRequest.onResponseStarted.addListener api. The callback is missing fields including ip. Here is an example:
webRequest.onResponseStarted.addListener((r) => {
console.log(r);
}, {"urls": ["<all_urls>"])
In chrome this will print all the fields described in the spec.
But in safari it is missing a lot of fields, including ip, type, etc.
Does anyone know if this is a bug or if I am doing something wrong?
Thanks!
Post not yet marked as solved
I'm converting a Chrome extension to work in Safari 15 using the xcrun safari-web-extension-converter. It partially works, but seems to fail with CORS permission issues in both the background script and content scripts.
Oddly enough neither issue exists in Chrome. I have granted all websites permission via Safari itself after installation.
In manifest.json, I have this in the permissions key:
"http://*/",
"https://*/"
I've tried a variety of permutations, including "https://*/*" but nothing works. Every XMLHttpRequest results in the same error:
Failed to load resource: Origin safari-web-extension://... is not allowed by Access-Control-Allow-Origin. Status code: 200
As mentioned, it works fine in Chrome with the same permissions. What have I missed?
Hey,
Is it allowed to inject an HTML item above a web page on iOS using Safari Web Extension?
If yes what amount of screen space can we allocate to the UI?
Example:
Post not yet marked as solved
We are deploying a .net Webapp and running it on iOS and Android devices. On iOS 15 and later, if the app is on the homescreen, then run, put in background and then come back, all inputs like datepicker and selects are not working anymore. So if you click on the select, nothing happens. A restart of the app helps, but if the app is set in background, the same happens again. I've read from others having the same problems, is there anything done against it? Also tried this for iOS 15.4 Beta 4.
At the moment we are asking our customers to use the app in safari and not on the homescreen to prevent the freezing.
One example input and select:
<input data-clear-btn="false" data-db-class="some_db_class" data-db-name"some_db_name" data-db-typ="date" type="date" id="some_id" value="" data-inline="true">
<select data-mini="true" data-inline="true" class="some_class"
<option value="-1">Auswahl treffen...</option>
<option value="0">Beispiel</option>
</select>
Post not yet marked as solved
Issue:
Safari browser crashes consistently when I run a Selenium automation script for a very simple use case:
Enter username & password and press the Sign in button.
Browser crashes as soon as the button is clicked, before the home page loads up.
Please refer to the attached js file for script and steps to reproduce.
Also attaching Safari crash logs from ~/Library/Logs/DiagnosticReports/.
Can see a segmentation fault had occurred with KERNEL_INVALID_ADDRESS due to bad memory area being accessed:
"exception" : {"codes":"0x0000000000000001, 0x0000000000000040","rawCodes":[1,64],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x0000000000000040"},
"termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":48287},
Product Specs:
MacOS Monterey version 12.2.1
Mac mini (2018)
Processor: 3Ghz 6-Core Intel Core i5
Memory: 8GB 2667 MHz DDR4
Graphics: Intel UHD Graphics 640 1536 MB
NOTE: Issue is NOT related to Selenium since this issue is only seen in Monterey only for particular product specs consistently. Did not face this in Big Sur/ Catalina/ Mojave/ High Sierra, etc. Also test runs fine in Chrome, Firefox & Edge browsers in the same machine.
Crash may be reproducible only in some versions of Monterey with particular hardware configurations. This is an error related to segmentation fault due to bad memory access so it's pretty clear this has to be hardware dependent.
Safari-2022-06-24-152240.txt
reproduce_safari_crash.js
Post not yet marked as solved
Has the problem of the black background when taking a picture with the AR Quick look function in iOS 15 been resolved? I think it's a rather serious bug.
On an iOS 15 device, go to the Quick Look page below and display any of the multiple 3D models in AR Quick Look; the background will be black when you take a picture with the AR Quick Look shooting function.
https://developer.apple.com/augmented-reality/quick-look/
There are similar events below, but they do not seem to be addressed at all.
https://developer.apple.com/forums/thread/691784
Post not yet marked as solved
We have a PWA (web app) that the user can add to the homescreen to make it look more like an app. Some users have reported a strange issue that only seems to appear on IOS sometimes when the following step has been made.
Open the app from the homescreen
Use the app for a while
Put it into background
Turn off the screen for a while
Turn the screen back on and put the app to foreground again
The bug is that nothing seems to happen when you click on for example a select or date input control. First I thought that there was some overlay in the app that was blocking the ui controls but the elements receive focus when they are click, but not options is shown.
Now it becomes really strange. When I tried to click a little bit under the select input an option was selected. The same thing occured with a time select. If I first clicked on the timeselect input control and then a little bit under, it updated the time.
So, the controls seems to be there but nothing is visible on the screen. I have only been able to reproduce this on my own once but multiple users have been reporting the same thing. The only way to work around the bug is to restart the app.
It seems to be for all native safari controls that shows some kind of modal/popover.
a gif illustrating the issue is available in this stackoverflow question: https://stackoverflow.com/questions/70292301/ios-native-controls-invisible-hidden-in-pwa
Post not yet marked as solved
Application is hosted on web kit, after iOS 15 upgrade, select dropdown triggering error.
"[Assert] Failed to present a context menu for configuration with identifier ***. This is likely due to a different presentation occuring during the lifecycle of the interaction."
Post not yet marked as solved
Hi Team,
We get some recurring crashes in Crashlytics titled "WebCore" and "UnoversalError.swift line2". We cannot find the exact cause. The event summary of most cases shows the iOS version as 15.
Please find the attached screenshots for the same.
Please help solve the problem here.
Thanks in advance
Regards,
Mohamed Rafi
Post not yet marked as solved
Deleted for privacy and wrong section argument.
Post not yet marked as solved
What is the recommended FFMPEG settings for encoding a video which can play on all apple devices, old and new.
I would like the format to be in mp4 so that the video file is also compatible to android, windows (phone / pc) and linux.
These are the current settings I have used and they do not work on iOS, These settings work great on Windows and Android but not on iOS.
ffmpeg -i input_video.mp4 -c:v libx264 -crf 23 -profile:v baseline -level 3.0 -pix_fmt yuv420p -c:a aac -ac 2 -b:a 128k -movflags faststart -o output_video.mp4
I'm new to developing for iPhone/iOS.
so thanks in advance.
Post not yet marked as solved
I have an SPA web app I've built for Safari iOS. One feature I have is that (with user's permission!) I would like to play audio alerts of various sorts based on events that take place in the app. (Think a chat app playing a "message received" sound.)
... again, this would be with the user's permission. This is very much a feature of the app and not nagware or adware.
Currently, of course, this isn't possible. Audio can only be played in response to some user-initiated action, and that "permission" only lasts until the page closes or is reloaded.
So, question: Is there a way a user can permanently give permission to a website on iOS to autoplay sound files?
Post not yet marked as solved
I am creating a react app and am making use of Webauthn to use TouchID or FaceID for user authentication.
I have built my app so that when the button is clicked, navigator.credentials.create is the only call made.
With attestation set to none, there are no issues however as soon as I set attestation to direct I get an alert saying 'The operation can't be completed' and 'NotAllowedError: This request has been cancelled by the user.' is logged to console.
The issue only presents itself on Safari and iOS devices however works perfectly on other browsers like Chrome.
Has anyone encountered a similar issue and possibly know how to resolve it?
Thanks
Shay